aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/dmx/glxProxy
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/dmx/glxProxy')
-rw-r--r--xorg-server/hw/dmx/glxProxy/compsize.c866
-rw-r--r--xorg-server/hw/dmx/glxProxy/g_disptab.c1128
-rw-r--r--xorg-server/hw/dmx/glxProxy/g_disptab.h1252
-rw-r--r--xorg-server/hw/dmx/glxProxy/g_renderswap.c2735
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxcmds.c4513
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxcmdsswap.c927
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxext.c1013
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxext.h149
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxfbconfig.c212
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxfbconfig.h5
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxscreens.c499
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxserver.h189
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxsingle.c1332
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxswap.c1100
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxutil.c71
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxutil.h83
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxvendor.c753
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxvendor.h27
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxvisuals.c310
-rw-r--r--xorg-server/hw/dmx/glxProxy/glxvisuals.h88
-rw-r--r--xorg-server/hw/dmx/glxProxy/render2swap.c219
-rw-r--r--xorg-server/hw/dmx/glxProxy/renderpixswap.c789
22 files changed, 9495 insertions, 8765 deletions
diff --git a/xorg-server/hw/dmx/glxProxy/compsize.c b/xorg-server/hw/dmx/glxProxy/compsize.c
index 5a5d5d0f1..c204d3ded 100644
--- a/xorg-server/hw/dmx/glxProxy/compsize.c
+++ b/xorg-server/hw/dmx/glxProxy/compsize.c
@@ -31,529 +31,611 @@
#include <GL/gl.h>
#include "compsize.h"
-GLint __glFogiv_size(GLenum pname)
+GLint
+__glFogiv_size(GLenum pname)
{
switch (pname) {
- case GL_FOG_COLOR: return 4;
- case GL_FOG_DENSITY: return 1;
- case GL_FOG_END: return 1;
- case GL_FOG_MODE: return 1;
- case GL_FOG_INDEX: return 1;
- case GL_FOG_START: return 1;
- default:
- return 0;
+ case GL_FOG_COLOR:
+ return 4;
+ case GL_FOG_DENSITY:
+ return 1;
+ case GL_FOG_END:
+ return 1;
+ case GL_FOG_MODE:
+ return 1;
+ case GL_FOG_INDEX:
+ return 1;
+ case GL_FOG_START:
+ return 1;
+ default:
+ return 0;
}
}
-GLint __glFogfv_size(GLenum pname)
+GLint
+__glFogfv_size(GLenum pname)
{
return __glFogiv_size(pname);
}
-GLint __glCallLists_size(GLsizei n, GLenum type)
+GLint
+__glCallLists_size(GLsizei n, GLenum type)
{
GLint size;
- if (n < 0) return 0;
+ if (n < 0)
+ return 0;
switch (type) {
- case GL_BYTE: size = 1; break;
- case GL_UNSIGNED_BYTE: size = 1; break;
- case GL_SHORT: size = 2; break;
- case GL_UNSIGNED_SHORT: size = 2; break;
- case GL_INT: size = 4; break;
- case GL_UNSIGNED_INT: size = 4; break;
- case GL_FLOAT: size = 4; break;
- case GL_2_BYTES: size = 2; break;
- case GL_3_BYTES: size = 3; break;
- case GL_4_BYTES: size = 4; break;
- default:
- return 0;
+ case GL_BYTE:
+ size = 1;
+ break;
+ case GL_UNSIGNED_BYTE:
+ size = 1;
+ break;
+ case GL_SHORT:
+ size = 2;
+ break;
+ case GL_UNSIGNED_SHORT:
+ size = 2;
+ break;
+ case GL_INT:
+ size = 4;
+ break;
+ case GL_UNSIGNED_INT:
+ size = 4;
+ break;
+ case GL_FLOAT:
+ size = 4;
+ break;
+ case GL_2_BYTES:
+ size = 2;
+ break;
+ case GL_3_BYTES:
+ size = 3;
+ break;
+ case GL_4_BYTES:
+ size = 4;
+ break;
+ default:
+ return 0;
}
return n * size;
}
-GLint __glDrawPixels_size(GLenum format, GLenum type, GLsizei w, GLsizei h)
+GLint
+__glDrawPixels_size(GLenum format, GLenum type, GLsizei w, GLsizei h)
{
GLint elements, esize;
-
+
switch (format) {
- case GL_COLOR_INDEX:
- case GL_STENCIL_INDEX:
- case GL_DEPTH_COMPONENT:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- default:
- return 0;
+ case GL_COLOR_INDEX:
+ case GL_STENCIL_INDEX:
+ case GL_DEPTH_COMPONENT:
+ elements = 1;
+ break;
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ case GL_ABGR_EXT:
+ elements = 4;
+ break;
+ default:
+ return 0;
}
switch (type) {
- case GL_BITMAP:
- if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) {
- return (h * ((w+7)/8));
- } else {
- return 0;
- }
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- esize = 4;
- elements = 1;
- break;
- default:
- return 0;
+ case GL_BITMAP:
+ if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) {
+ return (h * ((w + 7) / 8));
+ }
+ else {
+ return 0;
+ }
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ esize = 1;
+ elements = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ esize = 4;
+ elements = 1;
+ break;
+ default:
+ return 0;
}
return elements * esize * w * h;
}
-GLint __glBitmap_size(GLsizei w, GLsizei h)
+GLint
+__glBitmap_size(GLsizei w, GLsizei h)
{
return __glDrawPixels_size(GL_COLOR_INDEX, GL_BITMAP, w, h);
}
-GLint __glTexGendv_size(GLenum e)
+GLint
+__glTexGendv_size(GLenum e)
{
switch (e) {
- case GL_TEXTURE_GEN_MODE:
- return 1;
- case GL_OBJECT_PLANE:
- case GL_EYE_PLANE:
- return 4;
- default:
- return 0;
+ case GL_TEXTURE_GEN_MODE:
+ return 1;
+ case GL_OBJECT_PLANE:
+ case GL_EYE_PLANE:
+ return 4;
+ default:
+ return 0;
}
}
-GLint __glTexGenfv_size(GLenum e)
+GLint
+__glTexGenfv_size(GLenum e)
{
return __glTexGendv_size(e);
}
-GLint __glTexGeniv_size(GLenum e)
+GLint
+__glTexGeniv_size(GLenum e)
{
return __glTexGendv_size(e);
}
-GLint __glTexParameterfv_size(GLenum e)
+GLint
+__glTexParameterfv_size(GLenum e)
{
switch (e) {
- case GL_TEXTURE_WRAP_S:
- case GL_TEXTURE_WRAP_T:
- case GL_TEXTURE_WRAP_R:
- case GL_TEXTURE_MIN_FILTER:
- case GL_TEXTURE_MAG_FILTER:
- return 1;
- case GL_TEXTURE_BORDER_COLOR:
- return 4;
- case GL_TEXTURE_PRIORITY:
- return 1;
- case GL_TEXTURE_MIN_LOD:
- case GL_TEXTURE_MAX_LOD:
- case GL_TEXTURE_BASE_LEVEL:
- case GL_TEXTURE_MAX_LEVEL:
- return 1;
- default:
- return 0;
+ case GL_TEXTURE_WRAP_S:
+ case GL_TEXTURE_WRAP_T:
+ case GL_TEXTURE_WRAP_R:
+ case GL_TEXTURE_MIN_FILTER:
+ case GL_TEXTURE_MAG_FILTER:
+ return 1;
+ case GL_TEXTURE_BORDER_COLOR:
+ return 4;
+ case GL_TEXTURE_PRIORITY:
+ return 1;
+ case GL_TEXTURE_MIN_LOD:
+ case GL_TEXTURE_MAX_LOD:
+ case GL_TEXTURE_BASE_LEVEL:
+ case GL_TEXTURE_MAX_LEVEL:
+ return 1;
+ default:
+ return 0;
}
}
-GLint __glTexParameteriv_size(GLenum e)
+GLint
+__glTexParameteriv_size(GLenum e)
{
return __glTexParameterfv_size(e);
}
-GLint __glTexEnvfv_size(GLenum e)
+GLint
+__glTexEnvfv_size(GLenum e)
{
switch (e) {
- case GL_TEXTURE_ENV_MODE:
- return 1;
- case GL_TEXTURE_ENV_COLOR:
- return 4;
- default:
- return 0;
+ case GL_TEXTURE_ENV_MODE:
+ return 1;
+ case GL_TEXTURE_ENV_COLOR:
+ return 4;
+ default:
+ return 0;
}
}
-GLint __glTexEnviv_size(GLenum e)
+GLint
+__glTexEnviv_size(GLenum e)
{
return __glTexEnvfv_size(e);
}
-GLint __glTexImage1D_size(GLenum format, GLenum type, GLsizei w)
+GLint
+__glTexImage1D_size(GLenum format, GLenum type, GLsizei w)
{
GLint elements, esize;
- if (w < 0) return 0;
+ if (w < 0)
+ return 0;
switch (format) {
- case GL_COLOR_INDEX:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- default:
- return 0;
+ case GL_COLOR_INDEX:
+ elements = 1;
+ break;
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ case GL_ABGR_EXT:
+ elements = 4;
+ break;
+ default:
+ return 0;
}
switch (type) {
- case GL_BITMAP:
- if (format == GL_COLOR_INDEX) {
- return (w+7)/8;
- } else {
- return 0;
- }
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- esize = 4;
- elements = 1;
- break;
- default:
- return 0;
+ case GL_BITMAP:
+ if (format == GL_COLOR_INDEX) {
+ return (w + 7) / 8;
+ }
+ else {
+ return 0;
+ }
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ esize = 1;
+ elements = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ esize = 4;
+ elements = 1;
+ break;
+ default:
+ return 0;
}
return elements * esize * w;
}
-GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h)
+GLint
+__glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h)
{
GLint elements, esize;
- if (w < 0) return 0;
- if (h < 0) return 0;
+ if (w < 0)
+ return 0;
+ if (h < 0)
+ return 0;
switch (format) {
- case GL_COLOR_INDEX:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- default:
- return 0;
+ case GL_COLOR_INDEX:
+ elements = 1;
+ break;
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ case GL_ABGR_EXT:
+ elements = 4;
+ break;
+ default:
+ return 0;
}
switch (type) {
- case GL_BITMAP:
- if (format == GL_COLOR_INDEX) {
- return (h * ((w+7)/8));
- } else {
- return 0;
- }
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- esize = 4;
- elements = 1;
- break;
- default:
- return 0;
+ case GL_BITMAP:
+ if (format == GL_COLOR_INDEX) {
+ return (h * ((w + 7) / 8));
+ }
+ else {
+ return 0;
+ }
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ esize = 1;
+ elements = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ esize = 4;
+ elements = 1;
+ break;
+ default:
+ return 0;
}
return elements * esize * w * h;
}
-GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h,
- GLsizei d)
+GLint
+__glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, GLsizei d)
{
GLint elements, esize;
- if (w < 0) return 0;
- if (h < 0) return 0;
- if (d < 0) return 0;
+ if (w < 0)
+ return 0;
+ if (h < 0)
+ return 0;
+ if (d < 0)
+ return 0;
switch (format) {
- case GL_COLOR_INDEX:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- default:
- return 0;
+ case GL_COLOR_INDEX:
+ elements = 1;
+ break;
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ case GL_ABGR_EXT:
+ elements = 4;
+ break;
+ default:
+ return 0;
}
switch (type) {
- case GL_BITMAP:
- if (format == GL_COLOR_INDEX) {
- return (d * (h * ((w+7)/8)));
- } else {
- return 0;
- }
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- esize = 4;
- elements = 1;
- break;
- default:
- return 0;
+ case GL_BITMAP:
+ if (format == GL_COLOR_INDEX) {
+ return (d * (h * ((w + 7) / 8)));
+ }
+ else {
+ return 0;
+ }
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ esize = 1;
+ elements = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ esize = 4;
+ elements = 1;
+ break;
+ default:
+ return 0;
}
return elements * esize * w * h * d;
}
-GLint __glLightfv_size(GLenum pname)
+GLint
+__glLightfv_size(GLenum pname)
{
switch (pname) {
- case GL_SPOT_EXPONENT: return 1;
- case GL_SPOT_CUTOFF: return 1;
- case GL_AMBIENT: return 4;
- case GL_DIFFUSE: return 4;
- case GL_SPECULAR: return 4;
- case GL_POSITION: return 4;
- case GL_SPOT_DIRECTION: return 3;
- case GL_CONSTANT_ATTENUATION: return 1;
- case GL_LINEAR_ATTENUATION: return 1;
- case GL_QUADRATIC_ATTENUATION: return 1;
- default:
- return 0;
+ case GL_SPOT_EXPONENT:
+ return 1;
+ case GL_SPOT_CUTOFF:
+ return 1;
+ case GL_AMBIENT:
+ return 4;
+ case GL_DIFFUSE:
+ return 4;
+ case GL_SPECULAR:
+ return 4;
+ case GL_POSITION:
+ return 4;
+ case GL_SPOT_DIRECTION:
+ return 3;
+ case GL_CONSTANT_ATTENUATION:
+ return 1;
+ case GL_LINEAR_ATTENUATION:
+ return 1;
+ case GL_QUADRATIC_ATTENUATION:
+ return 1;
+ default:
+ return 0;
}
}
-GLint __glLightiv_size(GLenum pname)
+GLint
+__glLightiv_size(GLenum pname)
{
return __glLightfv_size(pname);
}
-GLint __glLightModelfv_size(GLenum pname)
+GLint
+__glLightModelfv_size(GLenum pname)
{
switch (pname) {
- case GL_LIGHT_MODEL_AMBIENT: return 4;
- case GL_LIGHT_MODEL_LOCAL_VIEWER: return 1;
- case GL_LIGHT_MODEL_TWO_SIDE: return 1;
- case GL_LIGHT_MODEL_COLOR_CONTROL: return 1;
- default:
- return 0;
+ case GL_LIGHT_MODEL_AMBIENT:
+ return 4;
+ case GL_LIGHT_MODEL_LOCAL_VIEWER:
+ return 1;
+ case GL_LIGHT_MODEL_TWO_SIDE:
+ return 1;
+ case GL_LIGHT_MODEL_COLOR_CONTROL:
+ return 1;
+ default:
+ return 0;
}
}
-GLint __glLightModeliv_size(GLenum pname)
+GLint
+__glLightModeliv_size(GLenum pname)
{
return __glLightModelfv_size(pname);
}
-GLint __glMaterialfv_size(GLenum pname)
+GLint
+__glMaterialfv_size(GLenum pname)
{
switch (pname) {
- case GL_SHININESS: return 1;
- case GL_EMISSION: return 4;
- case GL_AMBIENT: return 4;
- case GL_DIFFUSE: return 4;
- case GL_SPECULAR: return 4;
- case GL_AMBIENT_AND_DIFFUSE: return 4;
- case GL_COLOR_INDEXES: return 3;
- default:
- return 0;
+ case GL_SHININESS:
+ return 1;
+ case GL_EMISSION:
+ return 4;
+ case GL_AMBIENT:
+ return 4;
+ case GL_DIFFUSE:
+ return 4;
+ case GL_SPECULAR:
+ return 4;
+ case GL_AMBIENT_AND_DIFFUSE:
+ return 4;
+ case GL_COLOR_INDEXES:
+ return 3;
+ default:
+ return 0;
}
}
-GLint __glMaterialiv_size(GLenum pname)
+GLint
+__glMaterialiv_size(GLenum pname)
{
return __glMaterialfv_size(pname);
}
-GLint __glColorTableParameterfv_size(GLenum pname)
+GLint
+__glColorTableParameterfv_size(GLenum pname)
{
switch (pname) {
- case GL_COLOR_TABLE_FORMAT:
- case GL_COLOR_TABLE_WIDTH:
- case GL_COLOR_TABLE_RED_SIZE:
- case GL_COLOR_TABLE_GREEN_SIZE:
- case GL_COLOR_TABLE_BLUE_SIZE:
- case GL_COLOR_TABLE_ALPHA_SIZE:
- case GL_COLOR_TABLE_LUMINANCE_SIZE:
- case GL_COLOR_TABLE_INTENSITY_SIZE:
- return 1;
- case GL_COLOR_TABLE_SCALE:
- case GL_COLOR_TABLE_BIAS:
- return 4;
- default:
- return -1;
+ case GL_COLOR_TABLE_FORMAT:
+ case GL_COLOR_TABLE_WIDTH:
+ case GL_COLOR_TABLE_RED_SIZE:
+ case GL_COLOR_TABLE_GREEN_SIZE:
+ case GL_COLOR_TABLE_BLUE_SIZE:
+ case GL_COLOR_TABLE_ALPHA_SIZE:
+ case GL_COLOR_TABLE_LUMINANCE_SIZE:
+ case GL_COLOR_TABLE_INTENSITY_SIZE:
+ return 1;
+ case GL_COLOR_TABLE_SCALE:
+ case GL_COLOR_TABLE_BIAS:
+ return 4;
+ default:
+ return -1;
}
}
-GLint __glColorTableParameteriv_size(GLenum pname)
+GLint
+__glColorTableParameteriv_size(GLenum pname)
{
return __glColorTableParameterfv_size(pname);
}
-GLint __glConvolutionParameterfv_size(GLenum pname)
+GLint
+__glConvolutionParameterfv_size(GLenum pname)
{
- switch(pname) {
- case GL_CONVOLUTION_BORDER_MODE:
- return 1;
- case GL_CONVOLUTION_BORDER_COLOR:
- case GL_CONVOLUTION_FILTER_SCALE:
- case GL_CONVOLUTION_FILTER_BIAS:
- return 4;
- default: /* error: bad enum value */
- return -1;
+ switch (pname) {
+ case GL_CONVOLUTION_BORDER_MODE:
+ return 1;
+ case GL_CONVOLUTION_BORDER_COLOR:
+ case GL_CONVOLUTION_FILTER_SCALE:
+ case GL_CONVOLUTION_FILTER_BIAS:
+ return 4;
+ default: /* error: bad enum value */
+ return -1;
}
}
-GLint __glConvolutionParameteriv_size(GLenum pname)
+GLint
+__glConvolutionParameteriv_size(GLenum pname)
{
return __glConvolutionParameterfv_size(pname);
}
diff --git a/xorg-server/hw/dmx/glxProxy/g_disptab.c b/xorg-server/hw/dmx/glxProxy/g_disptab.c
index 3f0a6e77e..46177c4cc 100644
--- a/xorg-server/hw/dmx/glxProxy/g_disptab.c
+++ b/xorg-server/hw/dmx/glxProxy/g_disptab.c
@@ -35,578 +35,576 @@
#include "glxsingle.h"
__GLXdispatchSingleProcPtr __glXSingleTable[] = {
- __glXNoSuchSingleOpcode,
- __glXRender,
- __glXRenderLarge,
- __glXCreateContext,
- __glXDestroyContext,
- __glXMakeCurrent,
- __glXIsDirect,
- __glXQueryVersion,
- __glXWaitGL,
- __glXWaitX,
- __glXCopyContext,
- __glXSwapBuffers,
- __glXUseXFont,
- __glXCreateGLXPixmap,
- __glXGetVisualConfigs,
- __glXDestroyGLXPixmap,
- __glXVendorPrivate,
- __glXVendorPrivateWithReply,
- __glXQueryExtensionsString,
- __glXQueryServerString,
- __glXClientInfo,
- __glXGetFBConfigs, /* __glXGetFBConfigs */
- __glXCreatePixmap, /* __glXCreatePixmap,*/
- __glXDestroyGLXPixmap, /* __glXDestroyPixmap,*/
- __glXCreateNewContext, /* __glXCreateNewContext,*/
- __glXQueryContext, /* __glXQueryContext,*/
- __glXMakeContextCurrent, /* __glXMakeContextCurrent,*/
- __glXCreatePbuffer, /* __glXCreatePbuffer,*/
- __glXDestroyPbuffer, /* __glXDestroyPbuffer,*/
- __glXGetDrawableAttributes, /* __glXGetDrawableAttributes,*/
- __glXChangeDrawableAttributes, /* __glXChangeDrawableAttributes,*/
- __glXCreateWindow, /* __glXCreateWindow,*/
- __glXDestroyWindow, /* __glXDestroyWindow,*/
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXForwardSingleReq, /* __glXDisp_NewList, */
- __glXForwardSingleReq, /* __glXDisp_EndList, */
- __glXForwardSingleReq, /* __glXDisp_DeleteLists, */
- __glXForwardPipe0WithReply, /* __glXDisp_GenLists, */
- __glXForwardSingleReq, /* __glXDisp_FeedbackBuffer, */
- __glXForwardSingleReq, /* __glXDisp_SelectBuffer, */
- __glXForwardAllWithReply, /* __glXDisp_RenderMode, */
- __glXForwardAllWithReply, /* __glXDisp_Finish, */
- __glXForwardSingleReq, /* __glXDisp_PixelStoref, */
- __glXForwardSingleReq, /* __glXDisp_PixelStorei, */
- __glXDisp_ReadPixels, /* __glXDisp_ReadPixels, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetBooleanv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetClipPlane, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetDoublev, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetError, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetFloatv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetIntegerv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetLightfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetLightiv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetMapdv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetMapfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetMapiv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetMaterialfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetMaterialiv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetPixelMapfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetPixelMapuiv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetPixelMapusv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetPolygonStipple, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetString, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexEnvfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexEnviv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexGendv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexGenfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexGeniv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexImage, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexParameterfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexParameteriv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexLevelParameterfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetTexLevelParameteriv, */
- __glXForwardPipe0WithReply, /* __glXDisp_IsEnabled, */
- __glXForwardPipe0WithReply, /* __glXDisp_IsList, */
- __glXForwardSingleReq, /* __glXDisp_Flush, */
- __glXForwardPipe0WithReply, /* __glXDisp_AreTexturesResident, */
- __glXForwardSingleReq, /* __glXDisp_DeleteTextures, */
- __glXForwardAllWithReply, /* __glXDisp_GenTextures, */
- __glXForwardPipe0WithReply, /* __glXDisp_IsTexture, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetColorTable, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetColorTableParameterfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetColorTableParameteriv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetConvolutionFilter, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetConvolutionParameterfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetConvolutionParameteriv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetSeparableFilter, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetHistogram, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetHistogramParameterfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetHistogramParameteriv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetMinmax, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetMinmaxParameterfv, */
- __glXForwardPipe0WithReply, /* __glXDisp_GetMinmaxParameteriv, */
+ __glXNoSuchSingleOpcode,
+ __glXRender,
+ __glXRenderLarge,
+ __glXCreateContext,
+ __glXDestroyContext,
+ __glXMakeCurrent,
+ __glXIsDirect,
+ __glXQueryVersion,
+ __glXWaitGL,
+ __glXWaitX,
+ __glXCopyContext,
+ __glXSwapBuffers,
+ __glXUseXFont,
+ __glXCreateGLXPixmap,
+ __glXGetVisualConfigs,
+ __glXDestroyGLXPixmap,
+ __glXVendorPrivate,
+ __glXVendorPrivateWithReply,
+ __glXQueryExtensionsString,
+ __glXQueryServerString,
+ __glXClientInfo,
+ __glXGetFBConfigs, /* __glXGetFBConfigs */
+ __glXCreatePixmap, /* __glXCreatePixmap, */
+ __glXDestroyGLXPixmap, /* __glXDestroyPixmap, */
+ __glXCreateNewContext, /* __glXCreateNewContext, */
+ __glXQueryContext, /* __glXQueryContext, */
+ __glXMakeContextCurrent, /* __glXMakeContextCurrent, */
+ __glXCreatePbuffer, /* __glXCreatePbuffer, */
+ __glXDestroyPbuffer, /* __glXDestroyPbuffer, */
+ __glXGetDrawableAttributes, /* __glXGetDrawableAttributes, */
+ __glXChangeDrawableAttributes, /* __glXChangeDrawableAttributes, */
+ __glXCreateWindow, /* __glXCreateWindow, */
+ __glXDestroyWindow, /* __glXDestroyWindow, */
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXForwardSingleReq, /* __glXDisp_NewList, */
+ __glXForwardSingleReq, /* __glXDisp_EndList, */
+ __glXForwardSingleReq, /* __glXDisp_DeleteLists, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GenLists, */
+ __glXForwardSingleReq, /* __glXDisp_FeedbackBuffer, */
+ __glXForwardSingleReq, /* __glXDisp_SelectBuffer, */
+ __glXForwardAllWithReply, /* __glXDisp_RenderMode, */
+ __glXForwardAllWithReply, /* __glXDisp_Finish, */
+ __glXForwardSingleReq, /* __glXDisp_PixelStoref, */
+ __glXForwardSingleReq, /* __glXDisp_PixelStorei, */
+ __glXDisp_ReadPixels, /* __glXDisp_ReadPixels, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetBooleanv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetClipPlane, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetDoublev, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetError, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetFloatv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetIntegerv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetLightfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetLightiv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetMapdv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetMapfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetMapiv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetMaterialfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetMaterialiv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetPixelMapfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetPixelMapuiv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetPixelMapusv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetPolygonStipple, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetString, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexEnvfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexEnviv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexGendv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexGenfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexGeniv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexImage, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexParameterfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexParameteriv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexLevelParameterfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetTexLevelParameteriv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_IsEnabled, */
+ __glXForwardPipe0WithReply, /* __glXDisp_IsList, */
+ __glXForwardSingleReq, /* __glXDisp_Flush, */
+ __glXForwardPipe0WithReply, /* __glXDisp_AreTexturesResident, */
+ __glXForwardSingleReq, /* __glXDisp_DeleteTextures, */
+ __glXForwardAllWithReply, /* __glXDisp_GenTextures, */
+ __glXForwardPipe0WithReply, /* __glXDisp_IsTexture, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetColorTable, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetColorTableParameterfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetColorTableParameteriv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetConvolutionFilter, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetConvolutionParameterfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetConvolutionParameteriv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetSeparableFilter, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetHistogram, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetHistogramParameterfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetHistogramParameteriv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetMinmax, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetMinmaxParameterfv, */
+ __glXForwardPipe0WithReply, /* __glXDisp_GetMinmaxParameteriv, */
};
__GLXdispatchSingleProcPtr __glXSwapSingleTable[] = {
- __glXNoSuchSingleOpcode,
- __glXSwapRender,
- __glXSwapRenderLarge,
- __glXSwapCreateContext,
- __glXSwapDestroyContext,
- __glXSwapMakeCurrent,
- __glXSwapIsDirect,
- __glXSwapQueryVersion,
- __glXSwapWaitGL,
- __glXSwapWaitX,
- __glXSwapCopyContext,
- __glXSwapSwapBuffers,
- __glXSwapUseXFont,
- __glXSwapCreateGLXPixmap,
- __glXSwapGetVisualConfigs,
- __glXSwapDestroyGLXPixmap,
- __glXSwapVendorPrivate,
- __glXSwapVendorPrivateWithReply,
- __glXSwapQueryExtensionsString,
- __glXSwapQueryServerString,
- __glXSwapClientInfo,
- __glXSwapGetFBConfigs,
- __glXSwapCreatePixmap,
- __glXSwapDestroyGLXPixmap,
- __glXSwapCreateNewContext,
- __glXSwapQueryContext,
- __glXSwapMakeContextCurrent,
- __glXSwapCreatePbuffer,
- __glXSwapDestroyPbuffer,
- __glXSwapGetDrawableAttributes,
- __glXSwapChangeDrawableAttributes,
- __glXSwapCreateWindow,
- __glXSwapDestroyWindow,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXNoSuchSingleOpcode,
- __glXForwardSingleReqSwap, /* __glXDisp_NewList, */
- __glXForwardSingleReqSwap, /* __glXDisp_EndList, */
- __glXForwardSingleReqSwap, /* __glXDisp_DeleteLists, */
- __glXForwardPipe0WithReplySwap, /* __glXDisp_GenLists, */
- __glXForwardSingleReqSwap, /* __glXDisp_FeedbackBuffer, */
- __glXForwardSingleReqSwap, /* __glXDisp_SelectBuffer, */
- __glXForwardAllWithReplySwapiv, /* __glXDisp_RenderMode, */
- __glXForwardAllWithReplySwap, /* __glXDisp_Finish, */
- __glXForwardSingleReqSwap, /* __glXDisp_PixelStoref, */
- __glXForwardSingleReqSwap, /* __glXDisp_PixelStorei, */
- __glXDisp_ReadPixels, /* __glXDisp_ReadPixels, */
- __glXForwardPipe0WithReplySwap, /* __glXDisp_GetBooleanv, */
- __glXForwardPipe0WithReplySwapdv, /* __glXDisp_GetClipPlane, */
- __glXForwardPipe0WithReplySwapdv, /* __glXDisp_GetDoublev, */
- __glXForwardPipe0WithReplySwap, /* __glXDisp_GetError, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetFloatv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetIntegerv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetLightfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetLightiv, */
- __glXForwardPipe0WithReplySwapdv, /* __glXDisp_GetMapdv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMapfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMapiv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMaterialfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMaterialiv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetPixelMapfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetPixelMapuiv, */
- __glXForwardPipe0WithReplySwapsv, /* __glXDisp_GetPixelMapusv, */
- __glXForwardPipe0WithReplySwap, /* __glXDisp_GetPolygonStipple, */
- __glXForwardPipe0WithReplySwap, /* __glXDisp_GetString, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexEnvfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexEnviv, */
- __glXForwardPipe0WithReplySwapdv, /* __glXDisp_GetTexGendv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexGenfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexGeniv, */
- __glXDispSwap_GetTexImage, /* __glXDisp_GetTexImage, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexParameterfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexParameteriv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexLevelParameterfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexLevelParameteriv, */
- __glXForwardPipe0WithReplySwap, /* __glXDisp_IsEnabled, */
- __glXForwardPipe0WithReplySwap, /* __glXDisp_IsList, */
- __glXForwardSingleReqSwap, /* __glXDisp_Flush, */
- __glXForwardPipe0WithReplySwap, /* __glXDisp_AreTexturesResident, */
- __glXForwardSingleReqSwap, /* __glXDisp_DeleteTextures, */
- __glXForwardAllWithReplySwapiv, /* __glXDisp_GenTextures, */
- __glXForwardPipe0WithReplySwap, /* __glXDisp_IsTexture, */
- __glXDispSwap_GetColorTable, /* __glXDisp_GetColorTable, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetColorTableParameterfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetColorTableParameteriv, */
- __glXDispSwap_GetColorTable, /* __glXDisp_GetConvolutionFilter, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetConvolutionParameterfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetConvolutionParameteriv, */
- __glXDispSwap_GetColorTable, /* __glXDisp_GetSeparableFilter, */
- __glXDispSwap_GetColorTable, /* __glXDisp_GetHistogram, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetHistogramParameterfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetHistogramParameteriv, */
- __glXDispSwap_GetColorTable, /* __glXDisp_GetMinmax, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMinmaxParameterfv, */
- __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMinmaxParameteriv, */
+ __glXNoSuchSingleOpcode,
+ __glXSwapRender,
+ __glXSwapRenderLarge,
+ __glXSwapCreateContext,
+ __glXSwapDestroyContext,
+ __glXSwapMakeCurrent,
+ __glXSwapIsDirect,
+ __glXSwapQueryVersion,
+ __glXSwapWaitGL,
+ __glXSwapWaitX,
+ __glXSwapCopyContext,
+ __glXSwapSwapBuffers,
+ __glXSwapUseXFont,
+ __glXSwapCreateGLXPixmap,
+ __glXSwapGetVisualConfigs,
+ __glXSwapDestroyGLXPixmap,
+ __glXSwapVendorPrivate,
+ __glXSwapVendorPrivateWithReply,
+ __glXSwapQueryExtensionsString,
+ __glXSwapQueryServerString,
+ __glXSwapClientInfo,
+ __glXSwapGetFBConfigs,
+ __glXSwapCreatePixmap,
+ __glXSwapDestroyGLXPixmap,
+ __glXSwapCreateNewContext,
+ __glXSwapQueryContext,
+ __glXSwapMakeContextCurrent,
+ __glXSwapCreatePbuffer,
+ __glXSwapDestroyPbuffer,
+ __glXSwapGetDrawableAttributes,
+ __glXSwapChangeDrawableAttributes,
+ __glXSwapCreateWindow,
+ __glXSwapDestroyWindow,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXNoSuchSingleOpcode,
+ __glXForwardSingleReqSwap, /* __glXDisp_NewList, */
+ __glXForwardSingleReqSwap, /* __glXDisp_EndList, */
+ __glXForwardSingleReqSwap, /* __glXDisp_DeleteLists, */
+ __glXForwardPipe0WithReplySwap, /* __glXDisp_GenLists, */
+ __glXForwardSingleReqSwap, /* __glXDisp_FeedbackBuffer, */
+ __glXForwardSingleReqSwap, /* __glXDisp_SelectBuffer, */
+ __glXForwardAllWithReplySwapiv, /* __glXDisp_RenderMode, */
+ __glXForwardAllWithReplySwap, /* __glXDisp_Finish, */
+ __glXForwardSingleReqSwap, /* __glXDisp_PixelStoref, */
+ __glXForwardSingleReqSwap, /* __glXDisp_PixelStorei, */
+ __glXDisp_ReadPixels, /* __glXDisp_ReadPixels, */
+ __glXForwardPipe0WithReplySwap, /* __glXDisp_GetBooleanv, */
+ __glXForwardPipe0WithReplySwapdv, /* __glXDisp_GetClipPlane, */
+ __glXForwardPipe0WithReplySwapdv, /* __glXDisp_GetDoublev, */
+ __glXForwardPipe0WithReplySwap, /* __glXDisp_GetError, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetFloatv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetIntegerv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetLightfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetLightiv, */
+ __glXForwardPipe0WithReplySwapdv, /* __glXDisp_GetMapdv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMapfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMapiv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMaterialfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMaterialiv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetPixelMapfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetPixelMapuiv, */
+ __glXForwardPipe0WithReplySwapsv, /* __glXDisp_GetPixelMapusv, */
+ __glXForwardPipe0WithReplySwap, /* __glXDisp_GetPolygonStipple, */
+ __glXForwardPipe0WithReplySwap, /* __glXDisp_GetString, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexEnvfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexEnviv, */
+ __glXForwardPipe0WithReplySwapdv, /* __glXDisp_GetTexGendv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexGenfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexGeniv, */
+ __glXDispSwap_GetTexImage, /* __glXDisp_GetTexImage, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexParameterfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexParameteriv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexLevelParameterfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetTexLevelParameteriv, */
+ __glXForwardPipe0WithReplySwap, /* __glXDisp_IsEnabled, */
+ __glXForwardPipe0WithReplySwap, /* __glXDisp_IsList, */
+ __glXForwardSingleReqSwap, /* __glXDisp_Flush, */
+ __glXForwardPipe0WithReplySwap, /* __glXDisp_AreTexturesResident, */
+ __glXForwardSingleReqSwap, /* __glXDisp_DeleteTextures, */
+ __glXForwardAllWithReplySwapiv, /* __glXDisp_GenTextures, */
+ __glXForwardPipe0WithReplySwap, /* __glXDisp_IsTexture, */
+ __glXDispSwap_GetColorTable, /* __glXDisp_GetColorTable, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetColorTableParameterfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetColorTableParameteriv, */
+ __glXDispSwap_GetColorTable, /* __glXDisp_GetConvolutionFilter, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetConvolutionParameterfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetConvolutionParameteriv, */
+ __glXDispSwap_GetColorTable, /* __glXDisp_GetSeparableFilter, */
+ __glXDispSwap_GetColorTable, /* __glXDisp_GetHistogram, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetHistogramParameterfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetHistogramParameteriv, */
+ __glXDispSwap_GetColorTable, /* __glXDisp_GetMinmax, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMinmaxParameterfv, */
+ __glXForwardPipe0WithReplySwapiv, /* __glXDisp_GetMinmaxParameteriv, */
};
__GLXdispatchRenderProcPtr __glXSwapRenderTable[] = {
- __glXNoSuchRenderOpcode,
- __glXDispSwap_CallList,
- __glXDispSwap_CallLists,
- __glXDispSwap_ListBase,
- __glXDispSwap_Begin,
- __glXDispSwap_Bitmap,
- __glXDispSwap_Color3bv,
- __glXDispSwap_Color3dv,
- __glXDispSwap_Color3fv,
- __glXDispSwap_Color3iv,
- __glXDispSwap_Color3sv,
- __glXDispSwap_Color3ubv,
- __glXDispSwap_Color3uiv,
- __glXDispSwap_Color3usv,
- __glXDispSwap_Color4bv,
- __glXDispSwap_Color4dv,
- __glXDispSwap_Color4fv,
- __glXDispSwap_Color4iv,
- __glXDispSwap_Color4sv,
- __glXDispSwap_Color4ubv,
- __glXDispSwap_Color4uiv,
- __glXDispSwap_Color4usv,
- __glXDispSwap_EdgeFlagv,
- __glXDispSwap_End,
- __glXDispSwap_Indexdv,
- __glXDispSwap_Indexfv,
- __glXDispSwap_Indexiv,
- __glXDispSwap_Indexsv,
- __glXDispSwap_Normal3bv,
- __glXDispSwap_Normal3dv,
- __glXDispSwap_Normal3fv,
- __glXDispSwap_Normal3iv,
- __glXDispSwap_Normal3sv,
- __glXDispSwap_RasterPos2dv,
- __glXDispSwap_RasterPos2fv,
- __glXDispSwap_RasterPos2iv,
- __glXDispSwap_RasterPos2sv,
- __glXDispSwap_RasterPos3dv,
- __glXDispSwap_RasterPos3fv,
- __glXDispSwap_RasterPos3iv,
- __glXDispSwap_RasterPos3sv,
- __glXDispSwap_RasterPos4dv,
- __glXDispSwap_RasterPos4fv,
- __glXDispSwap_RasterPos4iv,
- __glXDispSwap_RasterPos4sv,
- __glXDispSwap_Rectdv,
- __glXDispSwap_Rectfv,
- __glXDispSwap_Rectiv,
- __glXDispSwap_Rectsv,
- __glXDispSwap_TexCoord1dv,
- __glXDispSwap_TexCoord1fv,
- __glXDispSwap_TexCoord1iv,
- __glXDispSwap_TexCoord1sv,
- __glXDispSwap_TexCoord2dv,
- __glXDispSwap_TexCoord2fv,
- __glXDispSwap_TexCoord2iv,
- __glXDispSwap_TexCoord2sv,
- __glXDispSwap_TexCoord3dv,
- __glXDispSwap_TexCoord3fv,
- __glXDispSwap_TexCoord3iv,
- __glXDispSwap_TexCoord3sv,
- __glXDispSwap_TexCoord4dv,
- __glXDispSwap_TexCoord4fv,
- __glXDispSwap_TexCoord4iv,
- __glXDispSwap_TexCoord4sv,
- __glXDispSwap_Vertex2dv,
- __glXDispSwap_Vertex2fv,
- __glXDispSwap_Vertex2iv,
- __glXDispSwap_Vertex2sv,
- __glXDispSwap_Vertex3dv,
- __glXDispSwap_Vertex3fv,
- __glXDispSwap_Vertex3iv,
- __glXDispSwap_Vertex3sv,
- __glXDispSwap_Vertex4dv,
- __glXDispSwap_Vertex4fv,
- __glXDispSwap_Vertex4iv,
- __glXDispSwap_Vertex4sv,
- __glXDispSwap_ClipPlane,
- __glXDispSwap_ColorMaterial,
- __glXDispSwap_CullFace,
- __glXDispSwap_Fogf,
- __glXDispSwap_Fogfv,
- __glXDispSwap_Fogi,
- __glXDispSwap_Fogiv,
- __glXDispSwap_FrontFace,
- __glXDispSwap_Hint,
- __glXDispSwap_Lightf,
- __glXDispSwap_Lightfv,
- __glXDispSwap_Lighti,
- __glXDispSwap_Lightiv,
- __glXDispSwap_LightModelf,
- __glXDispSwap_LightModelfv,
- __glXDispSwap_LightModeli,
- __glXDispSwap_LightModeliv,
- __glXDispSwap_LineStipple,
- __glXDispSwap_LineWidth,
- __glXDispSwap_Materialf,
- __glXDispSwap_Materialfv,
- __glXDispSwap_Materiali,
- __glXDispSwap_Materialiv,
- __glXDispSwap_PointSize,
- __glXDispSwap_PolygonMode,
- __glXDispSwap_PolygonStipple,
- __glXDispSwap_Scissor,
- __glXDispSwap_ShadeModel,
- __glXDispSwap_TexParameterf,
- __glXDispSwap_TexParameterfv,
- __glXDispSwap_TexParameteri,
- __glXDispSwap_TexParameteriv,
- __glXDispSwap_TexImage1D,
- __glXDispSwap_TexImage2D,
- __glXDispSwap_TexEnvf,
- __glXDispSwap_TexEnvfv,
- __glXDispSwap_TexEnvi,
- __glXDispSwap_TexEnviv,
- __glXDispSwap_TexGend,
- __glXDispSwap_TexGendv,
- __glXDispSwap_TexGenf,
- __glXDispSwap_TexGenfv,
- __glXDispSwap_TexGeni,
- __glXDispSwap_TexGeniv,
- __glXDispSwap_InitNames,
- __glXDispSwap_LoadName,
- __glXDispSwap_PassThrough,
- __glXDispSwap_PopName,
- __glXDispSwap_PushName,
- __glXDispSwap_DrawBuffer,
- __glXDispSwap_Clear,
- __glXDispSwap_ClearAccum,
- __glXDispSwap_ClearIndex,
- __glXDispSwap_ClearColor,
- __glXDispSwap_ClearStencil,
- __glXDispSwap_ClearDepth,
- __glXDispSwap_StencilMask,
- __glXDispSwap_ColorMask,
- __glXDispSwap_DepthMask,
- __glXDispSwap_IndexMask,
- __glXDispSwap_Accum,
- __glXDispSwap_Disable,
- __glXDispSwap_Enable,
- __glXNoSuchRenderOpcode,
- __glXDispSwap_PopAttrib,
- __glXDispSwap_PushAttrib,
- __glXDispSwap_Map1d,
- __glXDispSwap_Map1f,
- __glXDispSwap_Map2d,
- __glXDispSwap_Map2f,
- __glXDispSwap_MapGrid1d,
- __glXDispSwap_MapGrid1f,
- __glXDispSwap_MapGrid2d,
- __glXDispSwap_MapGrid2f,
- __glXDispSwap_EvalCoord1dv,
- __glXDispSwap_EvalCoord1fv,
- __glXDispSwap_EvalCoord2dv,
- __glXDispSwap_EvalCoord2fv,
- __glXDispSwap_EvalMesh1,
- __glXDispSwap_EvalPoint1,
- __glXDispSwap_EvalMesh2,
- __glXDispSwap_EvalPoint2,
- __glXDispSwap_AlphaFunc,
- __glXDispSwap_BlendFunc,
- __glXDispSwap_LogicOp,
- __glXDispSwap_StencilFunc,
- __glXDispSwap_StencilOp,
- __glXDispSwap_DepthFunc,
- __glXDispSwap_PixelZoom,
- __glXDispSwap_PixelTransferf,
- __glXDispSwap_PixelTransferi,
- __glXDispSwap_PixelMapfv,
- __glXDispSwap_PixelMapuiv,
- __glXDispSwap_PixelMapusv,
- __glXDispSwap_ReadBuffer,
- __glXDispSwap_CopyPixels,
- __glXDispSwap_DrawPixels,
- __glXDispSwap_DepthRange,
- __glXDispSwap_Frustum,
- __glXDispSwap_LoadIdentity,
- __glXDispSwap_LoadMatrixf,
- __glXDispSwap_LoadMatrixd,
- __glXDispSwap_MatrixMode,
- __glXDispSwap_MultMatrixf,
- __glXDispSwap_MultMatrixd,
- __glXDispSwap_Ortho,
- __glXDispSwap_PopMatrix,
- __glXDispSwap_PushMatrix,
- __glXDispSwap_Rotated,
- __glXDispSwap_Rotatef,
- __glXDispSwap_Scaled,
- __glXDispSwap_Scalef,
- __glXDispSwap_Translated,
- __glXDispSwap_Translatef,
- __glXDispSwap_Viewport,
- __glXDispSwap_PolygonOffset,
- __glXDispSwap_DrawArrays,
- __glXDispSwap_Indexubv,
- __glXDispSwap_ColorSubTable,
- __glXDispSwap_CopyColorSubTable,
- __glXDispSwap_ActiveTextureARB,
- __glXDispSwap_MultiTexCoord1dvARB,
- __glXDispSwap_MultiTexCoord1fvARB,
- __glXDispSwap_MultiTexCoord1ivARB,
- __glXDispSwap_MultiTexCoord1svARB,
- __glXDispSwap_MultiTexCoord2dvARB,
- __glXDispSwap_MultiTexCoord2fvARB,
- __glXDispSwap_MultiTexCoord2ivARB,
- __glXDispSwap_MultiTexCoord2svARB,
- __glXDispSwap_MultiTexCoord3dvARB,
- __glXDispSwap_MultiTexCoord3fvARB,
- __glXDispSwap_MultiTexCoord3ivARB,
- __glXDispSwap_MultiTexCoord3svARB,
- __glXDispSwap_MultiTexCoord4dvARB,
- __glXDispSwap_MultiTexCoord4fvARB,
- __glXDispSwap_MultiTexCoord4ivARB,
- __glXDispSwap_MultiTexCoord4svARB,
+ __glXNoSuchRenderOpcode,
+ __glXDispSwap_CallList,
+ __glXDispSwap_CallLists,
+ __glXDispSwap_ListBase,
+ __glXDispSwap_Begin,
+ __glXDispSwap_Bitmap,
+ __glXDispSwap_Color3bv,
+ __glXDispSwap_Color3dv,
+ __glXDispSwap_Color3fv,
+ __glXDispSwap_Color3iv,
+ __glXDispSwap_Color3sv,
+ __glXDispSwap_Color3ubv,
+ __glXDispSwap_Color3uiv,
+ __glXDispSwap_Color3usv,
+ __glXDispSwap_Color4bv,
+ __glXDispSwap_Color4dv,
+ __glXDispSwap_Color4fv,
+ __glXDispSwap_Color4iv,
+ __glXDispSwap_Color4sv,
+ __glXDispSwap_Color4ubv,
+ __glXDispSwap_Color4uiv,
+ __glXDispSwap_Color4usv,
+ __glXDispSwap_EdgeFlagv,
+ __glXDispSwap_End,
+ __glXDispSwap_Indexdv,
+ __glXDispSwap_Indexfv,
+ __glXDispSwap_Indexiv,
+ __glXDispSwap_Indexsv,
+ __glXDispSwap_Normal3bv,
+ __glXDispSwap_Normal3dv,
+ __glXDispSwap_Normal3fv,
+ __glXDispSwap_Normal3iv,
+ __glXDispSwap_Normal3sv,
+ __glXDispSwap_RasterPos2dv,
+ __glXDispSwap_RasterPos2fv,
+ __glXDispSwap_RasterPos2iv,
+ __glXDispSwap_RasterPos2sv,
+ __glXDispSwap_RasterPos3dv,
+ __glXDispSwap_RasterPos3fv,
+ __glXDispSwap_RasterPos3iv,
+ __glXDispSwap_RasterPos3sv,
+ __glXDispSwap_RasterPos4dv,
+ __glXDispSwap_RasterPos4fv,
+ __glXDispSwap_RasterPos4iv,
+ __glXDispSwap_RasterPos4sv,
+ __glXDispSwap_Rectdv,
+ __glXDispSwap_Rectfv,
+ __glXDispSwap_Rectiv,
+ __glXDispSwap_Rectsv,
+ __glXDispSwap_TexCoord1dv,
+ __glXDispSwap_TexCoord1fv,
+ __glXDispSwap_TexCoord1iv,
+ __glXDispSwap_TexCoord1sv,
+ __glXDispSwap_TexCoord2dv,
+ __glXDispSwap_TexCoord2fv,
+ __glXDispSwap_TexCoord2iv,
+ __glXDispSwap_TexCoord2sv,
+ __glXDispSwap_TexCoord3dv,
+ __glXDispSwap_TexCoord3fv,
+ __glXDispSwap_TexCoord3iv,
+ __glXDispSwap_TexCoord3sv,
+ __glXDispSwap_TexCoord4dv,
+ __glXDispSwap_TexCoord4fv,
+ __glXDispSwap_TexCoord4iv,
+ __glXDispSwap_TexCoord4sv,
+ __glXDispSwap_Vertex2dv,
+ __glXDispSwap_Vertex2fv,
+ __glXDispSwap_Vertex2iv,
+ __glXDispSwap_Vertex2sv,
+ __glXDispSwap_Vertex3dv,
+ __glXDispSwap_Vertex3fv,
+ __glXDispSwap_Vertex3iv,
+ __glXDispSwap_Vertex3sv,
+ __glXDispSwap_Vertex4dv,
+ __glXDispSwap_Vertex4fv,
+ __glXDispSwap_Vertex4iv,
+ __glXDispSwap_Vertex4sv,
+ __glXDispSwap_ClipPlane,
+ __glXDispSwap_ColorMaterial,
+ __glXDispSwap_CullFace,
+ __glXDispSwap_Fogf,
+ __glXDispSwap_Fogfv,
+ __glXDispSwap_Fogi,
+ __glXDispSwap_Fogiv,
+ __glXDispSwap_FrontFace,
+ __glXDispSwap_Hint,
+ __glXDispSwap_Lightf,
+ __glXDispSwap_Lightfv,
+ __glXDispSwap_Lighti,
+ __glXDispSwap_Lightiv,
+ __glXDispSwap_LightModelf,
+ __glXDispSwap_LightModelfv,
+ __glXDispSwap_LightModeli,
+ __glXDispSwap_LightModeliv,
+ __glXDispSwap_LineStipple,
+ __glXDispSwap_LineWidth,
+ __glXDispSwap_Materialf,
+ __glXDispSwap_Materialfv,
+ __glXDispSwap_Materiali,
+ __glXDispSwap_Materialiv,
+ __glXDispSwap_PointSize,
+ __glXDispSwap_PolygonMode,
+ __glXDispSwap_PolygonStipple,
+ __glXDispSwap_Scissor,
+ __glXDispSwap_ShadeModel,
+ __glXDispSwap_TexParameterf,
+ __glXDispSwap_TexParameterfv,
+ __glXDispSwap_TexParameteri,
+ __glXDispSwap_TexParameteriv,
+ __glXDispSwap_TexImage1D,
+ __glXDispSwap_TexImage2D,
+ __glXDispSwap_TexEnvf,
+ __glXDispSwap_TexEnvfv,
+ __glXDispSwap_TexEnvi,
+ __glXDispSwap_TexEnviv,
+ __glXDispSwap_TexGend,
+ __glXDispSwap_TexGendv,
+ __glXDispSwap_TexGenf,
+ __glXDispSwap_TexGenfv,
+ __glXDispSwap_TexGeni,
+ __glXDispSwap_TexGeniv,
+ __glXDispSwap_InitNames,
+ __glXDispSwap_LoadName,
+ __glXDispSwap_PassThrough,
+ __glXDispSwap_PopName,
+ __glXDispSwap_PushName,
+ __glXDispSwap_DrawBuffer,
+ __glXDispSwap_Clear,
+ __glXDispSwap_ClearAccum,
+ __glXDispSwap_ClearIndex,
+ __glXDispSwap_ClearColor,
+ __glXDispSwap_ClearStencil,
+ __glXDispSwap_ClearDepth,
+ __glXDispSwap_StencilMask,
+ __glXDispSwap_ColorMask,
+ __glXDispSwap_DepthMask,
+ __glXDispSwap_IndexMask,
+ __glXDispSwap_Accum,
+ __glXDispSwap_Disable,
+ __glXDispSwap_Enable,
+ __glXNoSuchRenderOpcode,
+ __glXDispSwap_PopAttrib,
+ __glXDispSwap_PushAttrib,
+ __glXDispSwap_Map1d,
+ __glXDispSwap_Map1f,
+ __glXDispSwap_Map2d,
+ __glXDispSwap_Map2f,
+ __glXDispSwap_MapGrid1d,
+ __glXDispSwap_MapGrid1f,
+ __glXDispSwap_MapGrid2d,
+ __glXDispSwap_MapGrid2f,
+ __glXDispSwap_EvalCoord1dv,
+ __glXDispSwap_EvalCoord1fv,
+ __glXDispSwap_EvalCoord2dv,
+ __glXDispSwap_EvalCoord2fv,
+ __glXDispSwap_EvalMesh1,
+ __glXDispSwap_EvalPoint1,
+ __glXDispSwap_EvalMesh2,
+ __glXDispSwap_EvalPoint2,
+ __glXDispSwap_AlphaFunc,
+ __glXDispSwap_BlendFunc,
+ __glXDispSwap_LogicOp,
+ __glXDispSwap_StencilFunc,
+ __glXDispSwap_StencilOp,
+ __glXDispSwap_DepthFunc,
+ __glXDispSwap_PixelZoom,
+ __glXDispSwap_PixelTransferf,
+ __glXDispSwap_PixelTransferi,
+ __glXDispSwap_PixelMapfv,
+ __glXDispSwap_PixelMapuiv,
+ __glXDispSwap_PixelMapusv,
+ __glXDispSwap_ReadBuffer,
+ __glXDispSwap_CopyPixels,
+ __glXDispSwap_DrawPixels,
+ __glXDispSwap_DepthRange,
+ __glXDispSwap_Frustum,
+ __glXDispSwap_LoadIdentity,
+ __glXDispSwap_LoadMatrixf,
+ __glXDispSwap_LoadMatrixd,
+ __glXDispSwap_MatrixMode,
+ __glXDispSwap_MultMatrixf,
+ __glXDispSwap_MultMatrixd,
+ __glXDispSwap_Ortho,
+ __glXDispSwap_PopMatrix,
+ __glXDispSwap_PushMatrix,
+ __glXDispSwap_Rotated,
+ __glXDispSwap_Rotatef,
+ __glXDispSwap_Scaled,
+ __glXDispSwap_Scalef,
+ __glXDispSwap_Translated,
+ __glXDispSwap_Translatef,
+ __glXDispSwap_Viewport,
+ __glXDispSwap_PolygonOffset,
+ __glXDispSwap_DrawArrays,
+ __glXDispSwap_Indexubv,
+ __glXDispSwap_ColorSubTable,
+ __glXDispSwap_CopyColorSubTable,
+ __glXDispSwap_ActiveTextureARB,
+ __glXDispSwap_MultiTexCoord1dvARB,
+ __glXDispSwap_MultiTexCoord1fvARB,
+ __glXDispSwap_MultiTexCoord1ivARB,
+ __glXDispSwap_MultiTexCoord1svARB,
+ __glXDispSwap_MultiTexCoord2dvARB,
+ __glXDispSwap_MultiTexCoord2fvARB,
+ __glXDispSwap_MultiTexCoord2ivARB,
+ __glXDispSwap_MultiTexCoord2svARB,
+ __glXDispSwap_MultiTexCoord3dvARB,
+ __glXDispSwap_MultiTexCoord3fvARB,
+ __glXDispSwap_MultiTexCoord3ivARB,
+ __glXDispSwap_MultiTexCoord3svARB,
+ __glXDispSwap_MultiTexCoord4dvARB,
+ __glXDispSwap_MultiTexCoord4fvARB,
+ __glXDispSwap_MultiTexCoord4ivARB,
+ __glXDispSwap_MultiTexCoord4svARB,
};
-__GLXRenderSwapInfo __glXSwapRenderTable_EXT[] =
-{
- {4, 4, NULL}, /* X_GLrop_BlendColorEXT */
- {4, 1, NULL}, /* X_GLrop_BlendEquationEXT */
- {4, 2, NULL}, /* X_GLrop_PolygonOffsetEXT */
- {4, 0, __glXDispSwap_TexSubImage1D}, /* X_GLrop_TexSubImage1DEXT */
- {4, 0, __glXDispSwap_TexSubImage2D}, /* X_GLrop_TexSubImage2DEXT */
- {4, 0, __glXDispSwap_ConvolutionFilter1D}, /* X_GLrop_ConvolutionFilter1DEXT */
- {4, 0, __glXDispSwap_ConvolutionFilter2D}, /* X_GLrop_ConvolutionFilter2DEXT */
- {4, 3, NULL}, /* X_GLrop_ConvolutionParameterfEXT */
- {4, 0, __glXDispSwap_ConvolutionParameterfv}, /* X_GLrop_ConvolutionParameterfvEXT */
- {4, 3, NULL}, /* X_GLrop_ConvolutionParameteriEXT */
- {4, 0, __glXDispSwap_ConvolutionParameteriv}, /* X_GLrop_ConvolutionParameterivEXT */
- {4, 0, __glXDispSwap_CopyConvolutionFilter1D}, /* X_GLrop_CopyConvolutionFilter1DEXT */
- {4, 0, __glXDispSwap_CopyConvolutionFilter2D}, /* X_GLrop_CopyConvolutionFilter2DEXT */
- {4, 0, __glXDispSwap_SeparableFilter2D}, /* X_GLrop_SeparableFilter2DEXT */
- {4, 3, NULL}, /* X_GLrop_HistogramEXT */
- {4, 2, NULL}, /* X_GLrop_MinmaxEXT */
- {4, 1, NULL}, /* X_GLrop_ResetHistogramEXT */
- {4, 1, NULL}, /* X_GLrop_ResetMinmaxEXT */
- {4, 0, __glXDispSwap_TexImage3D}, /* X_GLrop_TexImage3DEXT */
- {4, 0, __glXDispSwap_TexSubImage3D}, /* X_GLrop_TexSubImage3DEXT */
- {4, 0, __glXDispSwap_DrawArrays}, /* X_GLrop_DrawArraysEXT */
- {4, 2, NULL}, /* X_GLrop_BindTextureEXT */
- {4, 0, __glXDispSwap_PrioritizeTextures}, /* X_GLrop_PrioritizeTexturesEXT */
- {4, 0, __glXDispSwap_CopyTexImage1D}, /* X_GLrop_CopyTexImage1DEXT */
- {4, 0, __glXDispSwap_CopyTexImage2D}, /* X_GLrop_CopyTexImage2DEXT */
- {4, 0, __glXDispSwap_CopyTexSubImage1D}, /* X_GLrop_CopyTexSubImage1DEXT */
- {4, 0, __glXDispSwap_CopyTexSubImage2D}, /* X_GLrop_CopyTexSubImage2DEXT */
- {4, 0, __glXDispSwap_CopyTexSubImage3D}, /* X_GLrop_CopyTexSubImage3DEXT */
+__GLXRenderSwapInfo __glXSwapRenderTable_EXT[] = {
+ {4, 4, NULL}, /* X_GLrop_BlendColorEXT */
+ {4, 1, NULL}, /* X_GLrop_BlendEquationEXT */
+ {4, 2, NULL}, /* X_GLrop_PolygonOffsetEXT */
+ {4, 0, __glXDispSwap_TexSubImage1D}, /* X_GLrop_TexSubImage1DEXT */
+ {4, 0, __glXDispSwap_TexSubImage2D}, /* X_GLrop_TexSubImage2DEXT */
+ {4, 0, __glXDispSwap_ConvolutionFilter1D}, /* X_GLrop_ConvolutionFilter1DEXT */
+ {4, 0, __glXDispSwap_ConvolutionFilter2D}, /* X_GLrop_ConvolutionFilter2DEXT */
+ {4, 3, NULL}, /* X_GLrop_ConvolutionParameterfEXT */
+ {4, 0, __glXDispSwap_ConvolutionParameterfv}, /* X_GLrop_ConvolutionParameterfvEXT */
+ {4, 3, NULL}, /* X_GLrop_ConvolutionParameteriEXT */
+ {4, 0, __glXDispSwap_ConvolutionParameteriv}, /* X_GLrop_ConvolutionParameterivEXT */
+ {4, 0, __glXDispSwap_CopyConvolutionFilter1D}, /* X_GLrop_CopyConvolutionFilter1DEXT */
+ {4, 0, __glXDispSwap_CopyConvolutionFilter2D}, /* X_GLrop_CopyConvolutionFilter2DEXT */
+ {4, 0, __glXDispSwap_SeparableFilter2D}, /* X_GLrop_SeparableFilter2DEXT */
+ {4, 3, NULL}, /* X_GLrop_HistogramEXT */
+ {4, 2, NULL}, /* X_GLrop_MinmaxEXT */
+ {4, 1, NULL}, /* X_GLrop_ResetHistogramEXT */
+ {4, 1, NULL}, /* X_GLrop_ResetMinmaxEXT */
+ {4, 0, __glXDispSwap_TexImage3D}, /* X_GLrop_TexImage3DEXT */
+ {4, 0, __glXDispSwap_TexSubImage3D}, /* X_GLrop_TexSubImage3DEXT */
+ {4, 0, __glXDispSwap_DrawArrays}, /* X_GLrop_DrawArraysEXT */
+ {4, 2, NULL}, /* X_GLrop_BindTextureEXT */
+ {4, 0, __glXDispSwap_PrioritizeTextures}, /* X_GLrop_PrioritizeTexturesEXT */
+ {4, 0, __glXDispSwap_CopyTexImage1D}, /* X_GLrop_CopyTexImage1DEXT */
+ {4, 0, __glXDispSwap_CopyTexImage2D}, /* X_GLrop_CopyTexImage2DEXT */
+ {4, 0, __glXDispSwap_CopyTexSubImage1D}, /* X_GLrop_CopyTexSubImage1DEXT */
+ {4, 0, __glXDispSwap_CopyTexSubImage2D}, /* X_GLrop_CopyTexSubImage2DEXT */
+ {4, 0, __glXDispSwap_CopyTexSubImage3D}, /* X_GLrop_CopyTexSubImage3DEXT */
};
-
diff --git a/xorg-server/hw/dmx/glxProxy/g_disptab.h b/xorg-server/hw/dmx/glxProxy/g_disptab.h
index c497c88e5..530338798 100644
--- a/xorg-server/hw/dmx/glxProxy/g_disptab.h
+++ b/xorg-server/hw/dmx/glxProxy/g_disptab.h
@@ -31,633 +31,637 @@
* Silicon Graphics, Inc.
*/
-extern int __glXRender(__GLXclientState*, GLbyte*);
-extern int __glXRenderLarge(__GLXclientState*, GLbyte*);
-extern int __glXSendLargeCommand(__GLXclientState *cl, GLXContextTag contextTag);
-extern int __glXCreateContext(__GLXclientState*, GLbyte*);
-extern int __glXCreateNewContext(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDestroyContext(__GLXclientState*, GLbyte*);
-extern int __glXMakeCurrent(__GLXclientState*, GLbyte*);
-extern int __glXMakeContextCurrent(__GLXclientState*, GLbyte*);
-extern int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDestroyPbuffer(__GLXclientState *cl, GLbyte *pc);
-extern int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc);
-extern int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc);
-extern int __glXIsDirect(__GLXclientState*, GLbyte*);
-extern int __glXQueryVersion(__GLXclientState*, GLbyte*);
-extern int __glXWaitGL(__GLXclientState*, GLbyte*);
-extern int __glXWaitX(__GLXclientState*, GLbyte*);
-extern int __glXCopyContext(__GLXclientState*, GLbyte*);
-extern int __glXSwapBuffers(__GLXclientState*, GLbyte*);
-extern int __glXUseXFont(__GLXclientState*, GLbyte*);
-extern int __glXCreateGLXPixmap(__GLXclientState*, GLbyte*);
-extern int __glXCreatePixmap(__GLXclientState *cl, GLbyte *pc);
-extern int __glXGetVisualConfigs(__GLXclientState*, GLbyte*);
-extern int __glXDestroyGLXPixmap(__GLXclientState*, GLbyte*);
-extern int __glXVendorPrivate(__GLXclientState*, GLbyte*);
-extern int __glXVendorPrivateWithReply(__GLXclientState*, GLbyte*);
-extern int __glXQueryExtensionsString(__GLXclientState*, GLbyte*);
-extern int __glXQueryServerString(__GLXclientState*, GLbyte*);
-extern int __glXClientInfo(__GLXclientState*, GLbyte*);
-extern int __glXGetFBConfigs(__GLXclientState*, GLbyte*);
-extern int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDestroyWindow(__GLXclientState *cl, GLbyte *pc);
-extern int __glXQueryContext(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDisp_NewList(__GLXclientState*, GLbyte*);
-extern int __glXDisp_EndList(__GLXclientState*, GLbyte*);
-extern int __glXDisp_DeleteLists(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GenLists(__GLXclientState*, GLbyte*);
-extern int __glXDisp_FeedbackBuffer(__GLXclientState*, GLbyte*);
-extern int __glXDisp_SelectBuffer(__GLXclientState*, GLbyte*);
-extern int __glXDisp_RenderMode(__GLXclientState*, GLbyte*);
-extern int __glXDisp_Finish(__GLXclientState*, GLbyte*);
-extern int __glXDisp_PixelStoref(__GLXclientState*, GLbyte*);
-extern int __glXDisp_PixelStorei(__GLXclientState*, GLbyte*);
-extern int __glXDisp_ReadPixels(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetBooleanv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetClipPlane(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetDoublev(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetError(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetFloatv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetIntegerv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetLightfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetLightiv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetMapdv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetMapfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetMapiv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetMaterialfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetMaterialiv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetPixelMapfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetPixelMapuiv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetPixelMapusv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetPolygonStipple(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetString(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexEnvfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexEnviv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexGendv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexGenfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexGeniv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexImage(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexLevelParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetTexLevelParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_IsEnabled(__GLXclientState*, GLbyte*);
-extern int __glXDisp_IsList(__GLXclientState*, GLbyte*);
-extern int __glXDisp_Flush(__GLXclientState*, GLbyte*);
-extern int __glXDisp_AreTexturesResident(__GLXclientState*, GLbyte*);
-extern int __glXDisp_DeleteTextures(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GenTextures(__GLXclientState*, GLbyte*);
-extern int __glXDisp_IsTexture(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetColorTable(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetColorTableParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetColorTableParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetConvolutionFilter(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetConvolutionParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetConvolutionParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetSeparableFilter(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetHistogram(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetHistogramParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetHistogramParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetMinmax(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetMinmaxParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDisp_GetMinmaxParameteriv(__GLXclientState*, GLbyte*);
+extern int __glXRender(__GLXclientState *, GLbyte *);
+extern int __glXRenderLarge(__GLXclientState *, GLbyte *);
+extern int __glXSendLargeCommand(__GLXclientState * cl,
+ GLXContextTag contextTag);
+extern int __glXCreateContext(__GLXclientState *, GLbyte *);
+extern int __glXCreateNewContext(__GLXclientState * cl, GLbyte * pc);
+extern int __glXDestroyContext(__GLXclientState *, GLbyte *);
+extern int __glXMakeCurrent(__GLXclientState *, GLbyte *);
+extern int __glXMakeContextCurrent(__GLXclientState *, GLbyte *);
+extern int __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc);
+extern int __glXDestroyPbuffer(__GLXclientState * cl, GLbyte * pc);
+extern int __glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc);
+extern int __glXChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc);
+extern int __glXIsDirect(__GLXclientState *, GLbyte *);
+extern int __glXQueryVersion(__GLXclientState *, GLbyte *);
+extern int __glXWaitGL(__GLXclientState *, GLbyte *);
+extern int __glXWaitX(__GLXclientState *, GLbyte *);
+extern int __glXCopyContext(__GLXclientState *, GLbyte *);
+extern int __glXSwapBuffers(__GLXclientState *, GLbyte *);
+extern int __glXUseXFont(__GLXclientState *, GLbyte *);
+extern int __glXCreateGLXPixmap(__GLXclientState *, GLbyte *);
+extern int __glXCreatePixmap(__GLXclientState * cl, GLbyte * pc);
+extern int __glXGetVisualConfigs(__GLXclientState *, GLbyte *);
+extern int __glXDestroyGLXPixmap(__GLXclientState *, GLbyte *);
+extern int __glXVendorPrivate(__GLXclientState *, GLbyte *);
+extern int __glXVendorPrivateWithReply(__GLXclientState *, GLbyte *);
+extern int __glXQueryExtensionsString(__GLXclientState *, GLbyte *);
+extern int __glXQueryServerString(__GLXclientState *, GLbyte *);
+extern int __glXClientInfo(__GLXclientState *, GLbyte *);
+extern int __glXGetFBConfigs(__GLXclientState *, GLbyte *);
+extern int __glXCreateWindow(__GLXclientState * cl, GLbyte * pc);
+extern int __glXDestroyWindow(__GLXclientState * cl, GLbyte * pc);
+extern int __glXQueryContext(__GLXclientState * cl, GLbyte * pc);
+extern int __glXDisp_NewList(__GLXclientState *, GLbyte *);
+extern int __glXDisp_EndList(__GLXclientState *, GLbyte *);
+extern int __glXDisp_DeleteLists(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GenLists(__GLXclientState *, GLbyte *);
+extern int __glXDisp_FeedbackBuffer(__GLXclientState *, GLbyte *);
+extern int __glXDisp_SelectBuffer(__GLXclientState *, GLbyte *);
+extern int __glXDisp_RenderMode(__GLXclientState *, GLbyte *);
+extern int __glXDisp_Finish(__GLXclientState *, GLbyte *);
+extern int __glXDisp_PixelStoref(__GLXclientState *, GLbyte *);
+extern int __glXDisp_PixelStorei(__GLXclientState *, GLbyte *);
+extern int __glXDisp_ReadPixels(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetBooleanv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetClipPlane(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetDoublev(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetError(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetFloatv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetIntegerv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetLightfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetLightiv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetMapdv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetMapfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetMapiv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetMaterialfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetMaterialiv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetPixelMapfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetPixelMapuiv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetPixelMapusv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetPolygonStipple(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetString(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexEnvfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexEnviv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexGendv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexGenfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexGeniv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexImage(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexParameteriv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexLevelParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetTexLevelParameteriv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_IsEnabled(__GLXclientState *, GLbyte *);
+extern int __glXDisp_IsList(__GLXclientState *, GLbyte *);
+extern int __glXDisp_Flush(__GLXclientState *, GLbyte *);
+extern int __glXDisp_AreTexturesResident(__GLXclientState *, GLbyte *);
+extern int __glXDisp_DeleteTextures(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GenTextures(__GLXclientState *, GLbyte *);
+extern int __glXDisp_IsTexture(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetColorTable(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetColorTableParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetColorTableParameteriv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetConvolutionFilter(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetConvolutionParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetConvolutionParameteriv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetSeparableFilter(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetHistogram(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetHistogramParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetHistogramParameteriv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetMinmax(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetMinmaxParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDisp_GetMinmaxParameteriv(__GLXclientState *, GLbyte *);
-extern void __glXDisp_CallList(GLbyte*);
-extern void __glXDisp_CallLists(GLbyte*);
-extern void __glXDisp_ListBase(GLbyte*);
-extern void __glXDisp_Begin(GLbyte*);
-extern void __glXDisp_Bitmap(GLbyte*);
-extern void __glXDisp_Color3bv(GLbyte*);
-extern void __glXDisp_Color3dv(GLbyte*);
-extern void __glXDisp_Color3fv(GLbyte*);
-extern void __glXDisp_Color3iv(GLbyte*);
-extern void __glXDisp_Color3sv(GLbyte*);
-extern void __glXDisp_Color3ubv(GLbyte*);
-extern void __glXDisp_Color3uiv(GLbyte*);
-extern void __glXDisp_Color3usv(GLbyte*);
-extern void __glXDisp_Color4bv(GLbyte*);
-extern void __glXDisp_Color4dv(GLbyte*);
-extern void __glXDisp_Color4fv(GLbyte*);
-extern void __glXDisp_Color4iv(GLbyte*);
-extern void __glXDisp_Color4sv(GLbyte*);
-extern void __glXDisp_Color4ubv(GLbyte*);
-extern void __glXDisp_Color4uiv(GLbyte*);
-extern void __glXDisp_Color4usv(GLbyte*);
-extern void __glXDisp_EdgeFlagv(GLbyte*);
-extern void __glXDisp_End(GLbyte*);
-extern void __glXDisp_Indexdv(GLbyte*);
-extern void __glXDisp_Indexfv(GLbyte*);
-extern void __glXDisp_Indexiv(GLbyte*);
-extern void __glXDisp_Indexsv(GLbyte*);
-extern void __glXDisp_Normal3bv(GLbyte*);
-extern void __glXDisp_Normal3dv(GLbyte*);
-extern void __glXDisp_Normal3fv(GLbyte*);
-extern void __glXDisp_Normal3iv(GLbyte*);
-extern void __glXDisp_Normal3sv(GLbyte*);
-extern void __glXDisp_RasterPos2dv(GLbyte*);
-extern void __glXDisp_RasterPos2fv(GLbyte*);
-extern void __glXDisp_RasterPos2iv(GLbyte*);
-extern void __glXDisp_RasterPos2sv(GLbyte*);
-extern void __glXDisp_RasterPos3dv(GLbyte*);
-extern void __glXDisp_RasterPos3fv(GLbyte*);
-extern void __glXDisp_RasterPos3iv(GLbyte*);
-extern void __glXDisp_RasterPos3sv(GLbyte*);
-extern void __glXDisp_RasterPos4dv(GLbyte*);
-extern void __glXDisp_RasterPos4fv(GLbyte*);
-extern void __glXDisp_RasterPos4iv(GLbyte*);
-extern void __glXDisp_RasterPos4sv(GLbyte*);
-extern void __glXDisp_Rectdv(GLbyte*);
-extern void __glXDisp_Rectfv(GLbyte*);
-extern void __glXDisp_Rectiv(GLbyte*);
-extern void __glXDisp_Rectsv(GLbyte*);
-extern void __glXDisp_TexCoord1dv(GLbyte*);
-extern void __glXDisp_TexCoord1fv(GLbyte*);
-extern void __glXDisp_TexCoord1iv(GLbyte*);
-extern void __glXDisp_TexCoord1sv(GLbyte*);
-extern void __glXDisp_TexCoord2dv(GLbyte*);
-extern void __glXDisp_TexCoord2fv(GLbyte*);
-extern void __glXDisp_TexCoord2iv(GLbyte*);
-extern void __glXDisp_TexCoord2sv(GLbyte*);
-extern void __glXDisp_TexCoord3dv(GLbyte*);
-extern void __glXDisp_TexCoord3fv(GLbyte*);
-extern void __glXDisp_TexCoord3iv(GLbyte*);
-extern void __glXDisp_TexCoord3sv(GLbyte*);
-extern void __glXDisp_TexCoord4dv(GLbyte*);
-extern void __glXDisp_TexCoord4fv(GLbyte*);
-extern void __glXDisp_TexCoord4iv(GLbyte*);
-extern void __glXDisp_TexCoord4sv(GLbyte*);
-extern void __glXDisp_Vertex2dv(GLbyte*);
-extern void __glXDisp_Vertex2fv(GLbyte*);
-extern void __glXDisp_Vertex2iv(GLbyte*);
-extern void __glXDisp_Vertex2sv(GLbyte*);
-extern void __glXDisp_Vertex3dv(GLbyte*);
-extern void __glXDisp_Vertex3fv(GLbyte*);
-extern void __glXDisp_Vertex3iv(GLbyte*);
-extern void __glXDisp_Vertex3sv(GLbyte*);
-extern void __glXDisp_Vertex4dv(GLbyte*);
-extern void __glXDisp_Vertex4fv(GLbyte*);
-extern void __glXDisp_Vertex4iv(GLbyte*);
-extern void __glXDisp_Vertex4sv(GLbyte*);
-extern void __glXDisp_ClipPlane(GLbyte*);
-extern void __glXDisp_ColorMaterial(GLbyte*);
-extern void __glXDisp_CullFace(GLbyte*);
-extern void __glXDisp_Fogf(GLbyte*);
-extern void __glXDisp_Fogfv(GLbyte*);
-extern void __glXDisp_Fogi(GLbyte*);
-extern void __glXDisp_Fogiv(GLbyte*);
-extern void __glXDisp_FrontFace(GLbyte*);
-extern void __glXDisp_Hint(GLbyte*);
-extern void __glXDisp_Lightf(GLbyte*);
-extern void __glXDisp_Lightfv(GLbyte*);
-extern void __glXDisp_Lighti(GLbyte*);
-extern void __glXDisp_Lightiv(GLbyte*);
-extern void __glXDisp_LightModelf(GLbyte*);
-extern void __glXDisp_LightModelfv(GLbyte*);
-extern void __glXDisp_LightModeli(GLbyte*);
-extern void __glXDisp_LightModeliv(GLbyte*);
-extern void __glXDisp_LineStipple(GLbyte*);
-extern void __glXDisp_LineWidth(GLbyte*);
-extern void __glXDisp_Materialf(GLbyte*);
-extern void __glXDisp_Materialfv(GLbyte*);
-extern void __glXDisp_Materiali(GLbyte*);
-extern void __glXDisp_Materialiv(GLbyte*);
-extern void __glXDisp_PointSize(GLbyte*);
-extern void __glXDisp_PolygonMode(GLbyte*);
-extern void __glXDisp_PolygonStipple(GLbyte*);
-extern void __glXDisp_Scissor(GLbyte*);
-extern void __glXDisp_ShadeModel(GLbyte*);
-extern void __glXDisp_TexParameterf(GLbyte*);
-extern void __glXDisp_TexParameterfv(GLbyte*);
-extern void __glXDisp_TexParameteri(GLbyte*);
-extern void __glXDisp_TexParameteriv(GLbyte*);
-extern void __glXDisp_TexImage1D(GLbyte*);
-extern void __glXDisp_TexImage2D(GLbyte*);
-extern void __glXDisp_TexEnvf(GLbyte*);
-extern void __glXDisp_TexEnvfv(GLbyte*);
-extern void __glXDisp_TexEnvi(GLbyte*);
-extern void __glXDisp_TexEnviv(GLbyte*);
-extern void __glXDisp_TexGend(GLbyte*);
-extern void __glXDisp_TexGendv(GLbyte*);
-extern void __glXDisp_TexGenf(GLbyte*);
-extern void __glXDisp_TexGenfv(GLbyte*);
-extern void __glXDisp_TexGeni(GLbyte*);
-extern void __glXDisp_TexGeniv(GLbyte*);
-extern void __glXDisp_InitNames(GLbyte*);
-extern void __glXDisp_LoadName(GLbyte*);
-extern void __glXDisp_PassThrough(GLbyte*);
-extern void __glXDisp_PopName(GLbyte*);
-extern void __glXDisp_PushName(GLbyte*);
-extern void __glXDisp_DrawBuffer(GLbyte*);
-extern void __glXDisp_Clear(GLbyte*);
-extern void __glXDisp_ClearAccum(GLbyte*);
-extern void __glXDisp_ClearIndex(GLbyte*);
-extern void __glXDisp_ClearColor(GLbyte*);
-extern void __glXDisp_ClearStencil(GLbyte*);
-extern void __glXDisp_ClearDepth(GLbyte*);
-extern void __glXDisp_StencilMask(GLbyte*);
-extern void __glXDisp_ColorMask(GLbyte*);
-extern void __glXDisp_DepthMask(GLbyte*);
-extern void __glXDisp_IndexMask(GLbyte*);
-extern void __glXDisp_Accum(GLbyte*);
-extern void __glXDisp_Disable(GLbyte*);
-extern void __glXDisp_Enable(GLbyte*);
-extern void __glXDisp_PopAttrib(GLbyte*);
-extern void __glXDisp_PushAttrib(GLbyte*);
-extern void __glXDisp_Map1d(GLbyte*);
-extern void __glXDisp_Map1f(GLbyte*);
-extern void __glXDisp_Map2d(GLbyte*);
-extern void __glXDisp_Map2f(GLbyte*);
-extern void __glXDisp_MapGrid1d(GLbyte*);
-extern void __glXDisp_MapGrid1f(GLbyte*);
-extern void __glXDisp_MapGrid2d(GLbyte*);
-extern void __glXDisp_MapGrid2f(GLbyte*);
-extern void __glXDisp_EvalCoord1dv(GLbyte*);
-extern void __glXDisp_EvalCoord1fv(GLbyte*);
-extern void __glXDisp_EvalCoord2dv(GLbyte*);
-extern void __glXDisp_EvalCoord2fv(GLbyte*);
-extern void __glXDisp_EvalMesh1(GLbyte*);
-extern void __glXDisp_EvalPoint1(GLbyte*);
-extern void __glXDisp_EvalMesh2(GLbyte*);
-extern void __glXDisp_EvalPoint2(GLbyte*);
-extern void __glXDisp_AlphaFunc(GLbyte*);
-extern void __glXDisp_BlendFunc(GLbyte*);
-extern void __glXDisp_LogicOp(GLbyte*);
-extern void __glXDisp_StencilFunc(GLbyte*);
-extern void __glXDisp_StencilOp(GLbyte*);
-extern void __glXDisp_DepthFunc(GLbyte*);
-extern void __glXDisp_PixelZoom(GLbyte*);
-extern void __glXDisp_PixelTransferf(GLbyte*);
-extern void __glXDisp_PixelTransferi(GLbyte*);
-extern void __glXDisp_PixelMapfv(GLbyte*);
-extern void __glXDisp_PixelMapuiv(GLbyte*);
-extern void __glXDisp_PixelMapusv(GLbyte*);
-extern void __glXDisp_ReadBuffer(GLbyte*);
-extern void __glXDisp_CopyPixels(GLbyte*);
-extern void __glXDisp_DrawPixels(GLbyte*);
-extern void __glXDisp_DepthRange(GLbyte*);
-extern void __glXDisp_Frustum(GLbyte*);
-extern void __glXDisp_LoadIdentity(GLbyte*);
-extern void __glXDisp_LoadMatrixf(GLbyte*);
-extern void __glXDisp_LoadMatrixd(GLbyte*);
-extern void __glXDisp_MatrixMode(GLbyte*);
-extern void __glXDisp_MultMatrixf(GLbyte*);
-extern void __glXDisp_MultMatrixd(GLbyte*);
-extern void __glXDisp_Ortho(GLbyte*);
-extern void __glXDisp_PopMatrix(GLbyte*);
-extern void __glXDisp_PushMatrix(GLbyte*);
-extern void __glXDisp_Rotated(GLbyte*);
-extern void __glXDisp_Rotatef(GLbyte*);
-extern void __glXDisp_Scaled(GLbyte*);
-extern void __glXDisp_Scalef(GLbyte*);
-extern void __glXDisp_Translated(GLbyte*);
-extern void __glXDisp_Translatef(GLbyte*);
-extern void __glXDisp_Viewport(GLbyte*);
-extern void __glXDisp_PolygonOffset(GLbyte*);
-extern void __glXDisp_DrawArrays(GLbyte*);
-extern void __glXDisp_Indexubv(GLbyte*);
-extern void __glXDisp_ColorSubTable(GLbyte*);
-extern void __glXDisp_CopyColorSubTable(GLbyte*);
-extern void __glXDisp_ActiveTextureARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord1dvARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord1fvARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord1ivARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord1svARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord2dvARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord2fvARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord2ivARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord2svARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord3dvARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord3fvARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord3ivARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord3svARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord4dvARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord4fvARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord4ivARB(GLbyte*);
-extern void __glXDisp_MultiTexCoord4svARB(GLbyte*);
+extern void __glXDisp_CallList(GLbyte *);
+extern void __glXDisp_CallLists(GLbyte *);
+extern void __glXDisp_ListBase(GLbyte *);
+extern void __glXDisp_Begin(GLbyte *);
+extern void __glXDisp_Bitmap(GLbyte *);
+extern void __glXDisp_Color3bv(GLbyte *);
+extern void __glXDisp_Color3dv(GLbyte *);
+extern void __glXDisp_Color3fv(GLbyte *);
+extern void __glXDisp_Color3iv(GLbyte *);
+extern void __glXDisp_Color3sv(GLbyte *);
+extern void __glXDisp_Color3ubv(GLbyte *);
+extern void __glXDisp_Color3uiv(GLbyte *);
+extern void __glXDisp_Color3usv(GLbyte *);
+extern void __glXDisp_Color4bv(GLbyte *);
+extern void __glXDisp_Color4dv(GLbyte *);
+extern void __glXDisp_Color4fv(GLbyte *);
+extern void __glXDisp_Color4iv(GLbyte *);
+extern void __glXDisp_Color4sv(GLbyte *);
+extern void __glXDisp_Color4ubv(GLbyte *);
+extern void __glXDisp_Color4uiv(GLbyte *);
+extern void __glXDisp_Color4usv(GLbyte *);
+extern void __glXDisp_EdgeFlagv(GLbyte *);
+extern void __glXDisp_End(GLbyte *);
+extern void __glXDisp_Indexdv(GLbyte *);
+extern void __glXDisp_Indexfv(GLbyte *);
+extern void __glXDisp_Indexiv(GLbyte *);
+extern void __glXDisp_Indexsv(GLbyte *);
+extern void __glXDisp_Normal3bv(GLbyte *);
+extern void __glXDisp_Normal3dv(GLbyte *);
+extern void __glXDisp_Normal3fv(GLbyte *);
+extern void __glXDisp_Normal3iv(GLbyte *);
+extern void __glXDisp_Normal3sv(GLbyte *);
+extern void __glXDisp_RasterPos2dv(GLbyte *);
+extern void __glXDisp_RasterPos2fv(GLbyte *);
+extern void __glXDisp_RasterPos2iv(GLbyte *);
+extern void __glXDisp_RasterPos2sv(GLbyte *);
+extern void __glXDisp_RasterPos3dv(GLbyte *);
+extern void __glXDisp_RasterPos3fv(GLbyte *);
+extern void __glXDisp_RasterPos3iv(GLbyte *);
+extern void __glXDisp_RasterPos3sv(GLbyte *);
+extern void __glXDisp_RasterPos4dv(GLbyte *);
+extern void __glXDisp_RasterPos4fv(GLbyte *);
+extern void __glXDisp_RasterPos4iv(GLbyte *);
+extern void __glXDisp_RasterPos4sv(GLbyte *);
+extern void __glXDisp_Rectdv(GLbyte *);
+extern void __glXDisp_Rectfv(GLbyte *);
+extern void __glXDisp_Rectiv(GLbyte *);
+extern void __glXDisp_Rectsv(GLbyte *);
+extern void __glXDisp_TexCoord1dv(GLbyte *);
+extern void __glXDisp_TexCoord1fv(GLbyte *);
+extern void __glXDisp_TexCoord1iv(GLbyte *);
+extern void __glXDisp_TexCoord1sv(GLbyte *);
+extern void __glXDisp_TexCoord2dv(GLbyte *);
+extern void __glXDisp_TexCoord2fv(GLbyte *);
+extern void __glXDisp_TexCoord2iv(GLbyte *);
+extern void __glXDisp_TexCoord2sv(GLbyte *);
+extern void __glXDisp_TexCoord3dv(GLbyte *);
+extern void __glXDisp_TexCoord3fv(GLbyte *);
+extern void __glXDisp_TexCoord3iv(GLbyte *);
+extern void __glXDisp_TexCoord3sv(GLbyte *);
+extern void __glXDisp_TexCoord4dv(GLbyte *);
+extern void __glXDisp_TexCoord4fv(GLbyte *);
+extern void __glXDisp_TexCoord4iv(GLbyte *);
+extern void __glXDisp_TexCoord4sv(GLbyte *);
+extern void __glXDisp_Vertex2dv(GLbyte *);
+extern void __glXDisp_Vertex2fv(GLbyte *);
+extern void __glXDisp_Vertex2iv(GLbyte *);
+extern void __glXDisp_Vertex2sv(GLbyte *);
+extern void __glXDisp_Vertex3dv(GLbyte *);
+extern void __glXDisp_Vertex3fv(GLbyte *);
+extern void __glXDisp_Vertex3iv(GLbyte *);
+extern void __glXDisp_Vertex3sv(GLbyte *);
+extern void __glXDisp_Vertex4dv(GLbyte *);
+extern void __glXDisp_Vertex4fv(GLbyte *);
+extern void __glXDisp_Vertex4iv(GLbyte *);
+extern void __glXDisp_Vertex4sv(GLbyte *);
+extern void __glXDisp_ClipPlane(GLbyte *);
+extern void __glXDisp_ColorMaterial(GLbyte *);
+extern void __glXDisp_CullFace(GLbyte *);
+extern void __glXDisp_Fogf(GLbyte *);
+extern void __glXDisp_Fogfv(GLbyte *);
+extern void __glXDisp_Fogi(GLbyte *);
+extern void __glXDisp_Fogiv(GLbyte *);
+extern void __glXDisp_FrontFace(GLbyte *);
+extern void __glXDisp_Hint(GLbyte *);
+extern void __glXDisp_Lightf(GLbyte *);
+extern void __glXDisp_Lightfv(GLbyte *);
+extern void __glXDisp_Lighti(GLbyte *);
+extern void __glXDisp_Lightiv(GLbyte *);
+extern void __glXDisp_LightModelf(GLbyte *);
+extern void __glXDisp_LightModelfv(GLbyte *);
+extern void __glXDisp_LightModeli(GLbyte *);
+extern void __glXDisp_LightModeliv(GLbyte *);
+extern void __glXDisp_LineStipple(GLbyte *);
+extern void __glXDisp_LineWidth(GLbyte *);
+extern void __glXDisp_Materialf(GLbyte *);
+extern void __glXDisp_Materialfv(GLbyte *);
+extern void __glXDisp_Materiali(GLbyte *);
+extern void __glXDisp_Materialiv(GLbyte *);
+extern void __glXDisp_PointSize(GLbyte *);
+extern void __glXDisp_PolygonMode(GLbyte *);
+extern void __glXDisp_PolygonStipple(GLbyte *);
+extern void __glXDisp_Scissor(GLbyte *);
+extern void __glXDisp_ShadeModel(GLbyte *);
+extern void __glXDisp_TexParameterf(GLbyte *);
+extern void __glXDisp_TexParameterfv(GLbyte *);
+extern void __glXDisp_TexParameteri(GLbyte *);
+extern void __glXDisp_TexParameteriv(GLbyte *);
+extern void __glXDisp_TexImage1D(GLbyte *);
+extern void __glXDisp_TexImage2D(GLbyte *);
+extern void __glXDisp_TexEnvf(GLbyte *);
+extern void __glXDisp_TexEnvfv(GLbyte *);
+extern void __glXDisp_TexEnvi(GLbyte *);
+extern void __glXDisp_TexEnviv(GLbyte *);
+extern void __glXDisp_TexGend(GLbyte *);
+extern void __glXDisp_TexGendv(GLbyte *);
+extern void __glXDisp_TexGenf(GLbyte *);
+extern void __glXDisp_TexGenfv(GLbyte *);
+extern void __glXDisp_TexGeni(GLbyte *);
+extern void __glXDisp_TexGeniv(GLbyte *);
+extern void __glXDisp_InitNames(GLbyte *);
+extern void __glXDisp_LoadName(GLbyte *);
+extern void __glXDisp_PassThrough(GLbyte *);
+extern void __glXDisp_PopName(GLbyte *);
+extern void __glXDisp_PushName(GLbyte *);
+extern void __glXDisp_DrawBuffer(GLbyte *);
+extern void __glXDisp_Clear(GLbyte *);
+extern void __glXDisp_ClearAccum(GLbyte *);
+extern void __glXDisp_ClearIndex(GLbyte *);
+extern void __glXDisp_ClearColor(GLbyte *);
+extern void __glXDisp_ClearStencil(GLbyte *);
+extern void __glXDisp_ClearDepth(GLbyte *);
+extern void __glXDisp_StencilMask(GLbyte *);
+extern void __glXDisp_ColorMask(GLbyte *);
+extern void __glXDisp_DepthMask(GLbyte *);
+extern void __glXDisp_IndexMask(GLbyte *);
+extern void __glXDisp_Accum(GLbyte *);
+extern void __glXDisp_Disable(GLbyte *);
+extern void __glXDisp_Enable(GLbyte *);
+extern void __glXDisp_PopAttrib(GLbyte *);
+extern void __glXDisp_PushAttrib(GLbyte *);
+extern void __glXDisp_Map1d(GLbyte *);
+extern void __glXDisp_Map1f(GLbyte *);
+extern void __glXDisp_Map2d(GLbyte *);
+extern void __glXDisp_Map2f(GLbyte *);
+extern void __glXDisp_MapGrid1d(GLbyte *);
+extern void __glXDisp_MapGrid1f(GLbyte *);
+extern void __glXDisp_MapGrid2d(GLbyte *);
+extern void __glXDisp_MapGrid2f(GLbyte *);
+extern void __glXDisp_EvalCoord1dv(GLbyte *);
+extern void __glXDisp_EvalCoord1fv(GLbyte *);
+extern void __glXDisp_EvalCoord2dv(GLbyte *);
+extern void __glXDisp_EvalCoord2fv(GLbyte *);
+extern void __glXDisp_EvalMesh1(GLbyte *);
+extern void __glXDisp_EvalPoint1(GLbyte *);
+extern void __glXDisp_EvalMesh2(GLbyte *);
+extern void __glXDisp_EvalPoint2(GLbyte *);
+extern void __glXDisp_AlphaFunc(GLbyte *);
+extern void __glXDisp_BlendFunc(GLbyte *);
+extern void __glXDisp_LogicOp(GLbyte *);
+extern void __glXDisp_StencilFunc(GLbyte *);
+extern void __glXDisp_StencilOp(GLbyte *);
+extern void __glXDisp_DepthFunc(GLbyte *);
+extern void __glXDisp_PixelZoom(GLbyte *);
+extern void __glXDisp_PixelTransferf(GLbyte *);
+extern void __glXDisp_PixelTransferi(GLbyte *);
+extern void __glXDisp_PixelMapfv(GLbyte *);
+extern void __glXDisp_PixelMapuiv(GLbyte *);
+extern void __glXDisp_PixelMapusv(GLbyte *);
+extern void __glXDisp_ReadBuffer(GLbyte *);
+extern void __glXDisp_CopyPixels(GLbyte *);
+extern void __glXDisp_DrawPixels(GLbyte *);
+extern void __glXDisp_DepthRange(GLbyte *);
+extern void __glXDisp_Frustum(GLbyte *);
+extern void __glXDisp_LoadIdentity(GLbyte *);
+extern void __glXDisp_LoadMatrixf(GLbyte *);
+extern void __glXDisp_LoadMatrixd(GLbyte *);
+extern void __glXDisp_MatrixMode(GLbyte *);
+extern void __glXDisp_MultMatrixf(GLbyte *);
+extern void __glXDisp_MultMatrixd(GLbyte *);
+extern void __glXDisp_Ortho(GLbyte *);
+extern void __glXDisp_PopMatrix(GLbyte *);
+extern void __glXDisp_PushMatrix(GLbyte *);
+extern void __glXDisp_Rotated(GLbyte *);
+extern void __glXDisp_Rotatef(GLbyte *);
+extern void __glXDisp_Scaled(GLbyte *);
+extern void __glXDisp_Scalef(GLbyte *);
+extern void __glXDisp_Translated(GLbyte *);
+extern void __glXDisp_Translatef(GLbyte *);
+extern void __glXDisp_Viewport(GLbyte *);
+extern void __glXDisp_PolygonOffset(GLbyte *);
+extern void __glXDisp_DrawArrays(GLbyte *);
+extern void __glXDisp_Indexubv(GLbyte *);
+extern void __glXDisp_ColorSubTable(GLbyte *);
+extern void __glXDisp_CopyColorSubTable(GLbyte *);
+extern void __glXDisp_ActiveTextureARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord1dvARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord1fvARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord1ivARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord1svARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord2dvARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord2fvARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord2ivARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord2svARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord3dvARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord3fvARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord3ivARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord3svARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord4dvARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord4fvARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord4ivARB(GLbyte *);
+extern void __glXDisp_MultiTexCoord4svARB(GLbyte *);
-extern int __glXSwapRender(__GLXclientState*, GLbyte*);
-extern int __glXSwapRenderLarge(__GLXclientState*, GLbyte*);
-extern int __glXSwapCreateContext(__GLXclientState*, GLbyte*);
-extern int __glXSwapCreateNewContext(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapDestroyContext(__GLXclientState*, GLbyte*);
-extern int __glXSwapMakeCurrent(__GLXclientState*, GLbyte*);
-extern int __glXSwapMakeContextCurrent(__GLXclientState*, GLbyte*);
-extern int __glXSwapCreatePbuffer(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapDestroyPbuffer(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapIsDirect(__GLXclientState*, GLbyte*);
-extern int __glXSwapQueryVersion(__GLXclientState*, GLbyte*);
-extern int __glXSwapWaitGL(__GLXclientState*, GLbyte*);
-extern int __glXSwapWaitX(__GLXclientState*, GLbyte*);
-extern int __glXSwapCopyContext(__GLXclientState*, GLbyte*);
-extern int __glXSwapSwapBuffers(__GLXclientState*, GLbyte*);
-extern int __glXSwapUseXFont(__GLXclientState*, GLbyte*);
-extern int __glXSwapCreateGLXPixmap(__GLXclientState*, GLbyte*);
-extern int __glXSwapCreatePixmap(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapGetVisualConfigs(__GLXclientState*, GLbyte*);
-extern int __glXSwapDestroyGLXPixmap(__GLXclientState*, GLbyte*);
-extern int __glXSwapVendorPrivate(__GLXclientState*, GLbyte*);
-extern int __glXSwapVendorPrivateWithReply(__GLXclientState*, GLbyte*);
-extern int __glXSwapQueryExtensionsString(__GLXclientState*, GLbyte*);
-extern int __glXSwapQueryServerString(__GLXclientState*, GLbyte*);
-extern int __glXSwapClientInfo(__GLXclientState*, GLbyte*);
-extern int __glXSwapGetFBConfigs(__GLXclientState*, GLbyte*);
-extern int __glXSwapCreateWindow(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapDestroyWindow(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapQueryContext(__GLXclientState *cl, GLbyte *pc);
-extern int __glXDispSwap_NewList(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_EndList(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_DeleteLists(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GenLists(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_FeedbackBuffer(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_SelectBuffer(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_RenderMode(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_Finish(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_PixelStoref(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_PixelStorei(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_ReadPixels(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetBooleanv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetClipPlane(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetDoublev(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetError(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetFloatv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetIntegerv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetLightfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetLightiv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetMapdv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetMapfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetMapiv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetMaterialfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetMaterialiv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetPixelMapfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetPixelMapuiv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetPixelMapusv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetPolygonStipple(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetString(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexEnvfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexEnviv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexGendv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexGenfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexGeniv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexImage(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_IsEnabled(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_IsList(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_Flush(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_AreTexturesResident(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_DeleteTextures(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GenTextures(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_IsTexture(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetColorTable(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetColorTableParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetColorTableParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetConvolutionFilter(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetSeparableFilter(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetHistogram(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetHistogramParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetHistogramParameteriv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetMinmax(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState*, GLbyte*);
-extern int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState*, GLbyte*);
+extern int __glXSwapRender(__GLXclientState *, GLbyte *);
+extern int __glXSwapRenderLarge(__GLXclientState *, GLbyte *);
+extern int __glXSwapCreateContext(__GLXclientState *, GLbyte *);
+extern int __glXSwapCreateNewContext(__GLXclientState * cl, GLbyte * pc);
+extern int __glXSwapDestroyContext(__GLXclientState *, GLbyte *);
+extern int __glXSwapMakeCurrent(__GLXclientState *, GLbyte *);
+extern int __glXSwapMakeContextCurrent(__GLXclientState *, GLbyte *);
+extern int __glXSwapCreatePbuffer(__GLXclientState * cl, GLbyte * pc);
+extern int __glXSwapDestroyPbuffer(__GLXclientState * cl, GLbyte * pc);
+extern int __glXSwapGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc);
+extern int __glXSwapChangeDrawableAttributes(__GLXclientState * cl,
+ GLbyte * pc);
+extern int __glXSwapIsDirect(__GLXclientState *, GLbyte *);
+extern int __glXSwapQueryVersion(__GLXclientState *, GLbyte *);
+extern int __glXSwapWaitGL(__GLXclientState *, GLbyte *);
+extern int __glXSwapWaitX(__GLXclientState *, GLbyte *);
+extern int __glXSwapCopyContext(__GLXclientState *, GLbyte *);
+extern int __glXSwapSwapBuffers(__GLXclientState *, GLbyte *);
+extern int __glXSwapUseXFont(__GLXclientState *, GLbyte *);
+extern int __glXSwapCreateGLXPixmap(__GLXclientState *, GLbyte *);
+extern int __glXSwapCreatePixmap(__GLXclientState * cl, GLbyte * pc);
+extern int __glXSwapGetVisualConfigs(__GLXclientState *, GLbyte *);
+extern int __glXSwapDestroyGLXPixmap(__GLXclientState *, GLbyte *);
+extern int __glXSwapVendorPrivate(__GLXclientState *, GLbyte *);
+extern int __glXSwapVendorPrivateWithReply(__GLXclientState *, GLbyte *);
+extern int __glXSwapQueryExtensionsString(__GLXclientState *, GLbyte *);
+extern int __glXSwapQueryServerString(__GLXclientState *, GLbyte *);
+extern int __glXSwapClientInfo(__GLXclientState *, GLbyte *);
+extern int __glXSwapGetFBConfigs(__GLXclientState *, GLbyte *);
+extern int __glXSwapCreateWindow(__GLXclientState * cl, GLbyte * pc);
+extern int __glXSwapDestroyWindow(__GLXclientState * cl, GLbyte * pc);
+extern int __glXSwapQueryContext(__GLXclientState * cl, GLbyte * pc);
+extern int __glXDispSwap_NewList(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_EndList(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_DeleteLists(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GenLists(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_FeedbackBuffer(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_SelectBuffer(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_RenderMode(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_Finish(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_PixelStoref(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_PixelStorei(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_ReadPixels(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetBooleanv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetClipPlane(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetDoublev(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetError(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetFloatv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetIntegerv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetLightfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetLightiv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetMapdv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetMapfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetMapiv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetMaterialfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetMaterialiv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetPixelMapfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetPixelMapuiv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetPixelMapusv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetPolygonStipple(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetString(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexEnvfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexEnviv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexGendv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexGenfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexGeniv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexImage(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexParameteriv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_IsEnabled(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_IsList(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_Flush(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_AreTexturesResident(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_DeleteTextures(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GenTextures(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_IsTexture(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetColorTable(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetConvolutionFilter(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *,
+ GLbyte *);
+extern int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *,
+ GLbyte *);
+extern int __glXDispSwap_GetSeparableFilter(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetHistogram(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetMinmax(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *, GLbyte *);
+extern int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *, GLbyte *);
-extern void __glXDispSwap_CallList(GLbyte*);
-extern void __glXDispSwap_CallLists(GLbyte*);
-extern void __glXDispSwap_ListBase(GLbyte*);
-extern void __glXDispSwap_Begin(GLbyte*);
-extern void __glXDispSwap_Bitmap(GLbyte*);
-extern void __glXDispSwap_Color3bv(GLbyte*);
-extern void __glXDispSwap_Color3dv(GLbyte*);
-extern void __glXDispSwap_Color3fv(GLbyte*);
-extern void __glXDispSwap_Color3iv(GLbyte*);
-extern void __glXDispSwap_Color3sv(GLbyte*);
-extern void __glXDispSwap_Color3ubv(GLbyte*);
-extern void __glXDispSwap_Color3uiv(GLbyte*);
-extern void __glXDispSwap_Color3usv(GLbyte*);
-extern void __glXDispSwap_Color4bv(GLbyte*);
-extern void __glXDispSwap_Color4dv(GLbyte*);
-extern void __glXDispSwap_Color4fv(GLbyte*);
-extern void __glXDispSwap_Color4iv(GLbyte*);
-extern void __glXDispSwap_Color4sv(GLbyte*);
-extern void __glXDispSwap_Color4ubv(GLbyte*);
-extern void __glXDispSwap_Color4uiv(GLbyte*);
-extern void __glXDispSwap_Color4usv(GLbyte*);
-extern void __glXDispSwap_EdgeFlagv(GLbyte*);
-extern void __glXDispSwap_End(GLbyte*);
-extern void __glXDispSwap_Indexdv(GLbyte*);
-extern void __glXDispSwap_Indexfv(GLbyte*);
-extern void __glXDispSwap_Indexiv(GLbyte*);
-extern void __glXDispSwap_Indexsv(GLbyte*);
-extern void __glXDispSwap_Normal3bv(GLbyte*);
-extern void __glXDispSwap_Normal3dv(GLbyte*);
-extern void __glXDispSwap_Normal3fv(GLbyte*);
-extern void __glXDispSwap_Normal3iv(GLbyte*);
-extern void __glXDispSwap_Normal3sv(GLbyte*);
-extern void __glXDispSwap_RasterPos2dv(GLbyte*);
-extern void __glXDispSwap_RasterPos2fv(GLbyte*);
-extern void __glXDispSwap_RasterPos2iv(GLbyte*);
-extern void __glXDispSwap_RasterPos2sv(GLbyte*);
-extern void __glXDispSwap_RasterPos3dv(GLbyte*);
-extern void __glXDispSwap_RasterPos3fv(GLbyte*);
-extern void __glXDispSwap_RasterPos3iv(GLbyte*);
-extern void __glXDispSwap_RasterPos3sv(GLbyte*);
-extern void __glXDispSwap_RasterPos4dv(GLbyte*);
-extern void __glXDispSwap_RasterPos4fv(GLbyte*);
-extern void __glXDispSwap_RasterPos4iv(GLbyte*);
-extern void __glXDispSwap_RasterPos4sv(GLbyte*);
-extern void __glXDispSwap_Rectdv(GLbyte*);
-extern void __glXDispSwap_Rectfv(GLbyte*);
-extern void __glXDispSwap_Rectiv(GLbyte*);
-extern void __glXDispSwap_Rectsv(GLbyte*);
-extern void __glXDispSwap_TexCoord1dv(GLbyte*);
-extern void __glXDispSwap_TexCoord1fv(GLbyte*);
-extern void __glXDispSwap_TexCoord1iv(GLbyte*);
-extern void __glXDispSwap_TexCoord1sv(GLbyte*);
-extern void __glXDispSwap_TexCoord2dv(GLbyte*);
-extern void __glXDispSwap_TexCoord2fv(GLbyte*);
-extern void __glXDispSwap_TexCoord2iv(GLbyte*);
-extern void __glXDispSwap_TexCoord2sv(GLbyte*);
-extern void __glXDispSwap_TexCoord3dv(GLbyte*);
-extern void __glXDispSwap_TexCoord3fv(GLbyte*);
-extern void __glXDispSwap_TexCoord3iv(GLbyte*);
-extern void __glXDispSwap_TexCoord3sv(GLbyte*);
-extern void __glXDispSwap_TexCoord4dv(GLbyte*);
-extern void __glXDispSwap_TexCoord4fv(GLbyte*);
-extern void __glXDispSwap_TexCoord4iv(GLbyte*);
-extern void __glXDispSwap_TexCoord4sv(GLbyte*);
-extern void __glXDispSwap_Vertex2dv(GLbyte*);
-extern void __glXDispSwap_Vertex2fv(GLbyte*);
-extern void __glXDispSwap_Vertex2iv(GLbyte*);
-extern void __glXDispSwap_Vertex2sv(GLbyte*);
-extern void __glXDispSwap_Vertex3dv(GLbyte*);
-extern void __glXDispSwap_Vertex3fv(GLbyte*);
-extern void __glXDispSwap_Vertex3iv(GLbyte*);
-extern void __glXDispSwap_Vertex3sv(GLbyte*);
-extern void __glXDispSwap_Vertex4dv(GLbyte*);
-extern void __glXDispSwap_Vertex4fv(GLbyte*);
-extern void __glXDispSwap_Vertex4iv(GLbyte*);
-extern void __glXDispSwap_Vertex4sv(GLbyte*);
-extern void __glXDispSwap_ClipPlane(GLbyte*);
-extern void __glXDispSwap_ColorMaterial(GLbyte*);
-extern void __glXDispSwap_CullFace(GLbyte*);
-extern void __glXDispSwap_Fogf(GLbyte*);
-extern void __glXDispSwap_Fogfv(GLbyte*);
-extern void __glXDispSwap_Fogi(GLbyte*);
-extern void __glXDispSwap_Fogiv(GLbyte*);
-extern void __glXDispSwap_FrontFace(GLbyte*);
-extern void __glXDispSwap_Hint(GLbyte*);
-extern void __glXDispSwap_Lightf(GLbyte*);
-extern void __glXDispSwap_Lightfv(GLbyte*);
-extern void __glXDispSwap_Lighti(GLbyte*);
-extern void __glXDispSwap_Lightiv(GLbyte*);
-extern void __glXDispSwap_LightModelf(GLbyte*);
-extern void __glXDispSwap_LightModelfv(GLbyte*);
-extern void __glXDispSwap_LightModeli(GLbyte*);
-extern void __glXDispSwap_LightModeliv(GLbyte*);
-extern void __glXDispSwap_LineStipple(GLbyte*);
-extern void __glXDispSwap_LineWidth(GLbyte*);
-extern void __glXDispSwap_Materialf(GLbyte*);
-extern void __glXDispSwap_Materialfv(GLbyte*);
-extern void __glXDispSwap_Materiali(GLbyte*);
-extern void __glXDispSwap_Materialiv(GLbyte*);
-extern void __glXDispSwap_PointSize(GLbyte*);
-extern void __glXDispSwap_PolygonMode(GLbyte*);
-extern void __glXDispSwap_PolygonStipple(GLbyte*);
-extern void __glXDispSwap_Scissor(GLbyte*);
-extern void __glXDispSwap_ShadeModel(GLbyte*);
-extern void __glXDispSwap_TexParameterf(GLbyte*);
-extern void __glXDispSwap_TexParameterfv(GLbyte*);
-extern void __glXDispSwap_TexParameteri(GLbyte*);
-extern void __glXDispSwap_TexParameteriv(GLbyte*);
-extern void __glXDispSwap_TexImage1D(GLbyte*);
-extern void __glXDispSwap_TexImage2D(GLbyte*);
-extern void __glXDispSwap_TexEnvf(GLbyte*);
-extern void __glXDispSwap_TexEnvfv(GLbyte*);
-extern void __glXDispSwap_TexEnvi(GLbyte*);
-extern void __glXDispSwap_TexEnviv(GLbyte*);
-extern void __glXDispSwap_TexGend(GLbyte*);
-extern void __glXDispSwap_TexGendv(GLbyte*);
-extern void __glXDispSwap_TexGenf(GLbyte*);
-extern void __glXDispSwap_TexGenfv(GLbyte*);
-extern void __glXDispSwap_TexGeni(GLbyte*);
-extern void __glXDispSwap_TexGeniv(GLbyte*);
-extern void __glXDispSwap_InitNames(GLbyte*);
-extern void __glXDispSwap_LoadName(GLbyte*);
-extern void __glXDispSwap_PassThrough(GLbyte*);
-extern void __glXDispSwap_PopName(GLbyte*);
-extern void __glXDispSwap_PushName(GLbyte*);
-extern void __glXDispSwap_DrawBuffer(GLbyte*);
-extern void __glXDispSwap_Clear(GLbyte*);
-extern void __glXDispSwap_ClearAccum(GLbyte*);
-extern void __glXDispSwap_ClearIndex(GLbyte*);
-extern void __glXDispSwap_ClearColor(GLbyte*);
-extern void __glXDispSwap_ClearStencil(GLbyte*);
-extern void __glXDispSwap_ClearDepth(GLbyte*);
-extern void __glXDispSwap_StencilMask(GLbyte*);
-extern void __glXDispSwap_ColorMask(GLbyte*);
-extern void __glXDispSwap_DepthMask(GLbyte*);
-extern void __glXDispSwap_IndexMask(GLbyte*);
-extern void __glXDispSwap_Accum(GLbyte*);
-extern void __glXDispSwap_Disable(GLbyte*);
-extern void __glXDispSwap_Enable(GLbyte*);
-extern void __glXDispSwap_PopAttrib(GLbyte*);
-extern void __glXDispSwap_PushAttrib(GLbyte*);
-extern void __glXDispSwap_Map1d(GLbyte*);
-extern void __glXDispSwap_Map1f(GLbyte*);
-extern void __glXDispSwap_Map2d(GLbyte*);
-extern void __glXDispSwap_Map2f(GLbyte*);
-extern void __glXDispSwap_MapGrid1d(GLbyte*);
-extern void __glXDispSwap_MapGrid1f(GLbyte*);
-extern void __glXDispSwap_MapGrid2d(GLbyte*);
-extern void __glXDispSwap_MapGrid2f(GLbyte*);
-extern void __glXDispSwap_EvalCoord1dv(GLbyte*);
-extern void __glXDispSwap_EvalCoord1fv(GLbyte*);
-extern void __glXDispSwap_EvalCoord2dv(GLbyte*);
-extern void __glXDispSwap_EvalCoord2fv(GLbyte*);
-extern void __glXDispSwap_EvalMesh1(GLbyte*);
-extern void __glXDispSwap_EvalPoint1(GLbyte*);
-extern void __glXDispSwap_EvalMesh2(GLbyte*);
-extern void __glXDispSwap_EvalPoint2(GLbyte*);
-extern void __glXDispSwap_AlphaFunc(GLbyte*);
-extern void __glXDispSwap_BlendFunc(GLbyte*);
-extern void __glXDispSwap_LogicOp(GLbyte*);
-extern void __glXDispSwap_StencilFunc(GLbyte*);
-extern void __glXDispSwap_StencilOp(GLbyte*);
-extern void __glXDispSwap_DepthFunc(GLbyte*);
-extern void __glXDispSwap_PixelZoom(GLbyte*);
-extern void __glXDispSwap_PixelTransferf(GLbyte*);
-extern void __glXDispSwap_PixelTransferi(GLbyte*);
-extern void __glXDispSwap_PixelMapfv(GLbyte*);
-extern void __glXDispSwap_PixelMapuiv(GLbyte*);
-extern void __glXDispSwap_PixelMapusv(GLbyte*);
-extern void __glXDispSwap_ReadBuffer(GLbyte*);
-extern void __glXDispSwap_CopyPixels(GLbyte*);
-extern void __glXDispSwap_DrawPixels(GLbyte*);
-extern void __glXDispSwap_DepthRange(GLbyte*);
-extern void __glXDispSwap_Frustum(GLbyte*);
-extern void __glXDispSwap_LoadIdentity(GLbyte*);
-extern void __glXDispSwap_LoadMatrixf(GLbyte*);
-extern void __glXDispSwap_LoadMatrixd(GLbyte*);
-extern void __glXDispSwap_MatrixMode(GLbyte*);
-extern void __glXDispSwap_MultMatrixf(GLbyte*);
-extern void __glXDispSwap_MultMatrixd(GLbyte*);
-extern void __glXDispSwap_Ortho(GLbyte*);
-extern void __glXDispSwap_PopMatrix(GLbyte*);
-extern void __glXDispSwap_PushMatrix(GLbyte*);
-extern void __glXDispSwap_Rotated(GLbyte*);
-extern void __glXDispSwap_Rotatef(GLbyte*);
-extern void __glXDispSwap_Scaled(GLbyte*);
-extern void __glXDispSwap_Scalef(GLbyte*);
-extern void __glXDispSwap_Translated(GLbyte*);
-extern void __glXDispSwap_Translatef(GLbyte*);
-extern void __glXDispSwap_Viewport(GLbyte*);
-extern void __glXDispSwap_PolygonOffset(GLbyte*);
-extern void __glXDispSwap_DrawArrays(GLbyte*);
-extern void __glXDispSwap_Indexubv(GLbyte*);
-extern void __glXDispSwap_ColorSubTable(GLbyte*);
-extern void __glXDispSwap_CopyColorSubTable(GLbyte*);
-extern void __glXDispSwap_ActiveTextureARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord1dvARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord1fvARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord1ivARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord1svARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord2dvARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord2fvARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord2ivARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord2svARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord3dvARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord3fvARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord3ivARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord3svARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord4dvARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord4fvARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord4ivARB(GLbyte*);
-extern void __glXDispSwap_MultiTexCoord4svARB(GLbyte*);
+extern void __glXDispSwap_CallList(GLbyte *);
+extern void __glXDispSwap_CallLists(GLbyte *);
+extern void __glXDispSwap_ListBase(GLbyte *);
+extern void __glXDispSwap_Begin(GLbyte *);
+extern void __glXDispSwap_Bitmap(GLbyte *);
+extern void __glXDispSwap_Color3bv(GLbyte *);
+extern void __glXDispSwap_Color3dv(GLbyte *);
+extern void __glXDispSwap_Color3fv(GLbyte *);
+extern void __glXDispSwap_Color3iv(GLbyte *);
+extern void __glXDispSwap_Color3sv(GLbyte *);
+extern void __glXDispSwap_Color3ubv(GLbyte *);
+extern void __glXDispSwap_Color3uiv(GLbyte *);
+extern void __glXDispSwap_Color3usv(GLbyte *);
+extern void __glXDispSwap_Color4bv(GLbyte *);
+extern void __glXDispSwap_Color4dv(GLbyte *);
+extern void __glXDispSwap_Color4fv(GLbyte *);
+extern void __glXDispSwap_Color4iv(GLbyte *);
+extern void __glXDispSwap_Color4sv(GLbyte *);
+extern void __glXDispSwap_Color4ubv(GLbyte *);
+extern void __glXDispSwap_Color4uiv(GLbyte *);
+extern void __glXDispSwap_Color4usv(GLbyte *);
+extern void __glXDispSwap_EdgeFlagv(GLbyte *);
+extern void __glXDispSwap_End(GLbyte *);
+extern void __glXDispSwap_Indexdv(GLbyte *);
+extern void __glXDispSwap_Indexfv(GLbyte *);
+extern void __glXDispSwap_Indexiv(GLbyte *);
+extern void __glXDispSwap_Indexsv(GLbyte *);
+extern void __glXDispSwap_Normal3bv(GLbyte *);
+extern void __glXDispSwap_Normal3dv(GLbyte *);
+extern void __glXDispSwap_Normal3fv(GLbyte *);
+extern void __glXDispSwap_Normal3iv(GLbyte *);
+extern void __glXDispSwap_Normal3sv(GLbyte *);
+extern void __glXDispSwap_RasterPos2dv(GLbyte *);
+extern void __glXDispSwap_RasterPos2fv(GLbyte *);
+extern void __glXDispSwap_RasterPos2iv(GLbyte *);
+extern void __glXDispSwap_RasterPos2sv(GLbyte *);
+extern void __glXDispSwap_RasterPos3dv(GLbyte *);
+extern void __glXDispSwap_RasterPos3fv(GLbyte *);
+extern void __glXDispSwap_RasterPos3iv(GLbyte *);
+extern void __glXDispSwap_RasterPos3sv(GLbyte *);
+extern void __glXDispSwap_RasterPos4dv(GLbyte *);
+extern void __glXDispSwap_RasterPos4fv(GLbyte *);
+extern void __glXDispSwap_RasterPos4iv(GLbyte *);
+extern void __glXDispSwap_RasterPos4sv(GLbyte *);
+extern void __glXDispSwap_Rectdv(GLbyte *);
+extern void __glXDispSwap_Rectfv(GLbyte *);
+extern void __glXDispSwap_Rectiv(GLbyte *);
+extern void __glXDispSwap_Rectsv(GLbyte *);
+extern void __glXDispSwap_TexCoord1dv(GLbyte *);
+extern void __glXDispSwap_TexCoord1fv(GLbyte *);
+extern void __glXDispSwap_TexCoord1iv(GLbyte *);
+extern void __glXDispSwap_TexCoord1sv(GLbyte *);
+extern void __glXDispSwap_TexCoord2dv(GLbyte *);
+extern void __glXDispSwap_TexCoord2fv(GLbyte *);
+extern void __glXDispSwap_TexCoord2iv(GLbyte *);
+extern void __glXDispSwap_TexCoord2sv(GLbyte *);
+extern void __glXDispSwap_TexCoord3dv(GLbyte *);
+extern void __glXDispSwap_TexCoord3fv(GLbyte *);
+extern void __glXDispSwap_TexCoord3iv(GLbyte *);
+extern void __glXDispSwap_TexCoord3sv(GLbyte *);
+extern void __glXDispSwap_TexCoord4dv(GLbyte *);
+extern void __glXDispSwap_TexCoord4fv(GLbyte *);
+extern void __glXDispSwap_TexCoord4iv(GLbyte *);
+extern void __glXDispSwap_TexCoord4sv(GLbyte *);
+extern void __glXDispSwap_Vertex2dv(GLbyte *);
+extern void __glXDispSwap_Vertex2fv(GLbyte *);
+extern void __glXDispSwap_Vertex2iv(GLbyte *);
+extern void __glXDispSwap_Vertex2sv(GLbyte *);
+extern void __glXDispSwap_Vertex3dv(GLbyte *);
+extern void __glXDispSwap_Vertex3fv(GLbyte *);
+extern void __glXDispSwap_Vertex3iv(GLbyte *);
+extern void __glXDispSwap_Vertex3sv(GLbyte *);
+extern void __glXDispSwap_Vertex4dv(GLbyte *);
+extern void __glXDispSwap_Vertex4fv(GLbyte *);
+extern void __glXDispSwap_Vertex4iv(GLbyte *);
+extern void __glXDispSwap_Vertex4sv(GLbyte *);
+extern void __glXDispSwap_ClipPlane(GLbyte *);
+extern void __glXDispSwap_ColorMaterial(GLbyte *);
+extern void __glXDispSwap_CullFace(GLbyte *);
+extern void __glXDispSwap_Fogf(GLbyte *);
+extern void __glXDispSwap_Fogfv(GLbyte *);
+extern void __glXDispSwap_Fogi(GLbyte *);
+extern void __glXDispSwap_Fogiv(GLbyte *);
+extern void __glXDispSwap_FrontFace(GLbyte *);
+extern void __glXDispSwap_Hint(GLbyte *);
+extern void __glXDispSwap_Lightf(GLbyte *);
+extern void __glXDispSwap_Lightfv(GLbyte *);
+extern void __glXDispSwap_Lighti(GLbyte *);
+extern void __glXDispSwap_Lightiv(GLbyte *);
+extern void __glXDispSwap_LightModelf(GLbyte *);
+extern void __glXDispSwap_LightModelfv(GLbyte *);
+extern void __glXDispSwap_LightModeli(GLbyte *);
+extern void __glXDispSwap_LightModeliv(GLbyte *);
+extern void __glXDispSwap_LineStipple(GLbyte *);
+extern void __glXDispSwap_LineWidth(GLbyte *);
+extern void __glXDispSwap_Materialf(GLbyte *);
+extern void __glXDispSwap_Materialfv(GLbyte *);
+extern void __glXDispSwap_Materiali(GLbyte *);
+extern void __glXDispSwap_Materialiv(GLbyte *);
+extern void __glXDispSwap_PointSize(GLbyte *);
+extern void __glXDispSwap_PolygonMode(GLbyte *);
+extern void __glXDispSwap_PolygonStipple(GLbyte *);
+extern void __glXDispSwap_Scissor(GLbyte *);
+extern void __glXDispSwap_ShadeModel(GLbyte *);
+extern void __glXDispSwap_TexParameterf(GLbyte *);
+extern void __glXDispSwap_TexParameterfv(GLbyte *);
+extern void __glXDispSwap_TexParameteri(GLbyte *);
+extern void __glXDispSwap_TexParameteriv(GLbyte *);
+extern void __glXDispSwap_TexImage1D(GLbyte *);
+extern void __glXDispSwap_TexImage2D(GLbyte *);
+extern void __glXDispSwap_TexEnvf(GLbyte *);
+extern void __glXDispSwap_TexEnvfv(GLbyte *);
+extern void __glXDispSwap_TexEnvi(GLbyte *);
+extern void __glXDispSwap_TexEnviv(GLbyte *);
+extern void __glXDispSwap_TexGend(GLbyte *);
+extern void __glXDispSwap_TexGendv(GLbyte *);
+extern void __glXDispSwap_TexGenf(GLbyte *);
+extern void __glXDispSwap_TexGenfv(GLbyte *);
+extern void __glXDispSwap_TexGeni(GLbyte *);
+extern void __glXDispSwap_TexGeniv(GLbyte *);
+extern void __glXDispSwap_InitNames(GLbyte *);
+extern void __glXDispSwap_LoadName(GLbyte *);
+extern void __glXDispSwap_PassThrough(GLbyte *);
+extern void __glXDispSwap_PopName(GLbyte *);
+extern void __glXDispSwap_PushName(GLbyte *);
+extern void __glXDispSwap_DrawBuffer(GLbyte *);
+extern void __glXDispSwap_Clear(GLbyte *);
+extern void __glXDispSwap_ClearAccum(GLbyte *);
+extern void __glXDispSwap_ClearIndex(GLbyte *);
+extern void __glXDispSwap_ClearColor(GLbyte *);
+extern void __glXDispSwap_ClearStencil(GLbyte *);
+extern void __glXDispSwap_ClearDepth(GLbyte *);
+extern void __glXDispSwap_StencilMask(GLbyte *);
+extern void __glXDispSwap_ColorMask(GLbyte *);
+extern void __glXDispSwap_DepthMask(GLbyte *);
+extern void __glXDispSwap_IndexMask(GLbyte *);
+extern void __glXDispSwap_Accum(GLbyte *);
+extern void __glXDispSwap_Disable(GLbyte *);
+extern void __glXDispSwap_Enable(GLbyte *);
+extern void __glXDispSwap_PopAttrib(GLbyte *);
+extern void __glXDispSwap_PushAttrib(GLbyte *);
+extern void __glXDispSwap_Map1d(GLbyte *);
+extern void __glXDispSwap_Map1f(GLbyte *);
+extern void __glXDispSwap_Map2d(GLbyte *);
+extern void __glXDispSwap_Map2f(GLbyte *);
+extern void __glXDispSwap_MapGrid1d(GLbyte *);
+extern void __glXDispSwap_MapGrid1f(GLbyte *);
+extern void __glXDispSwap_MapGrid2d(GLbyte *);
+extern void __glXDispSwap_MapGrid2f(GLbyte *);
+extern void __glXDispSwap_EvalCoord1dv(GLbyte *);
+extern void __glXDispSwap_EvalCoord1fv(GLbyte *);
+extern void __glXDispSwap_EvalCoord2dv(GLbyte *);
+extern void __glXDispSwap_EvalCoord2fv(GLbyte *);
+extern void __glXDispSwap_EvalMesh1(GLbyte *);
+extern void __glXDispSwap_EvalPoint1(GLbyte *);
+extern void __glXDispSwap_EvalMesh2(GLbyte *);
+extern void __glXDispSwap_EvalPoint2(GLbyte *);
+extern void __glXDispSwap_AlphaFunc(GLbyte *);
+extern void __glXDispSwap_BlendFunc(GLbyte *);
+extern void __glXDispSwap_LogicOp(GLbyte *);
+extern void __glXDispSwap_StencilFunc(GLbyte *);
+extern void __glXDispSwap_StencilOp(GLbyte *);
+extern void __glXDispSwap_DepthFunc(GLbyte *);
+extern void __glXDispSwap_PixelZoom(GLbyte *);
+extern void __glXDispSwap_PixelTransferf(GLbyte *);
+extern void __glXDispSwap_PixelTransferi(GLbyte *);
+extern void __glXDispSwap_PixelMapfv(GLbyte *);
+extern void __glXDispSwap_PixelMapuiv(GLbyte *);
+extern void __glXDispSwap_PixelMapusv(GLbyte *);
+extern void __glXDispSwap_ReadBuffer(GLbyte *);
+extern void __glXDispSwap_CopyPixels(GLbyte *);
+extern void __glXDispSwap_DrawPixels(GLbyte *);
+extern void __glXDispSwap_DepthRange(GLbyte *);
+extern void __glXDispSwap_Frustum(GLbyte *);
+extern void __glXDispSwap_LoadIdentity(GLbyte *);
+extern void __glXDispSwap_LoadMatrixf(GLbyte *);
+extern void __glXDispSwap_LoadMatrixd(GLbyte *);
+extern void __glXDispSwap_MatrixMode(GLbyte *);
+extern void __glXDispSwap_MultMatrixf(GLbyte *);
+extern void __glXDispSwap_MultMatrixd(GLbyte *);
+extern void __glXDispSwap_Ortho(GLbyte *);
+extern void __glXDispSwap_PopMatrix(GLbyte *);
+extern void __glXDispSwap_PushMatrix(GLbyte *);
+extern void __glXDispSwap_Rotated(GLbyte *);
+extern void __glXDispSwap_Rotatef(GLbyte *);
+extern void __glXDispSwap_Scaled(GLbyte *);
+extern void __glXDispSwap_Scalef(GLbyte *);
+extern void __glXDispSwap_Translated(GLbyte *);
+extern void __glXDispSwap_Translatef(GLbyte *);
+extern void __glXDispSwap_Viewport(GLbyte *);
+extern void __glXDispSwap_PolygonOffset(GLbyte *);
+extern void __glXDispSwap_DrawArrays(GLbyte *);
+extern void __glXDispSwap_Indexubv(GLbyte *);
+extern void __glXDispSwap_ColorSubTable(GLbyte *);
+extern void __glXDispSwap_CopyColorSubTable(GLbyte *);
+extern void __glXDispSwap_ActiveTextureARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord1dvARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord1fvARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord1ivARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord1svARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord2dvARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord2fvARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord2ivARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord2svARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord3dvARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord3fvARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord3ivARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord3svARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord4dvARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord4fvARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord4ivARB(GLbyte *);
+extern void __glXDispSwap_MultiTexCoord4svARB(GLbyte *);
-extern void __glXDispSwap_TexSubImage1D(GLbyte*);
-extern void __glXDispSwap_TexSubImage2D(GLbyte*);
-extern void __glXDispSwap_ConvolutionFilter1D(GLbyte*);
-extern void __glXDispSwap_ConvolutionFilter2D(GLbyte*);
-extern void __glXDispSwap_ConvolutionParameterfv(GLbyte*);
-extern void __glXDispSwap_ConvolutionParameteriv(GLbyte*);
-extern void __glXDispSwap_CopyConvolutionFilter1D(GLbyte*);
-extern void __glXDispSwap_CopyConvolutionFilter2D(GLbyte*);
-extern void __glXDispSwap_SeparableFilter2D(GLbyte*);
-extern void __glXDispSwap_TexImage3D(GLbyte*);
-extern void __glXDispSwap_TexSubImage3D(GLbyte*);
-extern void __glXDispSwap_DrawArrays(GLbyte*);
-extern void __glXDispSwap_PrioritizeTextures(GLbyte*);
-extern void __glXDispSwap_CopyTexImage1D(GLbyte*);
-extern void __glXDispSwap_CopyTexImage2D(GLbyte*);
-extern void __glXDispSwap_CopyTexSubImage1D(GLbyte*);
-extern void __glXDispSwap_CopyTexSubImage2D(GLbyte*);
-extern void __glXDispSwap_CopyTexSubImage3D(GLbyte*);
+extern void __glXDispSwap_TexSubImage1D(GLbyte *);
+extern void __glXDispSwap_TexSubImage2D(GLbyte *);
+extern void __glXDispSwap_ConvolutionFilter1D(GLbyte *);
+extern void __glXDispSwap_ConvolutionFilter2D(GLbyte *);
+extern void __glXDispSwap_ConvolutionParameterfv(GLbyte *);
+extern void __glXDispSwap_ConvolutionParameteriv(GLbyte *);
+extern void __glXDispSwap_CopyConvolutionFilter1D(GLbyte *);
+extern void __glXDispSwap_CopyConvolutionFilter2D(GLbyte *);
+extern void __glXDispSwap_SeparableFilter2D(GLbyte *);
+extern void __glXDispSwap_TexImage3D(GLbyte *);
+extern void __glXDispSwap_TexSubImage3D(GLbyte *);
+extern void __glXDispSwap_DrawArrays(GLbyte *);
+extern void __glXDispSwap_PrioritizeTextures(GLbyte *);
+extern void __glXDispSwap_CopyTexImage1D(GLbyte *);
+extern void __glXDispSwap_CopyTexImage2D(GLbyte *);
+extern void __glXDispSwap_CopyTexSubImage1D(GLbyte *);
+extern void __glXDispSwap_CopyTexSubImage2D(GLbyte *);
+extern void __glXDispSwap_CopyTexSubImage3D(GLbyte *);
#define __GLX_MIN_GLXCMD_OPCODE 1
#define __GLX_MAX_GLXCMD_OPCODE 20
@@ -673,4 +677,4 @@ extern void __glXDispSwap_CopyTexSubImage3D(GLbyte*);
extern __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE];
extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE];
-#endif /* _GLX_g_disptab_h_ */
+#endif /* _GLX_g_disptab_h_ */
diff --git a/xorg-server/hw/dmx/glxProxy/g_renderswap.c b/xorg-server/hw/dmx/glxProxy/g_renderswap.c
index e434a71b6..ce1c609bd 100644
--- a/xorg-server/hw/dmx/glxProxy/g_renderswap.c
+++ b/xorg-server/hw/dmx/glxProxy/g_renderswap.c
@@ -34,2401 +34,2630 @@
#include "unpack.h"
#include "compsize.h"
-void __glXDispSwap_CallList(GLbyte *pc)
+void
+__glXDispSwap_CallList(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_ListBase(GLbyte *pc)
+void
+__glXDispSwap_ListBase(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_Begin(GLbyte *pc)
+void
+__glXDispSwap_Begin(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_Color3bv(GLbyte *pc)
+void
+__glXDispSwap_Color3bv(GLbyte * pc)
{
}
-void __glXDispSwap_Color3dv(GLbyte *pc)
+void
+__glXDispSwap_Color3dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 24);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 24);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Color3fv(GLbyte *pc)
+void
+__glXDispSwap_Color3fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Color3iv(GLbyte *pc)
+void
+__glXDispSwap_Color3iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Color3sv(GLbyte *pc)
+void
+__glXDispSwap_Color3sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Color3ubv(GLbyte *pc)
+void
+__glXDispSwap_Color3ubv(GLbyte * pc)
{
}
-void __glXDispSwap_Color3uiv(GLbyte *pc)
+void
+__glXDispSwap_Color3uiv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Color3usv(GLbyte *pc)
+void
+__glXDispSwap_Color3usv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Color4bv(GLbyte *pc)
+void
+__glXDispSwap_Color4bv(GLbyte * pc)
{
}
-void __glXDispSwap_Color4dv(GLbyte *pc)
+void
+__glXDispSwap_Color4dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 32);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 32);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Color4fv(GLbyte *pc)
+void
+__glXDispSwap_Color4fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Color4iv(GLbyte *pc)
+void
+__glXDispSwap_Color4iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Color4sv(GLbyte *pc)
+void
+__glXDispSwap_Color4sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Color4ubv(GLbyte *pc)
+void
+__glXDispSwap_Color4ubv(GLbyte * pc)
{
}
-void __glXDispSwap_Color4uiv(GLbyte *pc)
+void
+__glXDispSwap_Color4uiv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Color4usv(GLbyte *pc)
+void
+__glXDispSwap_Color4usv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_EdgeFlagv(GLbyte *pc)
+void
+__glXDispSwap_EdgeFlagv(GLbyte * pc)
{
}
-void __glXDispSwap_End(GLbyte *pc)
+void
+__glXDispSwap_End(GLbyte * pc)
{
}
-void __glXDispSwap_Indexdv(GLbyte *pc)
+void
+__glXDispSwap_Indexdv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 8);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 8);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_Indexfv(GLbyte *pc)
+void
+__glXDispSwap_Indexfv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_Indexiv(GLbyte *pc)
+void
+__glXDispSwap_Indexiv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 1);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_Indexsv(GLbyte *pc)
+void
+__glXDispSwap_Indexsv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 1);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_Normal3bv(GLbyte *pc)
+void
+__glXDispSwap_Normal3bv(GLbyte * pc)
{
}
-void __glXDispSwap_Normal3dv(GLbyte *pc)
+void
+__glXDispSwap_Normal3dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 24);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 24);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Normal3fv(GLbyte *pc)
+void
+__glXDispSwap_Normal3fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Normal3iv(GLbyte *pc)
+void
+__glXDispSwap_Normal3iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Normal3sv(GLbyte *pc)
+void
+__glXDispSwap_Normal3sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_RasterPos2dv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos2dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 16);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 16);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_RasterPos2fv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos2fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_RasterPos2iv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos2iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_RasterPos2sv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos2sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_RasterPos3dv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos3dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 24);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 24);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_RasterPos3fv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos3fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_RasterPos3iv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos3iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_RasterPos3sv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos3sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_RasterPos4dv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos4dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 32);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 32);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_RasterPos4fv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos4fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_RasterPos4iv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos4iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_RasterPos4sv(GLbyte *pc)
+void
+__glXDispSwap_RasterPos4sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Rectdv(GLbyte *pc)
+void
+__glXDispSwap_Rectdv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 32);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 32);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
- __GLX_SWAP_DOUBLE_ARRAY(pc + 16, 2);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 16, 2);
}
-void __glXDispSwap_Rectfv(GLbyte *pc)
+void
+__glXDispSwap_Rectfv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
- __GLX_SWAP_FLOAT_ARRAY(pc + 8, 2);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, 2);
}
-void __glXDispSwap_Rectiv(GLbyte *pc)
+void
+__glXDispSwap_Rectiv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 2);
- __GLX_SWAP_INT_ARRAY(pc + 8, 2);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_INT_ARRAY(pc + 8, 2);
}
-void __glXDispSwap_Rectsv(GLbyte *pc)
+void
+__glXDispSwap_Rectsv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
- __GLX_SWAP_SHORT_ARRAY(pc + 4, 2);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_SHORT_ARRAY(pc + 4, 2);
}
-void __glXDispSwap_TexCoord1dv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord1dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 8);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 8);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_TexCoord1fv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord1fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_TexCoord1iv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord1iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 1);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_TexCoord1sv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord1sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 1);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_TexCoord2dv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord2dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 16);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 16);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_TexCoord2fv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord2fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_TexCoord2iv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord2iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_TexCoord2sv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord2sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_TexCoord3dv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord3dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 24);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 24);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_TexCoord3fv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord3fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_TexCoord3iv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord3iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_TexCoord3sv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord3sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_TexCoord4dv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord4dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 32);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 32);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_TexCoord4fv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord4fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_TexCoord4iv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord4iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_TexCoord4sv(GLbyte *pc)
+void
+__glXDispSwap_TexCoord4sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Vertex2dv(GLbyte *pc)
+void
+__glXDispSwap_Vertex2dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 16);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 16);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_Vertex2fv(GLbyte *pc)
+void
+__glXDispSwap_Vertex2fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_Vertex2iv(GLbyte *pc)
+void
+__glXDispSwap_Vertex2iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_Vertex2sv(GLbyte *pc)
+void
+__glXDispSwap_Vertex2sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_Vertex3dv(GLbyte *pc)
+void
+__glXDispSwap_Vertex3dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 24);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 24);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Vertex3fv(GLbyte *pc)
+void
+__glXDispSwap_Vertex3fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Vertex3iv(GLbyte *pc)
+void
+__glXDispSwap_Vertex3iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Vertex3sv(GLbyte *pc)
+void
+__glXDispSwap_Vertex3sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_Vertex4dv(GLbyte *pc)
+void
+__glXDispSwap_Vertex4dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 32);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 32);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Vertex4fv(GLbyte *pc)
+void
+__glXDispSwap_Vertex4fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Vertex4iv(GLbyte *pc)
+void
+__glXDispSwap_Vertex4iv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_INT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_Vertex4sv(GLbyte *pc)
+void
+__glXDispSwap_Vertex4sv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
+ __GLX_SWAP_SHORT_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_ClipPlane(GLbyte *pc)
+void
+__glXDispSwap_ClipPlane(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 36);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 36);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_INT(pc + 32);
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
+ __GLX_SWAP_INT(pc + 32);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_ColorMaterial(GLbyte *pc)
+void
+__glXDispSwap_ColorMaterial(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_CullFace(GLbyte *pc)
+void
+__glXDispSwap_CullFace(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_Fogf(GLbyte *pc)
+void
+__glXDispSwap_Fogf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
}
-void __glXDispSwap_Fogfv(GLbyte *pc)
+void
+__glXDispSwap_Fogfv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- pname = *(GLenum *)(pc + 0);
- compsize = __glFogfv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize);
+ __GLX_SWAP_INT(pc + 0);
+ pname = *(GLenum *) (pc + 0);
+ compsize = __glFogfv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize);
}
-void __glXDispSwap_Fogi(GLbyte *pc)
+void
+__glXDispSwap_Fogi(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_Fogiv(GLbyte *pc)
+void
+__glXDispSwap_Fogiv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
- __GLX_SWAP_INT(pc + 0);
- pname = *(GLenum *)(pc + 0);
- compsize = __glFogiv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT_ARRAY(pc + 4, compsize);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 0);
+ pname = *(GLenum *) (pc + 0);
+ compsize = __glFogiv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT_ARRAY(pc + 4, compsize);
}
-void __glXDispSwap_FrontFace(GLbyte *pc)
+void
+__glXDispSwap_FrontFace(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_Hint(GLbyte *pc)
+void
+__glXDispSwap_Hint(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_Lightf(GLbyte *pc)
+void
+__glXDispSwap_Lightf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
}
-void __glXDispSwap_Lightfv(GLbyte *pc)
+void
+__glXDispSwap_Lightfv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glLightfv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glLightfv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_Lighti(GLbyte *pc)
+void
+__glXDispSwap_Lighti(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_Lightiv(GLbyte *pc)
+void
+__glXDispSwap_Lightiv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glLightiv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glLightiv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_LightModelf(GLbyte *pc)
+void
+__glXDispSwap_LightModelf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
}
-void __glXDispSwap_LightModelfv(GLbyte *pc)
+void
+__glXDispSwap_LightModelfv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- pname = *(GLenum *)(pc + 0);
- compsize = __glLightModelfv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize);
+ __GLX_SWAP_INT(pc + 0);
+ pname = *(GLenum *) (pc + 0);
+ compsize = __glLightModelfv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_FLOAT_ARRAY(pc + 4, compsize);
}
-void __glXDispSwap_LightModeli(GLbyte *pc)
+void
+__glXDispSwap_LightModeli(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_LightModeliv(GLbyte *pc)
+void
+__glXDispSwap_LightModeliv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- pname = *(GLenum *)(pc + 0);
- compsize = __glLightModeliv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT_ARRAY(pc + 4, compsize);
+ __GLX_SWAP_INT(pc + 0);
+ pname = *(GLenum *) (pc + 0);
+ compsize = __glLightModeliv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT_ARRAY(pc + 4, compsize);
}
-void __glXDispSwap_LineStipple(GLbyte *pc)
+void
+__glXDispSwap_LineStipple(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_SHORT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_SHORT(pc + 4);
}
-void __glXDispSwap_LineWidth(GLbyte *pc)
+void
+__glXDispSwap_LineWidth(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 0);
}
-void __glXDispSwap_Materialf(GLbyte *pc)
+void
+__glXDispSwap_Materialf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
}
-void __glXDispSwap_Materialfv(GLbyte *pc)
+void
+__glXDispSwap_Materialfv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glMaterialfv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glMaterialfv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_Materiali(GLbyte *pc)
+void
+__glXDispSwap_Materiali(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_Materialiv(GLbyte *pc)
+void
+__glXDispSwap_Materialiv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glMaterialiv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glMaterialiv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_PointSize(GLbyte *pc)
+void
+__glXDispSwap_PointSize(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 0);
}
-void __glXDispSwap_PolygonMode(GLbyte *pc)
+void
+__glXDispSwap_PolygonMode(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_Scissor(GLbyte *pc)
+void
+__glXDispSwap_Scissor(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
}
-void __glXDispSwap_ShadeModel(GLbyte *pc)
+void
+__glXDispSwap_ShadeModel(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_TexParameterf(GLbyte *pc)
+void
+__glXDispSwap_TexParameterf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
}
-void __glXDispSwap_TexParameterfv(GLbyte *pc)
+void
+__glXDispSwap_TexParameterfv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glTexParameterfv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glTexParameterfv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_TexParameteri(GLbyte *pc)
+void
+__glXDispSwap_TexParameteri(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_TexParameteriv(GLbyte *pc)
+void
+__glXDispSwap_TexParameteriv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glTexParameteriv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glTexParameteriv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_TexEnvf(GLbyte *pc)
+void
+__glXDispSwap_TexEnvf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
}
-void __glXDispSwap_TexEnvfv(GLbyte *pc)
+void
+__glXDispSwap_TexEnvfv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glTexEnvfv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glTexEnvfv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_TexEnvi(GLbyte *pc)
+void
+__glXDispSwap_TexEnvi(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_TexEnviv(GLbyte *pc)
+void
+__glXDispSwap_TexEnviv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glTexEnviv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glTexEnviv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_TexGend(GLbyte *pc)
+void
+__glXDispSwap_TexGend(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 16);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 16);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_DOUBLE(pc + 0);
}
-void __glXDispSwap_TexGendv(GLbyte *pc)
+void
+__glXDispSwap_TexGendv(GLbyte * pc)
{
- GLenum pname;
- GLint cmdlen;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint cmdlen;
+ GLint compsize;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glTexGendv_size(pname);
- if (compsize < 0) compsize = 0;
- cmdlen = __GLX_PAD(8+compsize*8);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glTexGendv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ cmdlen = __GLX_PAD(8 + compsize * 8);
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, cmdlen);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, cmdlen);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_DOUBLE_ARRAY(pc + 8, compsize);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_TexGenf(GLbyte *pc)
+void
+__glXDispSwap_TexGenf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
}
-void __glXDispSwap_TexGenfv(GLbyte *pc)
+void
+__glXDispSwap_TexGenfv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glTexGenfv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glTexGenfv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_TexGeni(GLbyte *pc)
+void
+__glXDispSwap_TexGeni(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_TexGeniv(GLbyte *pc)
+void
+__glXDispSwap_TexGeniv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glTexGeniv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glTexGeniv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_InitNames(GLbyte *pc)
+void
+__glXDispSwap_InitNames(GLbyte * pc)
{
}
-void __glXDispSwap_LoadName(GLbyte *pc)
+void
+__glXDispSwap_LoadName(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_PassThrough(GLbyte *pc)
+void
+__glXDispSwap_PassThrough(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 0);
}
-void __glXDispSwap_PopName(GLbyte *pc)
+void
+__glXDispSwap_PopName(GLbyte * pc)
{
}
-void __glXDispSwap_PushName(GLbyte *pc)
+void
+__glXDispSwap_PushName(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_DrawBuffer(GLbyte *pc)
+void
+__glXDispSwap_DrawBuffer(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_Clear(GLbyte *pc)
+void
+__glXDispSwap_Clear(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_ClearAccum(GLbyte *pc)
+void
+__glXDispSwap_ClearAccum(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
- __GLX_SWAP_FLOAT(pc + 12);
+ __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_FLOAT(pc + 12);
}
-void __glXDispSwap_ClearIndex(GLbyte *pc)
+void
+__glXDispSwap_ClearIndex(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 0);
}
-void __glXDispSwap_ClearColor(GLbyte *pc)
+void
+__glXDispSwap_ClearColor(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
- __GLX_SWAP_FLOAT(pc + 12);
+ __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_FLOAT(pc + 12);
}
-void __glXDispSwap_ClearStencil(GLbyte *pc)
+void
+__glXDispSwap_ClearStencil(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_ClearDepth(GLbyte *pc)
+void
+__glXDispSwap_ClearDepth(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 8);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 8);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 0);
}
-void __glXDispSwap_StencilMask(GLbyte *pc)
+void
+__glXDispSwap_StencilMask(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_ColorMask(GLbyte *pc)
+void
+__glXDispSwap_ColorMask(GLbyte * pc)
{
}
-void __glXDispSwap_DepthMask(GLbyte *pc)
+void
+__glXDispSwap_DepthMask(GLbyte * pc)
{
}
-void __glXDispSwap_IndexMask(GLbyte *pc)
+void
+__glXDispSwap_IndexMask(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_Accum(GLbyte *pc)
+void
+__glXDispSwap_Accum(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
}
-void __glXDispSwap_Disable(GLbyte *pc)
+void
+__glXDispSwap_Disable(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_Enable(GLbyte *pc)
+void
+__glXDispSwap_Enable(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_PopAttrib(GLbyte *pc)
+void
+__glXDispSwap_PopAttrib(GLbyte * pc)
{
}
-void __glXDispSwap_PushAttrib(GLbyte *pc)
+void
+__glXDispSwap_PushAttrib(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_MapGrid1d(GLbyte *pc)
+void
+__glXDispSwap_MapGrid1d(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 20);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 20);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_INT(pc + 16);
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
}
-void __glXDispSwap_MapGrid1f(GLbyte *pc)
+void
+__glXDispSwap_MapGrid1f(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
}
-void __glXDispSwap_MapGrid2d(GLbyte *pc)
+void
+__glXDispSwap_MapGrid2d(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 40);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 40);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_INT(pc + 32);
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
- __GLX_SWAP_INT(pc + 36);
- __GLX_SWAP_DOUBLE(pc + 16);
- __GLX_SWAP_DOUBLE(pc + 24);
+ __GLX_SWAP_INT(pc + 32);
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_INT(pc + 36);
+ __GLX_SWAP_DOUBLE(pc + 16);
+ __GLX_SWAP_DOUBLE(pc + 24);
}
-void __glXDispSwap_MapGrid2f(GLbyte *pc)
+void
+__glXDispSwap_MapGrid2f(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_FLOAT(pc + 16);
- __GLX_SWAP_FLOAT(pc + 20);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_FLOAT(pc + 16);
+ __GLX_SWAP_FLOAT(pc + 20);
}
-void __glXDispSwap_EvalCoord1dv(GLbyte *pc)
+void
+__glXDispSwap_EvalCoord1dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 8);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 8);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_EvalCoord1fv(GLbyte *pc)
+void
+__glXDispSwap_EvalCoord1fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_EvalCoord2dv(GLbyte *pc)
+void
+__glXDispSwap_EvalCoord2dv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 16);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 16);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_EvalCoord2fv(GLbyte *pc)
+void
+__glXDispSwap_EvalCoord2fv(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_EvalMesh1(GLbyte *pc)
+void
+__glXDispSwap_EvalMesh1(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_EvalPoint1(GLbyte *pc)
+void
+__glXDispSwap_EvalPoint1(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_EvalMesh2(GLbyte *pc)
+void
+__glXDispSwap_EvalMesh2(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
}
-void __glXDispSwap_EvalPoint2(GLbyte *pc)
+void
+__glXDispSwap_EvalPoint2(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_AlphaFunc(GLbyte *pc)
+void
+__glXDispSwap_AlphaFunc(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
}
-void __glXDispSwap_BlendFunc(GLbyte *pc)
+void
+__glXDispSwap_BlendFunc(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_LogicOp(GLbyte *pc)
+void
+__glXDispSwap_LogicOp(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_StencilFunc(GLbyte *pc)
+void
+__glXDispSwap_StencilFunc(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_StencilOp(GLbyte *pc)
+void
+__glXDispSwap_StencilOp(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_DepthFunc(GLbyte *pc)
+void
+__glXDispSwap_DepthFunc(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_PixelZoom(GLbyte *pc)
+void
+__glXDispSwap_PixelZoom(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
}
-void __glXDispSwap_PixelTransferf(GLbyte *pc)
+void
+__glXDispSwap_PixelTransferf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
}
-void __glXDispSwap_PixelTransferi(GLbyte *pc)
+void
+__glXDispSwap_PixelTransferi(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_PixelMapfv(GLbyte *pc)
+void
+__glXDispSwap_PixelMapfv(GLbyte * pc)
{
- GLint mapsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLint mapsize;
- __GLX_SWAP_INT(pc + 4);
- mapsize = *(GLint *)(pc + 4);
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 8, mapsize);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ mapsize = *(GLint *) (pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, mapsize);
}
-void __glXDispSwap_PixelMapuiv(GLbyte *pc)
+void
+__glXDispSwap_PixelMapuiv(GLbyte * pc)
{
- GLint mapsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLint mapsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 4);
- mapsize = *(GLint *)(pc + 4);
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 8, mapsize);
+ __GLX_SWAP_INT(pc + 4);
+ mapsize = *(GLint *) (pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 8, mapsize);
}
-void __glXDispSwap_PixelMapusv(GLbyte *pc)
+void
+__glXDispSwap_PixelMapusv(GLbyte * pc)
{
- GLint mapsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLint mapsize;
- __GLX_SWAP_INT(pc + 4);
- mapsize = *(GLint *)(pc + 4);
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_SHORT_ARRAY(pc + 8, mapsize);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ mapsize = *(GLint *) (pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_SHORT_ARRAY(pc + 8, mapsize);
}
-void __glXDispSwap_ReadBuffer(GLbyte *pc)
+void
+__glXDispSwap_ReadBuffer(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_CopyPixels(GLbyte *pc)
+void
+__glXDispSwap_CopyPixels(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
}
-void __glXDispSwap_DepthRange(GLbyte *pc)
+void
+__glXDispSwap_DepthRange(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 16);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 16);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
}
-void __glXDispSwap_Frustum(GLbyte *pc)
+void
+__glXDispSwap_Frustum(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 48);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 48);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
- __GLX_SWAP_DOUBLE(pc + 16);
- __GLX_SWAP_DOUBLE(pc + 24);
- __GLX_SWAP_DOUBLE(pc + 32);
- __GLX_SWAP_DOUBLE(pc + 40);
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_DOUBLE(pc + 16);
+ __GLX_SWAP_DOUBLE(pc + 24);
+ __GLX_SWAP_DOUBLE(pc + 32);
+ __GLX_SWAP_DOUBLE(pc + 40);
}
-void __glXDispSwap_LoadIdentity(GLbyte *pc)
+void
+__glXDispSwap_LoadIdentity(GLbyte * pc)
{
}
-void __glXDispSwap_LoadMatrixf(GLbyte *pc)
+void
+__glXDispSwap_LoadMatrixf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16);
}
-void __glXDispSwap_LoadMatrixd(GLbyte *pc)
+void
+__glXDispSwap_LoadMatrixd(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 128);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 128);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 16);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 16);
}
-void __glXDispSwap_MatrixMode(GLbyte *pc)
+void
+__glXDispSwap_MatrixMode(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_MultMatrixf(GLbyte *pc)
+void
+__glXDispSwap_MultMatrixf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16);
}
-void __glXDispSwap_MultMatrixd(GLbyte *pc)
+void
+__glXDispSwap_MultMatrixd(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 128);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 128);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 16);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 16);
}
-void __glXDispSwap_Ortho(GLbyte *pc)
+void
+__glXDispSwap_Ortho(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 48);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 48);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
- __GLX_SWAP_DOUBLE(pc + 16);
- __GLX_SWAP_DOUBLE(pc + 24);
- __GLX_SWAP_DOUBLE(pc + 32);
- __GLX_SWAP_DOUBLE(pc + 40);
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_DOUBLE(pc + 16);
+ __GLX_SWAP_DOUBLE(pc + 24);
+ __GLX_SWAP_DOUBLE(pc + 32);
+ __GLX_SWAP_DOUBLE(pc + 40);
}
-void __glXDispSwap_PopMatrix(GLbyte *pc)
+void
+__glXDispSwap_PopMatrix(GLbyte * pc)
{
}
-void __glXDispSwap_PushMatrix(GLbyte *pc)
+void
+__glXDispSwap_PushMatrix(GLbyte * pc)
{
}
-void __glXDispSwap_Rotated(GLbyte *pc)
+void
+__glXDispSwap_Rotated(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 32);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 32);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
- __GLX_SWAP_DOUBLE(pc + 16);
- __GLX_SWAP_DOUBLE(pc + 24);
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_DOUBLE(pc + 16);
+ __GLX_SWAP_DOUBLE(pc + 24);
}
-void __glXDispSwap_Rotatef(GLbyte *pc)
+void
+__glXDispSwap_Rotatef(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
- __GLX_SWAP_FLOAT(pc + 12);
+ __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_FLOAT(pc + 12);
}
-void __glXDispSwap_Scaled(GLbyte *pc)
+void
+__glXDispSwap_Scaled(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 24);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 24);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
- __GLX_SWAP_DOUBLE(pc + 16);
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_DOUBLE(pc + 16);
}
-void __glXDispSwap_Scalef(GLbyte *pc)
+void
+__glXDispSwap_Scalef(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
}
-void __glXDispSwap_Translated(GLbyte *pc)
+void
+__glXDispSwap_Translated(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 24);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 24);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_DOUBLE(pc + 0);
- __GLX_SWAP_DOUBLE(pc + 8);
- __GLX_SWAP_DOUBLE(pc + 16);
+ __GLX_SWAP_DOUBLE(pc + 0);
+ __GLX_SWAP_DOUBLE(pc + 8);
+ __GLX_SWAP_DOUBLE(pc + 16);
}
-void __glXDispSwap_Translatef(GLbyte *pc)
+void
+__glXDispSwap_Translatef(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
}
-void __glXDispSwap_Viewport(GLbyte *pc)
+void
+__glXDispSwap_Viewport(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
}
-void __glXDispSwap_PolygonOffset(GLbyte *pc)
+void
+__glXDispSwap_PolygonOffset(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
}
-void __glXDispSwap_CopyTexImage1D(GLbyte *pc)
+void
+__glXDispSwap_CopyTexImage1D(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
- __GLX_SWAP_INT(pc + 20);
- __GLX_SWAP_INT(pc + 24);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 20);
+ __GLX_SWAP_INT(pc + 24);
}
-void __glXDispSwap_CopyTexImage2D(GLbyte *pc)
+void
+__glXDispSwap_CopyTexImage2D(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
- __GLX_SWAP_INT(pc + 20);
- __GLX_SWAP_INT(pc + 24);
- __GLX_SWAP_INT(pc + 28);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 20);
+ __GLX_SWAP_INT(pc + 24);
+ __GLX_SWAP_INT(pc + 28);
}
-void __glXDispSwap_CopyTexSubImage1D(GLbyte *pc)
+void
+__glXDispSwap_CopyTexSubImage1D(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
- __GLX_SWAP_INT(pc + 20);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 20);
}
-void __glXDispSwap_CopyTexSubImage2D(GLbyte *pc)
+void
+__glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
- __GLX_SWAP_INT(pc + 20);
- __GLX_SWAP_INT(pc + 24);
- __GLX_SWAP_INT(pc + 28);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 20);
+ __GLX_SWAP_INT(pc + 24);
+ __GLX_SWAP_INT(pc + 28);
}
-void __glXDispSwap_BindTexture(GLbyte *pc)
+void
+__glXDispSwap_BindTexture(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_PrioritizeTextures(GLbyte *pc)
+void
+__glXDispSwap_PrioritizeTextures(GLbyte * pc)
{
- GLsizei n;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLsizei n;
- __GLX_SWAP_INT(pc + 0);
- n = *(GLsizei *)(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 4, n);
- __GLX_SWAP_FLOAT_ARRAY(pc + 4+n*4, n);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 0);
+ n = *(GLsizei *) (pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 4, n);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 4 + n * 4, n);
}
-void __glXDispSwap_Indexubv(GLbyte *pc)
+void
+__glXDispSwap_Indexubv(GLbyte * pc)
{
}
-void __glXDispSwap_BlendColor(GLbyte *pc)
+void
+__glXDispSwap_BlendColor(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_FLOAT(pc + 0);
- __GLX_SWAP_FLOAT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
- __GLX_SWAP_FLOAT(pc + 12);
+ __GLX_SWAP_FLOAT(pc + 0);
+ __GLX_SWAP_FLOAT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_FLOAT(pc + 12);
}
-void __glXDispSwap_BlendEquation(GLbyte *pc)
+void
+__glXDispSwap_BlendEquation(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_ColorTableParameterfv(GLbyte *pc)
+void
+__glXDispSwap_ColorTableParameterfv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glColorTableParameterfv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glColorTableParameterfv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_ColorTableParameteriv(GLbyte *pc)
+void
+__glXDispSwap_ColorTableParameteriv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glColorTableParameteriv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glColorTableParameteriv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_CopyColorTable(GLbyte *pc)
+void
+__glXDispSwap_CopyColorTable(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
}
-void __glXDispSwap_CopyColorSubTable(GLbyte *pc)
+void
+__glXDispSwap_CopyColorSubTable(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
}
-void __glXDispSwap_ConvolutionParameterf(GLbyte *pc)
+void
+__glXDispSwap_ConvolutionParameterf(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_FLOAT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_FLOAT(pc + 8);
}
-void __glXDispSwap_ConvolutionParameterfv(GLbyte *pc)
+void
+__glXDispSwap_ConvolutionParameterfv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glConvolutionParameterfv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glConvolutionParameterfv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_ConvolutionParameteri(GLbyte *pc)
+void
+__glXDispSwap_ConvolutionParameteri(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_ConvolutionParameteriv(GLbyte *pc)
+void
+__glXDispSwap_ConvolutionParameteriv(GLbyte * pc)
{
- GLenum pname;
- GLint compsize;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ GLenum pname;
+ GLint compsize;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 4);
- pname = *(GLenum *)(pc + 4);
- compsize = __glConvolutionParameteriv_size(pname);
- if (compsize < 0) compsize = 0;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
+ __GLX_SWAP_INT(pc + 4);
+ pname = *(GLenum *) (pc + 4);
+ compsize = __glConvolutionParameteriv_size(pname);
+ if (compsize < 0)
+ compsize = 0;
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 8, compsize);
}
-void __glXDispSwap_CopyConvolutionFilter1D(GLbyte *pc)
+void
+__glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
}
-void __glXDispSwap_CopyConvolutionFilter2D(GLbyte *pc)
+void
+__glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
- __GLX_SWAP_INT(pc + 20);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 20);
}
-void __glXDispSwap_Histogram(GLbyte *pc)
+void
+__glXDispSwap_Histogram(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
}
-void __glXDispSwap_Minmax(GLbyte *pc)
+void
+__glXDispSwap_Minmax(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
}
-void __glXDispSwap_ResetHistogram(GLbyte *pc)
+void
+__glXDispSwap_ResetHistogram(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_ResetMinmax(GLbyte *pc)
+void
+__glXDispSwap_ResetMinmax(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_CopyTexSubImage3D(GLbyte *pc)
+void
+__glXDispSwap_CopyTexSubImage3D(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT(pc + 4);
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_INT(pc + 12);
- __GLX_SWAP_INT(pc + 16);
- __GLX_SWAP_INT(pc + 20);
- __GLX_SWAP_INT(pc + 24);
- __GLX_SWAP_INT(pc + 28);
- __GLX_SWAP_INT(pc + 32);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 4);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_INT(pc + 12);
+ __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_INT(pc + 20);
+ __GLX_SWAP_INT(pc + 24);
+ __GLX_SWAP_INT(pc + 28);
+ __GLX_SWAP_INT(pc + 32);
}
-void __glXDispSwap_ActiveTextureARB(GLbyte *pc)
+void
+__glXDispSwap_ActiveTextureARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT(pc + 0);
}
-void __glXDispSwap_MultiTexCoord1dvARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 12);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 12);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_INT(pc + 8);
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
+ __GLX_SWAP_INT(pc + 8);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 1);
}
-void __glXDispSwap_MultiTexCoord1fvARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 4, 1);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 4, 1);
}
-void __glXDispSwap_MultiTexCoord1ivARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 4, 1);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 4, 1);
}
-void __glXDispSwap_MultiTexCoord1svARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord1svARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_SHORT_ARRAY(pc + 4, 1);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_SHORT_ARRAY(pc + 4, 1);
}
-void __glXDispSwap_MultiTexCoord2dvARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 20);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 20);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_INT(pc + 16);
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
+ __GLX_SWAP_INT(pc + 16);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 2);
}
-void __glXDispSwap_MultiTexCoord2fvARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 4, 2);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 4, 2);
}
-void __glXDispSwap_MultiTexCoord2ivARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 4, 2);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 4, 2);
}
-void __glXDispSwap_MultiTexCoord2svARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord2svARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_SHORT_ARRAY(pc + 4, 2);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_SHORT_ARRAY(pc + 4, 2);
}
-void __glXDispSwap_MultiTexCoord3dvARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 28);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 28);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_INT(pc + 24);
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
+ __GLX_SWAP_INT(pc + 24);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 3);
}
-void __glXDispSwap_MultiTexCoord3fvARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 4, 3);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 4, 3);
}
-void __glXDispSwap_MultiTexCoord3ivARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 4, 3);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 4, 3);
}
-void __glXDispSwap_MultiTexCoord3svARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord3svARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_SHORT_ARRAY(pc + 4, 3);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_SHORT_ARRAY(pc + 4, 3);
}
-void __glXDispSwap_MultiTexCoord4dvARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- __GLX_MEM_COPY(pc-4, pc, 36);
- pc -= 4;
- }
+ if ((unsigned long) (pc) & 7) {
+ __GLX_MEM_COPY(pc - 4, pc, 36);
+ pc -= 4;
+ }
#endif
- __GLX_SWAP_INT(pc + 32);
- __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
+ __GLX_SWAP_INT(pc + 32);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 0, 4);
}
-void __glXDispSwap_MultiTexCoord4fvARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_FLOAT_ARRAY(pc + 4, 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_FLOAT_ARRAY(pc + 4, 4);
}
-void __glXDispSwap_MultiTexCoord4ivARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_INT_ARRAY(pc + 4, 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_INT_ARRAY(pc + 4, 4);
}
-void __glXDispSwap_MultiTexCoord4svARB(GLbyte *pc)
+void
+__glXDispSwap_MultiTexCoord4svARB(GLbyte * pc)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT(pc + 0);
- __GLX_SWAP_SHORT_ARRAY(pc + 4, 4);
+ __GLX_SWAP_INT(pc + 0);
+ __GLX_SWAP_SHORT_ARRAY(pc + 4, 4);
}
-
diff --git a/xorg-server/hw/dmx/glxProxy/glxcmds.c b/xorg-server/hw/dmx/glxProxy/glxcmds.c
index fb4bce850..49c6ef1ed 100644
--- a/xorg-server/hw/dmx/glxProxy/glxcmds.c
+++ b/xorg-server/hw/dmx/glxProxy/glxcmds.c
@@ -59,71 +59,78 @@
#endif
extern __GLXFBConfig **__glXFBConfigs;
-extern int __glXNumFBConfigs;
+extern int __glXNumFBConfigs;
-extern int glxIsExtensionSupported( char *ext );
-extern int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc);
+extern int glxIsExtensionSupported(char *ext);
+extern int __glXGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
#define BE_TO_CLIENT_ERROR(x) \
( (x) >= __glXerrorBase ? \
(x) - dmxScreen->glxErrorBase + __glXerrorBase \
: (x) )
-static __GLXFBConfig *glxLookupFBConfig( GLXFBConfigID id )
+static __GLXFBConfig *
+glxLookupFBConfig(GLXFBConfigID id)
{
- int i,j;
+ int i, j;
- for (i=0, j=0; i<__glXNumFBConfigs; i++,j+=(__glXNumActiveScreens+1) ) {
- if ( __glXFBConfigs[j]->id == id)
- return __glXFBConfigs[j];
- }
+ for (i = 0, j = 0; i < __glXNumFBConfigs;
+ i++, j += (__glXNumActiveScreens + 1)) {
+ if (__glXFBConfigs[j]->id == id)
+ return __glXFBConfigs[j];
+ }
- return NULL;
+ return NULL;
}
-static __GLXFBConfig *glxLookupFBConfigByVID( VisualID vid )
+static __GLXFBConfig *
+glxLookupFBConfigByVID(VisualID vid)
{
- int i,j;
+ int i, j;
- for (i=0, j=0; i<__glXNumFBConfigs; i++,j+=(__glXNumActiveScreens+1) ) {
- if ( __glXFBConfigs[j]->associatedVisualId == vid)
- return __glXFBConfigs[j];
- }
+ for (i = 0, j = 0; i < __glXNumFBConfigs;
+ i++, j += (__glXNumActiveScreens + 1)) {
+ if (__glXFBConfigs[j]->associatedVisualId == vid)
+ return __glXFBConfigs[j];
+ }
- return NULL;
+ return NULL;
}
-static __GLXFBConfig *glxLookupBackEndFBConfig( GLXFBConfigID id, int screen )
+static __GLXFBConfig *
+glxLookupBackEndFBConfig(GLXFBConfigID id, int screen)
{
- int i;
- int j;
+ int i;
+ int j;
- for (i=0, j=0; i<__glXNumFBConfigs; i++,j+=(__glXNumActiveScreens+1) ) {
- if ( __glXFBConfigs[j]->id == id)
- return __glXFBConfigs[j+screen+1];
- }
+ for (i = 0, j = 0; i < __glXNumFBConfigs;
+ i++, j += (__glXNumActiveScreens + 1)) {
+ if (__glXFBConfigs[j]->id == id)
+ return __glXFBConfigs[j + screen + 1];
+ }
- return NULL;
+ return NULL;
}
-Display *GetBackEndDisplay( __GLXclientState *cl, int s )
+Display *
+GetBackEndDisplay(__GLXclientState * cl, int s)
{
- if (! cl->be_displays[s] ) {
- cl->be_displays[s] = XOpenDisplay( DisplayString(dmxScreens[s].beDisplay) );
- }
- return cl->be_displays[s];
+ if (!cl->be_displays[s]) {
+ cl->be_displays[s] =
+ XOpenDisplay(DisplayString(dmxScreens[s].beDisplay));
+ }
+ return cl->be_displays[s];
}
/*
** Create a GL context with the given properties.
*/
-static int CreateContext(__GLXclientState *cl,
- GLXContextID gcId,
- VisualID vid, GLXFBConfigID fbconfigId,
- int screen,
- GLXContextID shareList,
- int isDirect )
+static int
+CreateContext(__GLXclientState * cl,
+ GLXContextID gcId,
+ VisualID vid, GLXFBConfigID fbconfigId,
+ int screen, GLXContextID shareList, int isDirect)
{
ClientPtr client = cl->client;
xGLXCreateContextReq *be_req;
@@ -142,20 +149,19 @@ static int CreateContext(__GLXclientState *cl,
GLXFBConfigID be_fbconfigId = 0;
int num_be_screens;
Display *dpy;
-
+
/*
- ** Check if screen exists.
- */
+ ** Check if screen exists.
+ */
if (screen >= screenInfo.numScreens) {
- client->errorValue = screen;
- return BadValue;
+ client->errorValue = screen;
+ return BadValue;
}
-
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
@@ -164,87 +170,88 @@ static int CreateContext(__GLXclientState *cl,
**
*/
if (shareList == None) {
- shareglxc = NULL;
- } else {
- dixLookupResourceByType((pointer*) &shareglxc, shareList,
- __glXContextRes, NullClient, DixUnknownAccess);
- if (!shareglxc) {
- client->errorValue = shareList;
- return __glXBadContext;
- }
+ shareglxc = NULL;
+ }
+ else {
+ dixLookupResourceByType((pointer *) &shareglxc, shareList,
+ __glXContextRes, NullClient, DixUnknownAccess);
+ if (!shareglxc) {
+ client->errorValue = shareList;
+ return __glXBadContext;
+ }
}
/*
- ** Allocate memory for the new context
- */
+ ** Allocate memory for the new context
+ */
glxc = calloc(1, sizeof(__GLXcontext));
if (!glxc) {
- return BadAlloc;
+ return BadAlloc;
}
pScreen = screenInfo.screens[screen];
pGlxScreen = &__glXActiveScreens[screen];
if (fbconfigId != None) {
- glxc->pFBConfig = glxLookupFBConfig( fbconfigId );
- if (!glxc->pFBConfig) {
- client->errorValue = fbconfigId;
- free( glxc );
- return BadValue;
- }
- visual = glxc->pFBConfig->associatedVisualId;
+ glxc->pFBConfig = glxLookupFBConfig(fbconfigId);
+ if (!glxc->pFBConfig) {
+ client->errorValue = fbconfigId;
+ free(glxc);
+ return BadValue;
+ }
+ visual = glxc->pFBConfig->associatedVisualId;
}
else {
- glxc->pFBConfig = NULL;
+ glxc->pFBConfig = NULL;
}
if (visual != None) {
- /*
- ** Check if the visual ID is valid for this screen.
- */
- pVisual = pScreen->visuals;
- for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
- if (pVisual->vid == visual) {
- break;
- }
- }
- if (i == pScreen->numVisuals) {
- client->errorValue = visual;
- free( glxc );
- return BadValue;
- }
-
- pGlxVisual = pGlxScreen->pGlxVisual;
- for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
- if (pGlxVisual->vid == visual) {
- break;
- }
- }
- if (i == pGlxScreen->numVisuals) {
- /*
- ** Visual not support on this screen by this OpenGL implementation.
- */
- client->errorValue = visual;
- free( glxc );
- return BadValue;
- }
-
- if ( glxc->pFBConfig == NULL ) {
- glxc->pFBConfig = glxLookupFBConfigByVID( visual );
-
- if ( glxc->pFBConfig == NULL ) {
- /*
- * visual does not have an FBConfig ???
- client->errorValue = visual;
- free( glxc );
- return BadValue;
- */
- }
- }
+ /*
+ ** Check if the visual ID is valid for this screen.
+ */
+ pVisual = pScreen->visuals;
+ for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
+ if (pVisual->vid == visual) {
+ break;
+ }
+ }
+ if (i == pScreen->numVisuals) {
+ client->errorValue = visual;
+ free(glxc);
+ return BadValue;
+ }
+
+ pGlxVisual = pGlxScreen->pGlxVisual;
+ for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
+ if (pGlxVisual->vid == visual) {
+ break;
+ }
+ }
+ if (i == pGlxScreen->numVisuals) {
+ /*
+ ** Visual not support on this screen by this OpenGL implementation.
+ */
+ client->errorValue = visual;
+ free(glxc);
+ return BadValue;
+ }
+
+ if (glxc->pFBConfig == NULL) {
+ glxc->pFBConfig = glxLookupFBConfigByVID(visual);
+
+ if (glxc->pFBConfig == NULL) {
+ /*
+ * visual does not have an FBConfig ???
+ client->errorValue = visual;
+ free( glxc );
+ return BadValue;
+ */
+ }
+ }
}
else {
- pVisual = NULL;
- pGlxVisual = NULL;
+ pVisual = NULL;
+ pGlxVisual = NULL;
}
glxc->pScreen = pScreen;
@@ -256,140 +263,152 @@ static int CreateContext(__GLXclientState *cl,
* allocate memory for back-end servers info
*/
num_be_screens = to_screen - from_screen + 1;
- glxc->real_ids = (XID *)malloc(sizeof(XID) * num_be_screens);
+ glxc->real_ids = (XID *) malloc(sizeof(XID) * num_be_screens);
if (!glxc->real_ids) {
- return BadAlloc;
+ return BadAlloc;
}
- glxc->real_vids = (XID *)malloc(sizeof(XID) * num_be_screens);
+ glxc->real_vids = (XID *) malloc(sizeof(XID) * num_be_screens);
if (!glxc->real_vids) {
- return BadAlloc;
+ return BadAlloc;
}
for (screen = from_screen; screen <= to_screen; screen++) {
- int sent = 0;
- pScreen = screenInfo.screens[screen];
- pGlxScreen = &__glXActiveScreens[screen];
- dmxScreen = &dmxScreens[screen];
-
- if (glxc->pFBConfig) {
- __GLXFBConfig *beFBConfig = glxLookupBackEndFBConfig( glxc->pFBConfig->id,
- screen );
- be_fbconfigId = beFBConfig->id;
- }
-
- if (pGlxVisual) {
-
- be_vid = glxMatchGLXVisualInConfigList( pGlxVisual,
- dmxScreen->glxVisuals,
- dmxScreen->numGlxVisuals );
-
- if (!be_vid) {
- /* visual is not supported on the back-end server */
- free( glxc->real_ids );
- free( glxc->real_vids );
- free( glxc );
- return BadValue;
- }
- }
-
- glxc->real_ids[screen-from_screen] = XAllocID(GetBackEndDisplay(cl,screen));
-
- /* send the create context request to the back-end server */
- dpy = GetBackEndDisplay(cl,screen);
- if (glxc->pFBConfig) {
- /*Since for a certain visual both RGB and COLOR INDEX
- *can be on then the only parmeter to choose the renderType
- * should be the class of the colormap since all 4 first
- * classes does not support RGB mode only COLOR INDEX ,
- * and so TrueColor and DirectColor does not support COLOR INDEX*/
- int renderType = glxc->pFBConfig->renderType;
- if ( pVisual ) {
- switch ( pVisual->class ){
- case PseudoColor:
- case StaticColor:
- case GrayScale:
- case StaticGray:
- renderType = GLX_COLOR_INDEX_TYPE;
- break;
- case TrueColor:
- case DirectColor:
- default:
- renderType = GLX_RGBA_TYPE;
- break;
- }
- }
- if ( __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- LockDisplay(dpy);
- GetReq(GLXCreateNewContext,be_new_req);
- be_new_req->reqType = dmxScreen->glxMajorOpcode;
- be_new_req->glxCode = X_GLXCreateNewContext;
- be_new_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
- be_new_req->fbconfig = (unsigned int)be_fbconfigId;
- be_new_req->screen = DefaultScreen(dpy);
- be_new_req->renderType = renderType;
-
- be_new_req->shareList = (shareglxc ? shareglxc->real_ids[screen-from_screen] : 0);
- be_new_req->isDirect = 0;
- UnlockDisplay(dpy);
- glxc->real_vids[screen-from_screen] = be_fbconfigId;
- sent = 1;
- }
- else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
-
- xGLXCreateContextWithConfigSGIXReq *ext_req;
- xGLXVendorPrivateReq *vpreq;
- LockDisplay(dpy);
- GetReqExtra(GLXVendorPrivate,
- sz_xGLXCreateContextWithConfigSGIXReq - sz_xGLXVendorPrivateReq,
- vpreq);
- ext_req = (xGLXCreateContextWithConfigSGIXReq *)vpreq;
- ext_req->reqType = dmxScreen->glxMajorOpcode;
- ext_req->glxCode = X_GLXVendorPrivate;
- ext_req->vendorCode = X_GLXvop_CreateContextWithConfigSGIX;
- ext_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
- ext_req->fbconfig = (unsigned int)be_fbconfigId;
- ext_req->screen = DefaultScreen(dpy);
- ext_req->renderType = renderType;
- ext_req->shareList = (shareglxc ? shareglxc->real_ids[screen-from_screen] : 0);
- ext_req->isDirect = 0;
- UnlockDisplay(dpy);
- glxc->real_vids[screen-from_screen] = be_fbconfigId;
- sent = 1;
- }
- }
-
- if (!sent) {
- LockDisplay(dpy);
- GetReq(GLXCreateContext,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXCreateContext;
- be_req->context = (unsigned int)glxc->real_ids[screen-from_screen];
- be_req->visual = (unsigned int)be_vid;
- be_req->screen = DefaultScreen(dpy);
- be_req->shareList = (shareglxc ? shareglxc->real_ids[screen-from_screen] : 0);
- be_req->isDirect = 0;
- UnlockDisplay(dpy);
- glxc->real_vids[screen-from_screen] = be_vid;
- }
- SyncHandle();
+ int sent = 0;
+
+ pScreen = screenInfo.screens[screen];
+ pGlxScreen = &__glXActiveScreens[screen];
+ dmxScreen = &dmxScreens[screen];
+
+ if (glxc->pFBConfig) {
+ __GLXFBConfig *beFBConfig =
+ glxLookupBackEndFBConfig(glxc->pFBConfig->id,
+ screen);
+
+ be_fbconfigId = beFBConfig->id;
+ }
+
+ if (pGlxVisual) {
+
+ be_vid = glxMatchGLXVisualInConfigList(pGlxVisual,
+ dmxScreen->glxVisuals,
+ dmxScreen->numGlxVisuals);
+
+ if (!be_vid) {
+ /* visual is not supported on the back-end server */
+ free(glxc->real_ids);
+ free(glxc->real_vids);
+ free(glxc);
+ return BadValue;
+ }
+ }
+
+ glxc->real_ids[screen - from_screen] =
+ XAllocID(GetBackEndDisplay(cl, screen));
+
+ /* send the create context request to the back-end server */
+ dpy = GetBackEndDisplay(cl, screen);
+ if (glxc->pFBConfig) {
+ /*Since for a certain visual both RGB and COLOR INDEX
+ *can be on then the only parmeter to choose the renderType
+ * should be the class of the colormap since all 4 first
+ * classes does not support RGB mode only COLOR INDEX ,
+ * and so TrueColor and DirectColor does not support COLOR INDEX*/
+ int renderType = glxc->pFBConfig->renderType;
+
+ if (pVisual) {
+ switch (pVisual->class) {
+ case PseudoColor:
+ case StaticColor:
+ case GrayScale:
+ case StaticGray:
+ renderType = GLX_COLOR_INDEX_TYPE;
+ break;
+ case TrueColor:
+ case DirectColor:
+ default:
+ renderType = GLX_RGBA_TYPE;
+ break;
+ }
+ }
+ if (__GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ LockDisplay(dpy);
+ GetReq(GLXCreateNewContext, be_new_req);
+ be_new_req->reqType = dmxScreen->glxMajorOpcode;
+ be_new_req->glxCode = X_GLXCreateNewContext;
+ be_new_req->context =
+ (unsigned int) glxc->real_ids[screen - from_screen];
+ be_new_req->fbconfig = (unsigned int) be_fbconfigId;
+ be_new_req->screen = DefaultScreen(dpy);
+ be_new_req->renderType = renderType;
+
+ be_new_req->shareList =
+ (shareglxc ? shareglxc->real_ids[screen - from_screen] : 0);
+ be_new_req->isDirect = 0;
+ UnlockDisplay(dpy);
+ glxc->real_vids[screen - from_screen] = be_fbconfigId;
+ sent = 1;
+ }
+ else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
+
+ xGLXCreateContextWithConfigSGIXReq *ext_req;
+ xGLXVendorPrivateReq *vpreq;
+
+ LockDisplay(dpy);
+ GetReqExtra(GLXVendorPrivate,
+ sz_xGLXCreateContextWithConfigSGIXReq -
+ sz_xGLXVendorPrivateReq, vpreq);
+ ext_req = (xGLXCreateContextWithConfigSGIXReq *) vpreq;
+ ext_req->reqType = dmxScreen->glxMajorOpcode;
+ ext_req->glxCode = X_GLXVendorPrivate;
+ ext_req->vendorCode = X_GLXvop_CreateContextWithConfigSGIX;
+ ext_req->context =
+ (unsigned int) glxc->real_ids[screen - from_screen];
+ ext_req->fbconfig = (unsigned int) be_fbconfigId;
+ ext_req->screen = DefaultScreen(dpy);
+ ext_req->renderType = renderType;
+ ext_req->shareList =
+ (shareglxc ? shareglxc->real_ids[screen - from_screen] : 0);
+ ext_req->isDirect = 0;
+ UnlockDisplay(dpy);
+ glxc->real_vids[screen - from_screen] = be_fbconfigId;
+ sent = 1;
+ }
+ }
+
+ if (!sent) {
+ LockDisplay(dpy);
+ GetReq(GLXCreateContext, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXCreateContext;
+ be_req->context =
+ (unsigned int) glxc->real_ids[screen - from_screen];
+ be_req->visual = (unsigned int) be_vid;
+ be_req->screen = DefaultScreen(dpy);
+ be_req->shareList =
+ (shareglxc ? shareglxc->real_ids[screen - from_screen] : 0);
+ be_req->isDirect = 0;
+ UnlockDisplay(dpy);
+ glxc->real_vids[screen - from_screen] = be_vid;
+ }
+ SyncHandle();
}
/*
- ** Register this context as a resource.
- */
- if (!AddResource(gcId, __glXContextRes, (pointer)glxc)) {
- free( glxc->real_ids );
- free( glxc->real_vids );
- free( glxc );
- client->errorValue = gcId;
- return BadAlloc;
- }
-
+ ** Register this context as a resource.
+ */
+ if (!AddResource(gcId, __glXContextRes, (pointer) glxc)) {
+ free(glxc->real_ids);
+ free(glxc->real_vids);
+ free(glxc);
+ client->errorValue = gcId;
+ return BadAlloc;
+ }
+
/*
- ** Finally, now that everything is working, setup the rest of the
- ** context.
- */
+ ** Finally, now that everything is working, setup the rest of the
+ ** context.
+ */
glxc->id = gcId;
glxc->share_id = shareList;
glxc->idExists = GL_TRUE;
@@ -398,38 +417,43 @@ static int CreateContext(__GLXclientState *cl,
return Success;
}
-int __glXCreateContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXCreateContext(__GLXclientState * cl, GLbyte * pc)
{
xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
- return( CreateContext(cl, req->context,req->visual, None,
- req->screen, req->shareList, req->isDirect) );
+ return (CreateContext(cl, req->context, req->visual, None,
+ req->screen, req->shareList, req->isDirect));
}
-int __glXCreateNewContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXCreateNewContext(__GLXclientState * cl, GLbyte * pc)
{
xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
- return( CreateContext(cl, req->context,None, req->fbconfig,
- req->screen, req->shareList, req->isDirect) );
+ return (CreateContext(cl, req->context, None, req->fbconfig,
+ req->screen, req->shareList, req->isDirect));
}
-int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
{
- xGLXCreateContextWithConfigSGIXReq *req = (xGLXCreateContextWithConfigSGIXReq *) pc;
+ xGLXCreateContextWithConfigSGIXReq *req =
+ (xGLXCreateContextWithConfigSGIXReq *) pc;
- return( CreateContext(cl, req->context, None, req->fbconfig,
- req->screen, req->shareList, req->isDirect) );
+ return (CreateContext(cl, req->context, None, req->fbconfig,
+ req->screen, req->shareList, req->isDirect));
}
-int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXQueryMaxSwapBarriersSGIXReq *req =
- (xGLXQueryMaxSwapBarriersSGIXReq *)pc;
+ (xGLXQueryMaxSwapBarriersSGIXReq *) pc;
xGLXQueryMaxSwapBarriersSGIXReply reply;
reply.type = X_Reply;
@@ -438,19 +462,21 @@ int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc)
reply.max = QueryMaxSwapBarriersSGIX(req->screen);
if (client->swapped) {
- __glXSwapQueryMaxSwapBarriersSGIXReply(client, &reply);
- } else {
- WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply,
- (char *)&reply);
+ __glXSwapQueryMaxSwapBarriersSGIXReply(client, &reply);
+ }
+ else {
+ WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply,
+ (char *) &reply);
}
return Success;
}
-int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXBindSwapBarrierSGIX(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
- xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *)pc;
+ xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *) pc;
DrawablePtr pDraw;
__GLXpixmap *pGlxPixmap = NULL;
__glXWindow *pGlxWindow = NULL;
@@ -458,29 +484,32 @@ int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixGetAttrAccess);
if (rc != Success) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, req->drawable,
- __glXPixmapRes, NullClient, DixUnknownAccess);
- if (pGlxPixmap) pDraw = pGlxPixmap->pDraw;
+ dixLookupResourceByType((pointer *) &pGlxPixmap, req->drawable,
+ __glXPixmapRes, NullClient, DixUnknownAccess);
+ if (pGlxPixmap)
+ pDraw = pGlxPixmap->pDraw;
}
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, req->drawable,
- __glXWindowRes, NullClient, DixUnknownAccess);
- if (pGlxWindow) pDraw = pGlxWindow->pDraw;
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ dixLookupResourceByType((pointer *) &pGlxWindow, req->drawable,
+ __glXWindowRes, NullClient, DixUnknownAccess);
+ if (pGlxWindow)
+ pDraw = pGlxWindow->pDraw;
}
if (!pDraw) {
- client->errorValue = req->drawable;
- return __glXBadDrawable;
+ client->errorValue = req->drawable;
+ return __glXBadDrawable;
}
return BindSwapBarrierSGIX(pDraw, req->barrier);
}
-int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
- xGLXJoinSwapGroupSGIXReq *req = (xGLXJoinSwapGroupSGIXReq *)pc;
+ xGLXJoinSwapGroupSGIXReq *req = (xGLXJoinSwapGroupSGIXReq *) pc;
DrawablePtr pDraw, pMember = NULL;
__GLXpixmap *pGlxPixmap = NULL;
__glXWindow *pGlxWindow = NULL;
@@ -488,53 +517,57 @@ int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc)
rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixManageAccess);
if (rc != Success) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, req->drawable,
- __glXPixmapRes, NullClient, DixUnknownAccess);
- if (pGlxPixmap) pDraw = pGlxPixmap->pDraw;
+ dixLookupResourceByType((pointer *) &pGlxPixmap, req->drawable,
+ __glXPixmapRes, NullClient, DixUnknownAccess);
+ if (pGlxPixmap)
+ pDraw = pGlxPixmap->pDraw;
}
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, req->drawable,
- __glXWindowRes, NullClient, DixUnknownAccess);
- if (pGlxWindow) pDraw = pGlxWindow->pDraw;
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ dixLookupResourceByType((pointer *) &pGlxWindow, req->drawable,
+ __glXWindowRes, NullClient, DixUnknownAccess);
+ if (pGlxWindow)
+ pDraw = pGlxWindow->pDraw;
}
if (!pDraw) {
- client->errorValue = req->drawable;
- return __glXBadDrawable;
+ client->errorValue = req->drawable;
+ return __glXBadDrawable;
}
if (req->member != None) {
- rc = dixLookupDrawable(&pMember, req->member, client, 0,
- DixGetAttrAccess);
- if (rc != Success) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, req->member,
+ rc = dixLookupDrawable(&pMember, req->member, client, 0,
+ DixGetAttrAccess);
+ if (rc != Success) {
+ dixLookupResourceByType((pointer *) &pGlxPixmap, req->member,
__glXPixmapRes, NullClient,
DixUnknownAccess);
- if (pGlxPixmap) pMember = pGlxPixmap->pDraw;
- }
+ if (pGlxPixmap)
+ pMember = pGlxPixmap->pDraw;
+ }
- if (!pMember && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, req->member,
+ if (!pMember && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ dixLookupResourceByType((pointer *) &pGlxWindow, req->member,
__glXWindowRes, NullClient,
DixUnknownAccess);
- if (pGlxWindow) pMember = pGlxWindow->pDraw;
- }
+ if (pGlxWindow)
+ pMember = pGlxWindow->pDraw;
+ }
- if (!pMember) {
- client->errorValue = req->member;
- return __glXBadDrawable;
- }
+ if (!pMember) {
+ client->errorValue = req->member;
+ return __glXBadDrawable;
+ }
}
return JoinSwapGroupSGIX(pDraw, pMember);
}
-
/*
** Destroy a GL context as an X resource.
*/
-int __glXDestroyContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDestroyContext(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
@@ -544,46 +577,47 @@ int __glXDestroyContext(__GLXclientState *cl, GLbyte *pc)
int from_screen = 0;
int to_screen = 0;
int s;
-
- dixLookupResourceByType((pointer*) &glxc, gcId, __glXContextRes,
- NullClient, DixUnknownAccess);
+
+ dixLookupResourceByType((pointer *) &glxc, gcId, __glXContextRes,
+ NullClient, DixUnknownAccess);
if (glxc) {
- /*
- ** Just free the resource; don't actually destroy the context,
- ** because it might be in use. The
- ** destroy method will be called by the resource destruction routine
- ** if necessary.
- */
- FreeResourceByType(gcId, __glXContextRes, FALSE);
+ /*
+ ** Just free the resource; don't actually destroy the context,
+ ** because it might be in use. The
+ ** destroy method will be called by the resource destruction routine
+ ** if necessary.
+ */
+ FreeResourceByType(gcId, __glXContextRes, FALSE);
- from_screen = to_screen = glxc->pScreen->myNum;
+ from_screen = to_screen = glxc->pScreen->myNum;
- } else {
- client->errorValue = gcId;
- return __glXBadContext;
+ }
+ else {
+ client->errorValue = gcId;
+ return __glXBadContext;
}
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
/*
* send DestroyContext request to all back-end servers
*/
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
- LockDisplay(dpy);
- GetReq(GLXDestroyContext,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXDestroyContext;
- be_req->context = glxc->real_ids[s-from_screen];
- UnlockDisplay(dpy);
- SyncHandle();
+ LockDisplay(dpy);
+ GetReq(GLXDestroyContext, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXDestroyContext;
+ be_req->context = glxc->real_ids[s - from_screen];
+ UnlockDisplay(dpy);
+ SyncHandle();
}
return Success;
@@ -600,83 +634,97 @@ int __glXDestroyContext(__GLXclientState *cl, GLbyte *pc)
/*
** Add a current context, and return the tag that will be used to refer to it.
*/
-static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc, DrawablePtr pDraw)
+static int
+AddCurrentContext(__GLXclientState * cl, __GLXcontext * glxc, DrawablePtr pDraw)
{
int i;
int num = cl->numCurrentContexts;
__GLXcontext **table = cl->currentContexts;
- if (!glxc) return -1;
-
+ if (!glxc)
+ return -1;
+
/*
- ** Try to find an empty slot and use it.
- */
- for (i=0; i < num; i++) {
- if (!table[i]) {
- table[i] = glxc;
- return i+1;
- }
+ ** Try to find an empty slot and use it.
+ */
+ for (i = 0; i < num; i++) {
+ if (!table[i]) {
+ table[i] = glxc;
+ return i + 1;
+ }
}
/*
- ** Didn't find a free slot, so we'll have to grow the table.
- */
+ ** Didn't find a free slot, so we'll have to grow the table.
+ */
if (!num) {
- table = (__GLXcontext **) malloc(sizeof(__GLXcontext *));
- cl->currentDrawables = (DrawablePtr *) malloc(sizeof(DrawablePtr));
- cl->be_currentCTag = (GLXContextTag *) malloc(screenInfo.numScreens *sizeof(GLXContextTag));
- } else {
- table = (__GLXcontext **) realloc(table,
- (num+1)*sizeof(__GLXcontext *));
- cl->currentDrawables = (DrawablePtr *) realloc(
- cl->currentDrawables ,
- (num+1)*sizeof(DrawablePtr));
- cl->be_currentCTag = (GLXContextTag *) realloc(cl->be_currentCTag,
- (num+1)*screenInfo.numScreens*sizeof(GLXContextTag));
+ table = (__GLXcontext **) malloc(sizeof(__GLXcontext *));
+ cl->currentDrawables = (DrawablePtr *) malloc(sizeof(DrawablePtr));
+ cl->be_currentCTag =
+ (GLXContextTag *) malloc(screenInfo.numScreens *
+ sizeof(GLXContextTag));
+ }
+ else {
+ table = (__GLXcontext **) realloc(table,
+ (num + 1) * sizeof(__GLXcontext *));
+ cl->currentDrawables = (DrawablePtr *) realloc(cl->currentDrawables,
+ (num +
+ 1) *
+ sizeof(DrawablePtr));
+ cl->be_currentCTag =
+ (GLXContextTag *) realloc(cl->be_currentCTag,
+ (num +
+ 1) * screenInfo.numScreens *
+ sizeof(GLXContextTag));
}
table[num] = glxc;
cl->currentDrawables[num] = pDraw;
cl->currentContexts = table;
cl->numCurrentContexts++;
- memset(cl->be_currentCTag + num*screenInfo.numScreens, 0,
- screenInfo.numScreens * sizeof(GLXContextTag));
+ memset(cl->be_currentCTag + num * screenInfo.numScreens, 0,
+ screenInfo.numScreens * sizeof(GLXContextTag));
- return num+1;
+ return num + 1;
}
/*
** Given a tag, change the current context for the corresponding entry.
*/
-static void ChangeCurrentContext(__GLXclientState *cl, __GLXcontext *glxc,
- GLXContextTag tag)
+static void
+ChangeCurrentContext(__GLXclientState * cl, __GLXcontext * glxc,
+ GLXContextTag tag)
{
__GLXcontext **table = cl->currentContexts;
- table[tag-1] = glxc;
+
+ table[tag - 1] = glxc;
}
/*
** Given a tag, and back-end screen number, retrives the current back-end
** tag.
*/
-int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s)
+int
+GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag, int s)
{
- if (tag >0) {
- return( cl->be_currentCTag[ (tag-1)*screenInfo.numScreens + s ] );
- }
- else {
- return 0;
- }
+ if (tag > 0) {
+ return (cl->be_currentCTag[(tag - 1) * screenInfo.numScreens + s]);
+ }
+ else {
+ return 0;
+ }
}
/*
** Given a tag, and back-end screen number, sets the current back-end
** tag.
*/
-static void SetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s, GLXContextTag be_tag)
+static void
+SetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag, int s,
+ GLXContextTag be_tag)
{
- if (tag >0) {
- cl->be_currentCTag[ (tag-1)*screenInfo.numScreens + s ] = be_tag;
- }
+ if (tag > 0) {
+ cl->be_currentCTag[(tag - 1) * screenInfo.numScreens + s] = be_tag;
+ }
}
/*
@@ -684,45 +732,51 @@ static void SetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s,
** context's entry in the table as the context tag. A tag must be greater
** than 0.
*/
-__GLXcontext *__glXLookupContextByTag(__GLXclientState *cl, GLXContextTag tag)
+__GLXcontext *
+__glXLookupContextByTag(__GLXclientState * cl, GLXContextTag tag)
{
int num = cl->numCurrentContexts;
if (tag < 1 || tag > num) {
- return 0;
- } else {
- return cl->currentContexts[tag-1];
+ return 0;
+ }
+ else {
+ return cl->currentContexts[tag - 1];
}
}
-DrawablePtr __glXLookupDrawableByTag(__GLXclientState *cl, GLXContextTag tag)
+DrawablePtr
+__glXLookupDrawableByTag(__GLXclientState * cl, GLXContextTag tag)
{
int num = cl->numCurrentContexts;
if (tag < 1 || tag > num) {
- return 0;
- } else {
- return cl->currentDrawables[tag-1];
+ return 0;
+ }
+ else {
+ return cl->currentDrawables[tag - 1];
}
}
/*****************************************************************************/
-static void StopUsingContext(__GLXcontext *glxc)
+static void
+StopUsingContext(__GLXcontext * glxc)
{
if (glxc) {
- if (glxc == __glXLastContext) {
- /* Tell server GL library */
- __glXLastContext = 0;
- }
- glxc->isCurrent = GL_FALSE;
- if (!glxc->idExists) {
- __glXFreeContext(glxc);
- }
+ if (glxc == __glXLastContext) {
+ /* Tell server GL library */
+ __glXLastContext = 0;
+ }
+ glxc->isCurrent = GL_FALSE;
+ if (!glxc->idExists) {
+ __glXFreeContext(glxc);
+ }
}
}
-static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc)
+static void
+StartUsingContext(__GLXclientState * cl, __GLXcontext * glxc)
{
glxc->isCurrent = GL_TRUE;
}
@@ -731,11 +785,11 @@ static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc)
/*
** Make an OpenGL context and drawable current.
*/
-static int MakeCurrent(__GLXclientState *cl,
- GLXDrawable drawable,
- GLXDrawable readdrawable,
- GLXContextID context,
- GLXContextTag oldContextTag)
+static int
+MakeCurrent(__GLXclientState * cl,
+ GLXDrawable drawable,
+ GLXDrawable readdrawable,
+ GLXContextID context, GLXContextTag oldContextTag)
{
ClientPtr client = cl->client;
DrawablePtr pDraw = NULL;
@@ -758,6 +812,7 @@ static int MakeCurrent(__GLXclientState *cl,
__glXWindow *pGlxReadWindow = NULL;
__glXPbuffer *pGlxPbuffer = NULL;
__glXPbuffer *pGlxReadPbuffer = NULL;
+
#ifdef PANORAMIX
PanoramiXRes *pXinDraw = NULL;
PanoramiXRes *pXinReadDraw = NULL;
@@ -767,117 +822,122 @@ static int MakeCurrent(__GLXclientState *cl,
int s, rc;
/*
- ** If one is None and the other isn't, it's a bad match.
- */
+ ** If one is None and the other isn't, it's a bad match.
+ */
if ((drawId == None && contextId != None) ||
- (drawId != None && contextId == None)) {
- return BadMatch;
+ (drawId != None && contextId == None)) {
+ return BadMatch;
}
-
+
/*
- ** Lookup old context. If we have one, it must be in a usable state.
- */
+ ** Lookup old context. If we have one, it must be in a usable state.
+ */
if (tag != 0) {
- prevglxc = __glXLookupContextByTag(cl, tag);
- if (!prevglxc) {
- /*
- ** Tag for previous context is invalid.
- */
- return __glXBadContextTag;
- }
- } else {
- prevglxc = 0;
+ prevglxc = __glXLookupContextByTag(cl, tag);
+ if (!prevglxc) {
+ /*
+ ** Tag for previous context is invalid.
+ */
+ return __glXBadContextTag;
+ }
+ }
+ else {
+ prevglxc = 0;
}
/*
- ** Lookup new context. It must not be current for someone else.
- */
+ ** Lookup new context. It must not be current for someone else.
+ */
if (contextId != None) {
- dixLookupResourceByType((pointer*) &glxc, contextId, __glXContextRes,
- NullClient, DixUnknownAccess);
- if (!glxc) {
- client->errorValue = contextId;
- return __glXBadContext;
- }
- if ((glxc != prevglxc) && glxc->isCurrent) {
- /* Context is current to somebody else */
- return BadAccess;
- }
- } else {
- /* Switching to no context. Ignore new drawable. */
- glxc = 0;
+ dixLookupResourceByType((pointer *) &glxc, contextId, __glXContextRes,
+ NullClient, DixUnknownAccess);
+ if (!glxc) {
+ client->errorValue = contextId;
+ return __glXBadContext;
+ }
+ if ((glxc != prevglxc) && glxc->isCurrent) {
+ /* Context is current to somebody else */
+ return BadAccess;
+ }
+ }
+ else {
+ /* Switching to no context. Ignore new drawable. */
+ glxc = 0;
}
if (drawId != None) {
- rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
- if (rc == Success) {
- if (pDraw->type == DRAWABLE_WINDOW) {
- /*
- ** Drawable is an X Window.
- */
- VisualID vid;
- pWin = (WindowPtr)pDraw;
- vid = wVisual(pWin);
-
- new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
- new_reply.writeType = GLX_WINDOW_TYPE;
-
- /*
- ** Check if window and context are similar.
- */
- if ((vid != glxc->pVisual->vid) ||
- (pWin->drawable.pScreen != glxc->pScreen)) {
- client->errorValue = drawId;
- return BadMatch;
- }
-
- from_screen = to_screen = pWin->drawable.pScreen->myNum;
-
- } else {
- /*
- ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
- ** is, but it must first be created with glxCreateGLXPixmap).
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
+ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
+ if (rc == Success) {
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ /*
+ ** Drawable is an X Window.
+ */
+ VisualID vid;
+
+ pWin = (WindowPtr) pDraw;
+ vid = wVisual(pWin);
+
+ new_reply.writeVid =
+ (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
+ new_reply.writeType = GLX_WINDOW_TYPE;
+
+ /*
+ ** Check if window and context are similar.
+ */
+ if ((vid != glxc->pVisual->vid) ||
+ (pWin->drawable.pScreen != glxc->pScreen)) {
+ client->errorValue = drawId;
+ return BadMatch;
+ }
+
+ from_screen = to_screen = pWin->drawable.pScreen->myNum;
+
+ }
+ else {
+ /*
+ ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
+ ** is, but it must first be created with glxCreateGLXPixmap).
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
if (!pDraw) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, drawId,
- __glXPixmapRes, NullClient,
- DixUnknownAccess);
- if (pGlxPixmap) {
- /*
- ** Check if pixmap and context are similar.
- */
- if (pGlxPixmap->pScreen != glxc->pScreen ||
- pGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
- client->errorValue = drawId;
- return BadMatch;
- }
- pDraw = pGlxPixmap->pDraw;
-
- new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
- pGlxPixmap->pGlxVisual->vid);
-
- new_reply.writeType = GLX_PIXMAP_TYPE;
-
- from_screen = to_screen = pGlxPixmap->pScreen->myNum;
-
- }
- }
-
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, drawId,
- __glXWindowRes, NullClient,
- DixUnknownAccess);
+ dixLookupResourceByType((pointer *) &pGlxPixmap, drawId,
+ __glXPixmapRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxPixmap) {
+ /*
+ ** Check if pixmap and context are similar.
+ */
+ if (pGlxPixmap->pScreen != glxc->pScreen ||
+ pGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
+ client->errorValue = drawId;
+ return BadMatch;
+ }
+ pDraw = pGlxPixmap->pDraw;
+
+ new_reply.writeVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
+ pGlxPixmap->pGlxVisual->vid);
+
+ new_reply.writeType = GLX_PIXMAP_TYPE;
+
+ from_screen = to_screen = pGlxPixmap->pScreen->myNum;
+
+ }
+ }
+
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ dixLookupResourceByType((pointer *) &pGlxWindow, drawId,
+ __glXWindowRes, NullClient,
+ DixUnknownAccess);
if (pGlxWindow) {
/*
- ** Drawable is a GLXWindow.
- **
- ** Check if GLX window and context are similar.
- */
+ ** Drawable is a GLXWindow.
+ **
+ ** Check if GLX window and context are similar.
+ */
if (pGlxWindow->pScreen != glxc->pScreen ||
pGlxWindow->pGlxFBConfig != glxc->pFBConfig) {
client->errorValue = drawId;
@@ -889,103 +949,107 @@ static int MakeCurrent(__GLXclientState *cl,
new_reply.writeType = GLX_GLXWINDOW_TYPE;
}
- }
+ }
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxPbuffer, drawId,
- __glXPbufferRes, NullClient,
- DixUnknownAccess);
- if (pGlxPbuffer) {
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ dixLookupResourceByType((pointer *) &pGlxPbuffer, drawId,
+ __glXPbufferRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxPbuffer) {
if (pGlxPbuffer->pScreen != glxc->pScreen ||
pGlxPbuffer->pFBConfig != glxc->pFBConfig) {
client->errorValue = drawId;
return BadMatch;
}
- pDraw = (DrawablePtr)pGlxPbuffer;
+ pDraw = (DrawablePtr) pGlxPbuffer;
new_reply.writeVid = pGlxPbuffer->pFBConfig->id;
new_reply.writeType = GLX_PBUFFER_TYPE;
- }
- }
-
- if (!pDraw) {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- } else {
- pDraw = 0;
- }
-
- if (readId != None && readId != drawId ) {
- rc = dixLookupDrawable(&pReadDraw, readId, client, 0, DixReadAccess);
- if (rc == Success) {
- if (pReadDraw->type == DRAWABLE_WINDOW) {
- /*
- ** Drawable is an X Window.
- */
- VisualID vid;
- pReadWin = (WindowPtr)pDraw;
- vid = wVisual(pReadWin);
-
- new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
- new_reply.readType = GLX_WINDOW_TYPE;
-
- /*
- ** Check if window and context are similar.
- */
- if ((vid != glxc->pVisual->vid) ||
- (pReadWin->drawable.pScreen != glxc->pScreen)) {
- client->errorValue = readId;
- return BadMatch;
- }
-
- } else {
-
- /*
- ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
- ** is, but it must first be created with glxCreateGLXPixmap).
- */
- client->errorValue = readId;
- return __glXBadDrawable;
- }
- }
-
- if (!pReadDraw) {
- dixLookupResourceByType((pointer*) &pReadGlxPixmap, readId,
- __glXPixmapRes, NullClient,
- DixUnknownAccess);
- if (pReadGlxPixmap) {
- /*
- ** Check if pixmap and context are similar.
- */
- if (pReadGlxPixmap->pScreen != glxc->pScreen ||
- pReadGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
- client->errorValue = readId;
- return BadMatch;
- }
- pReadDraw = pReadGlxPixmap->pDraw;
-
- new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
- pReadGlxPixmap->pGlxVisual->vid );
- new_reply.readType = GLX_PIXMAP_TYPE;
-
- }
- }
-
- if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxReadWindow, readId,
- __glXWindowRes, NullClient,
- DixUnknownAccess);
+ }
+ }
+
+ if (!pDraw) {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ }
+ else {
+ pDraw = 0;
+ }
+
+ if (readId != None && readId != drawId) {
+ rc = dixLookupDrawable(&pReadDraw, readId, client, 0, DixReadAccess);
+ if (rc == Success) {
+ if (pReadDraw->type == DRAWABLE_WINDOW) {
+ /*
+ ** Drawable is an X Window.
+ */
+ VisualID vid;
+
+ pReadWin = (WindowPtr) pDraw;
+ vid = wVisual(pReadWin);
+
+ new_reply.readVid =
+ (glxc->pFBConfig ? glxc->pFBConfig->id : vid);
+ new_reply.readType = GLX_WINDOW_TYPE;
+
+ /*
+ ** Check if window and context are similar.
+ */
+ if ((vid != glxc->pVisual->vid) ||
+ (pReadWin->drawable.pScreen != glxc->pScreen)) {
+ client->errorValue = readId;
+ return BadMatch;
+ }
+
+ }
+ else {
+
+ /*
+ ** An X Pixmap is not allowed as a parameter (a GLX Pixmap
+ ** is, but it must first be created with glxCreateGLXPixmap).
+ */
+ client->errorValue = readId;
+ return __glXBadDrawable;
+ }
+ }
+
+ if (!pReadDraw) {
+ dixLookupResourceByType((pointer *) &pReadGlxPixmap, readId,
+ __glXPixmapRes, NullClient,
+ DixUnknownAccess);
+ if (pReadGlxPixmap) {
+ /*
+ ** Check if pixmap and context are similar.
+ */
+ if (pReadGlxPixmap->pScreen != glxc->pScreen ||
+ pReadGlxPixmap->pGlxVisual != glxc->pGlxVisual) {
+ client->errorValue = readId;
+ return BadMatch;
+ }
+ pReadDraw = pReadGlxPixmap->pDraw;
+
+ new_reply.readVid = (glxc->pFBConfig ? glxc->pFBConfig->id :
+ pReadGlxPixmap->pGlxVisual->vid);
+ new_reply.readType = GLX_PIXMAP_TYPE;
+
+ }
+ }
+
+ if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ dixLookupResourceByType((pointer *) &pGlxReadWindow, readId,
+ __glXWindowRes, NullClient,
+ DixUnknownAccess);
if (pGlxReadWindow) {
/*
- ** Drawable is a GLXWindow.
- **
- ** Check if GLX window and context are similar.
- */
+ ** Drawable is a GLXWindow.
+ **
+ ** Check if GLX window and context are similar.
+ */
if (pGlxReadWindow->pScreen != glxc->pScreen ||
pGlxReadWindow->pGlxFBConfig != glxc->pFBConfig) {
client->errorValue = readId;
@@ -996,140 +1060,143 @@ static int MakeCurrent(__GLXclientState *cl,
new_reply.readVid = pGlxReadWindow->pGlxFBConfig->id;
new_reply.readType = GLX_GLXWINDOW_TYPE;
}
- }
+ }
- if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxReadPbuffer, readId,
- __glXPbufferRes, NullClient,
- DixUnknownAccess);
- if (pGlxReadPbuffer) {
+ if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ dixLookupResourceByType((pointer *) &pGlxReadPbuffer, readId,
+ __glXPbufferRes, NullClient,
+ DixUnknownAccess);
+ if (pGlxReadPbuffer) {
if (pGlxReadPbuffer->pScreen != glxc->pScreen ||
pGlxReadPbuffer->pFBConfig != glxc->pFBConfig) {
client->errorValue = drawId;
return BadMatch;
}
- pReadDraw = (DrawablePtr)pGlxReadPbuffer;
+ pReadDraw = (DrawablePtr) pGlxReadPbuffer;
new_reply.readVid = pGlxReadPbuffer->pFBConfig->id;
new_reply.readType = GLX_PBUFFER_TYPE;
- }
- }
+ }
+ }
- if (!pReadDraw) {
- /*
- ** Drawable is neither a Window nor a GLXPixmap.
- */
- client->errorValue = readId;
- return __glXBadDrawable;
- }
+ if (!pReadDraw) {
+ /*
+ ** Drawable is neither a Window nor a GLXPixmap.
+ */
+ client->errorValue = readId;
+ return __glXBadDrawable;
+ }
- } else {
- pReadDraw = pDraw;
- pReadGlxPixmap = pGlxPixmap;
- pReadWin = pWin;
- new_reply.readVid = new_reply.writeVid;
- new_reply.readType = new_reply.writeType;
+ }
+ else {
+ pReadDraw = pDraw;
+ pReadGlxPixmap = pGlxPixmap;
+ pReadWin = pWin;
+ new_reply.readVid = new_reply.writeVid;
+ new_reply.readType = new_reply.writeType;
}
if (prevglxc) {
- if (prevglxc->pGlxPixmap) {
- /*
- ** The previous drawable was a glx pixmap, release it.
- */
- prevglxc->pGlxPixmap->refcnt--;
- __glXFreeGLXPixmap( prevglxc->pGlxPixmap );
- prevglxc->pGlxPixmap = 0;
- }
-
- if (prevglxc->pGlxReadPixmap) {
- /*
- ** The previous drawable was a glx pixmap, release it.
- */
- prevglxc->pGlxReadPixmap->refcnt--;
- __glXFreeGLXPixmap( prevglxc->pGlxReadPixmap );
- prevglxc->pGlxReadPixmap = 0;
- }
-
- if (prevglxc->pGlxWindow) {
- /*
- ** The previous drawable was a glx window, release it.
- */
- prevglxc->pGlxWindow->refcnt--;
- __glXFreeGLXWindow( prevglxc->pGlxWindow );
- prevglxc->pGlxWindow = 0;
- }
-
- if (prevglxc->pGlxReadWindow) {
- /*
- ** The previous drawable was a glx window, release it.
- */
- prevglxc->pGlxReadWindow->refcnt--;
- __glXFreeGLXWindow( prevglxc->pGlxReadWindow );
- prevglxc->pGlxReadWindow = 0;
- }
-
- if (prevglxc->pGlxPbuffer) {
- /*
- ** The previous drawable was a glx Pbuffer, release it.
- */
- prevglxc->pGlxPbuffer->refcnt--;
- __glXFreeGLXPbuffer( prevglxc->pGlxPbuffer );
- prevglxc->pGlxPbuffer = 0;
- }
-
- if (prevglxc->pGlxReadPbuffer) {
- /*
- ** The previous drawable was a glx Pbuffer, release it.
- */
- prevglxc->pGlxReadPbuffer->refcnt--;
- __glXFreeGLXPbuffer( prevglxc->pGlxReadPbuffer );
- prevglxc->pGlxReadPbuffer = 0;
- }
-
- ChangeCurrentContext(cl, glxc, tag);
- ChangeCurrentContext(cl, glxc, tag);
- StopUsingContext(prevglxc);
- } else {
- tag = AddCurrentContext(cl, glxc, pDraw);
+ if (prevglxc->pGlxPixmap) {
+ /*
+ ** The previous drawable was a glx pixmap, release it.
+ */
+ prevglxc->pGlxPixmap->refcnt--;
+ __glXFreeGLXPixmap(prevglxc->pGlxPixmap);
+ prevglxc->pGlxPixmap = 0;
+ }
+
+ if (prevglxc->pGlxReadPixmap) {
+ /*
+ ** The previous drawable was a glx pixmap, release it.
+ */
+ prevglxc->pGlxReadPixmap->refcnt--;
+ __glXFreeGLXPixmap(prevglxc->pGlxReadPixmap);
+ prevglxc->pGlxReadPixmap = 0;
+ }
+
+ if (prevglxc->pGlxWindow) {
+ /*
+ ** The previous drawable was a glx window, release it.
+ */
+ prevglxc->pGlxWindow->refcnt--;
+ __glXFreeGLXWindow(prevglxc->pGlxWindow);
+ prevglxc->pGlxWindow = 0;
+ }
+
+ if (prevglxc->pGlxReadWindow) {
+ /*
+ ** The previous drawable was a glx window, release it.
+ */
+ prevglxc->pGlxReadWindow->refcnt--;
+ __glXFreeGLXWindow(prevglxc->pGlxReadWindow);
+ prevglxc->pGlxReadWindow = 0;
+ }
+
+ if (prevglxc->pGlxPbuffer) {
+ /*
+ ** The previous drawable was a glx Pbuffer, release it.
+ */
+ prevglxc->pGlxPbuffer->refcnt--;
+ __glXFreeGLXPbuffer(prevglxc->pGlxPbuffer);
+ prevglxc->pGlxPbuffer = 0;
+ }
+
+ if (prevglxc->pGlxReadPbuffer) {
+ /*
+ ** The previous drawable was a glx Pbuffer, release it.
+ */
+ prevglxc->pGlxReadPbuffer->refcnt--;
+ __glXFreeGLXPbuffer(prevglxc->pGlxReadPbuffer);
+ prevglxc->pGlxReadPbuffer = 0;
+ }
+
+ ChangeCurrentContext(cl, glxc, tag);
+ ChangeCurrentContext(cl, glxc, tag);
+ StopUsingContext(prevglxc);
+ }
+ else {
+ tag = AddCurrentContext(cl, glxc, pDraw);
}
if (glxc) {
- glxc->pGlxPixmap = pGlxPixmap;
- glxc->pGlxReadPixmap = pReadGlxPixmap;
- glxc->pGlxWindow = pGlxWindow;
- glxc->pGlxReadWindow = pGlxReadWindow;
- glxc->pGlxPbuffer = pGlxPbuffer;
- glxc->pGlxReadPbuffer = pGlxReadPbuffer;
+ glxc->pGlxPixmap = pGlxPixmap;
+ glxc->pGlxReadPixmap = pReadGlxPixmap;
+ glxc->pGlxWindow = pGlxWindow;
+ glxc->pGlxReadWindow = pGlxReadWindow;
+ glxc->pGlxPbuffer = pGlxPbuffer;
+ glxc->pGlxReadPbuffer = pGlxReadPbuffer;
- if (pGlxPixmap) {
- pGlxPixmap->refcnt++;
- }
+ if (pGlxPixmap) {
+ pGlxPixmap->refcnt++;
+ }
- if (pReadGlxPixmap) {
- pReadGlxPixmap->refcnt++;
- }
+ if (pReadGlxPixmap) {
+ pReadGlxPixmap->refcnt++;
+ }
- if (pGlxWindow) {
- pGlxWindow->refcnt++;
- }
+ if (pGlxWindow) {
+ pGlxWindow->refcnt++;
+ }
- if (pGlxReadWindow) {
- pGlxReadWindow->refcnt++;
- }
+ if (pGlxReadWindow) {
+ pGlxReadWindow->refcnt++;
+ }
- if (pGlxPbuffer) {
- pGlxPbuffer->refcnt++;
- }
+ if (pGlxPbuffer) {
+ pGlxPbuffer->refcnt++;
+ }
- if (pGlxReadPbuffer) {
- pGlxReadPbuffer->refcnt++;
- }
+ if (pGlxReadPbuffer) {
+ pGlxReadPbuffer->refcnt++;
+ }
- StartUsingContext(cl, glxc);
- new_reply.contextTag = tag;
- } else {
- new_reply.contextTag = 0;
+ StartUsingContext(cl, glxc);
+ new_reply.contextTag = tag;
+ }
+ else {
+ new_reply.contextTag = 0;
}
new_reply.length = 0;
new_reply.type = X_Reply;
@@ -1137,216 +1204,226 @@ static int MakeCurrent(__GLXclientState *cl,
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
-
- if (pDraw && new_reply.writeType != GLX_PBUFFER_TYPE) {
- dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess);
- }
-
- if (pReadDraw && pReadDraw != pDraw &&
- new_reply.readType != GLX_PBUFFER_TYPE) {
- dixLookupResourceByClass((pointer*) &pXinReadDraw,
- pReadDraw->id, XRC_DRAWABLE,
- client, DixReadAccess);
- }
- else {
- pXinReadDraw = pXinDraw;
- }
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+
+ if (pDraw && new_reply.writeType != GLX_PBUFFER_TYPE) {
+ dixLookupResourceByClass((pointer *) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
+ }
+
+ if (pReadDraw && pReadDraw != pDraw &&
+ new_reply.readType != GLX_PBUFFER_TYPE) {
+ dixLookupResourceByClass((pointer *) &pXinReadDraw,
+ pReadDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
+ }
+ else {
+ pXinReadDraw = pXinDraw;
+ }
}
#endif
-
/* send the MakeCurrent request to all required
* back-end servers.
*/
- for (s = from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
- unsigned int be_draw = None;
- unsigned int be_read_draw = None;
-
- if (pGlxPixmap) {
- be_draw = pGlxPixmap->be_xids[s];
- }
- else if (pGlxPbuffer) {
- be_draw = pGlxPbuffer->be_xids[s];
- }
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
+ unsigned int be_draw = None;
+ unsigned int be_read_draw = None;
+
+ if (pGlxPixmap) {
+ be_draw = pGlxPixmap->be_xids[s];
+ }
+ else if (pGlxPbuffer) {
+ be_draw = pGlxPbuffer->be_xids[s];
+ }
#ifdef PANORAMIX
- else if (pXinDraw) {
- dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
- }
+ else if (pXinDraw) {
+ dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
+ }
#endif
- else if (pGlxWindow) {
- pWin = (WindowPtr)pGlxWindow->pDraw;
- }
-
- if (pWin && be_draw == None) {
- be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- if (!be_draw) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pWin, TRUE );
- be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- }
- }
-
- /*
- * Before sending the MakeCurrent request - sync the
- * X11 connection to the back-end servers to make sure
- * that drawable is already created
- */
- dmxSync( dmxScreen, 1 );
-
- if (drawId == readId) {
- LockDisplay(dpy);
- GetReq(GLXMakeCurrent, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXMakeCurrent;
- be_req->drawable = be_draw;
- be_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
- be_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
- if (!_XReply(dpy, (xReply *) &be_reply, 0, False)) {
-
- /* The make current failed */
- UnlockDisplay(dpy);
- SyncHandle();
- return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- SetCurrentBackEndTag( cl, tag, s, be_reply.contextTag );
- }
- else {
-
- if (pReadGlxPixmap) {
- be_read_draw = pReadGlxPixmap->be_xids[s];
- }
- else if (pGlxReadPbuffer) {
- be_read_draw = pGlxReadPbuffer->be_xids[s];
- }
+ else if (pGlxWindow) {
+ pWin = (WindowPtr) pGlxWindow->pDraw;
+ }
+
+ if (pWin && be_draw == None) {
+ be_draw = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
+ if (!be_draw) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow(pWin, TRUE);
+ be_draw = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
+ }
+ }
+
+ /*
+ * Before sending the MakeCurrent request - sync the
+ * X11 connection to the back-end servers to make sure
+ * that drawable is already created
+ */
+ dmxSync(dmxScreen, 1);
+
+ if (drawId == readId) {
+ LockDisplay(dpy);
+ GetReq(GLXMakeCurrent, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXMakeCurrent;
+ be_req->drawable = be_draw;
+ be_req->context =
+ (unsigned int) (glxc ? glxc->real_ids[s - from_screen] : 0);
+ be_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
+ if (!_XReply(dpy, (xReply *) & be_reply, 0, False)) {
+
+ /* The make current failed */
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return (BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code));
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ SetCurrentBackEndTag(cl, tag, s, be_reply.contextTag);
+ }
+ else {
+
+ if (pReadGlxPixmap) {
+ be_read_draw = pReadGlxPixmap->be_xids[s];
+ }
+ else if (pGlxReadPbuffer) {
+ be_read_draw = pGlxReadPbuffer->be_xids[s];
+ }
#ifdef PANORAMIX
- else if (pXinReadDraw) {
- dixLookupWindow(&pReadWin, pXinReadDraw->info[s].id, client,
- DixReadAccess);
- }
+ else if (pXinReadDraw) {
+ dixLookupWindow(&pReadWin, pXinReadDraw->info[s].id, client,
+ DixReadAccess);
+ }
#endif
- else if (pGlxReadWindow) {
- pReadWin = (WindowPtr)pGlxReadWindow->pDraw;
- }
-
- if (pReadWin && be_read_draw == None) {
- be_read_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pReadWin))->window;
- if (!be_read_draw) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pReadWin, TRUE );
- be_read_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pReadWin))->window;
- dmxSync( dmxScreen, 1 );
- }
- }
-
- if ( __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- LockDisplay(dpy);
- GetReq(GLXMakeContextCurrent, be_new_req);
- be_new_req->reqType = dmxScreen->glxMajorOpcode;
- be_new_req->glxCode = X_GLXMakeContextCurrent;
- be_new_req->drawable = be_draw;
- be_new_req->readdrawable = be_read_draw;
- be_new_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
- be_new_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
- if (!_XReply(dpy, (xReply *) &be_new_reply, 0, False)) {
-
- /* The make current failed */
- UnlockDisplay(dpy);
- SyncHandle();
- return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- SetCurrentBackEndTag( cl, tag, s, be_new_reply.contextTag );
- }
- else if (glxIsExtensionSupported("GLX_SGI_make_current_read")) {
- xGLXMakeCurrentReadSGIReq *ext_req;
- xGLXVendorPrivateWithReplyReq *vpreq;
- xGLXMakeCurrentReadSGIReply ext_reply;
-
- LockDisplay(dpy);
- GetReqExtra(GLXVendorPrivateWithReply,
- sz_xGLXMakeCurrentReadSGIReq - sz_xGLXVendorPrivateWithReplyReq,
- vpreq);
- ext_req = (xGLXMakeCurrentReadSGIReq *)vpreq;
- ext_req->reqType = dmxScreen->glxMajorOpcode;
- ext_req->glxCode = X_GLXVendorPrivateWithReply;
- ext_req->vendorCode = X_GLXvop_MakeCurrentReadSGI;
- ext_req->drawable = be_draw;
- ext_req->readable = be_read_draw;
- ext_req->context = (unsigned int)(glxc ? glxc->real_ids[s-from_screen] : 0);
- ext_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
- if (!_XReply(dpy, (xReply *) &ext_reply, 0, False)) {
-
- /* The make current failed */
- UnlockDisplay(dpy);
- SyncHandle();
- return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- SetCurrentBackEndTag( cl, tag, s, ext_reply.contextTag );
-
- }
- else {
- return BadMatch;
- }
- }
-
- XFlush( dpy );
+ else if (pGlxReadWindow) {
+ pReadWin = (WindowPtr) pGlxReadWindow->pDraw;
+ }
+
+ if (pReadWin && be_read_draw == None) {
+ be_read_draw =
+ (unsigned int) (DMX_GET_WINDOW_PRIV(pReadWin))->window;
+ if (!be_read_draw) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow(pReadWin, TRUE);
+ be_read_draw =
+ (unsigned int) (DMX_GET_WINDOW_PRIV(pReadWin))->window;
+ dmxSync(dmxScreen, 1);
+ }
+ }
+
+ if (__GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ LockDisplay(dpy);
+ GetReq(GLXMakeContextCurrent, be_new_req);
+ be_new_req->reqType = dmxScreen->glxMajorOpcode;
+ be_new_req->glxCode = X_GLXMakeContextCurrent;
+ be_new_req->drawable = be_draw;
+ be_new_req->readdrawable = be_read_draw;
+ be_new_req->context =
+ (unsigned int) (glxc ? glxc->real_ids[s - from_screen] : 0);
+ be_new_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
+ if (!_XReply(dpy, (xReply *) & be_new_reply, 0, False)) {
+
+ /* The make current failed */
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return (BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code));
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ SetCurrentBackEndTag(cl, tag, s, be_new_reply.contextTag);
+ }
+ else if (glxIsExtensionSupported("GLX_SGI_make_current_read")) {
+ xGLXMakeCurrentReadSGIReq *ext_req;
+ xGLXVendorPrivateWithReplyReq *vpreq;
+ xGLXMakeCurrentReadSGIReply ext_reply;
+
+ LockDisplay(dpy);
+ GetReqExtra(GLXVendorPrivateWithReply,
+ sz_xGLXMakeCurrentReadSGIReq -
+ sz_xGLXVendorPrivateWithReplyReq, vpreq);
+ ext_req = (xGLXMakeCurrentReadSGIReq *) vpreq;
+ ext_req->reqType = dmxScreen->glxMajorOpcode;
+ ext_req->glxCode = X_GLXVendorPrivateWithReply;
+ ext_req->vendorCode = X_GLXvop_MakeCurrentReadSGI;
+ ext_req->drawable = be_draw;
+ ext_req->readable = be_read_draw;
+ ext_req->context =
+ (unsigned int) (glxc ? glxc->real_ids[s - from_screen] : 0);
+ ext_req->oldContextTag = GetCurrentBackEndTag(cl, tag, s);
+ if (!_XReply(dpy, (xReply *) & ext_reply, 0, False)) {
+
+ /* The make current failed */
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return (BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code));
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ SetCurrentBackEndTag(cl, tag, s, ext_reply.contextTag);
+
+ }
+ else {
+ return BadMatch;
+ }
+ }
+
+ XFlush(dpy);
}
if (client->swapped) {
- __glXSwapMakeCurrentReply(client, &new_reply);
- } else {
- WriteToClient(client, sz_xGLXMakeContextCurrentReply, (char *)&new_reply);
+ __glXSwapMakeCurrentReply(client, &new_reply);
+ }
+ else {
+ WriteToClient(client, sz_xGLXMakeContextCurrentReply,
+ (char *) &new_reply);
}
return Success;
}
-int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc)
+int
+__glXMakeCurrent(__GLXclientState * cl, GLbyte * pc)
{
xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
- return( MakeCurrent(cl, req->drawable, req->drawable,
- req->context, req->oldContextTag ) );
+ return (MakeCurrent(cl, req->drawable, req->drawable,
+ req->context, req->oldContextTag));
}
-int __glXMakeContextCurrent(__GLXclientState *cl, GLbyte *pc)
+int
+__glXMakeContextCurrent(__GLXclientState * cl, GLbyte * pc)
{
xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
- return( MakeCurrent(cl, req->drawable, req->readdrawable,
- req->context, req->oldContextTag ) );
+ return (MakeCurrent(cl, req->drawable, req->readdrawable,
+ req->context, req->oldContextTag));
}
-int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc)
+int
+__glXMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc)
{
xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
- return( MakeCurrent(cl, req->drawable, req->readable,
- req->context, req->oldContextTag ) );
+ return (MakeCurrent(cl, req->drawable, req->readable,
+ req->context, req->oldContextTag));
}
-int __glXIsDirect(__GLXclientState *cl, GLbyte *pc)
+int
+__glXIsDirect(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
@@ -1354,13 +1431,13 @@ int __glXIsDirect(__GLXclientState *cl, GLbyte *pc)
__GLXcontext *glxc;
/*
- ** Find the GL context.
- */
- dixLookupResourceByType((pointer*) &glxc, req->context, __glXContextRes,
+ ** Find the GL context.
+ */
+ dixLookupResourceByType((pointer *) &glxc, req->context, __glXContextRes,
NullClient, DixUnknownAccess);
if (!glxc) {
- client->errorValue = req->context;
- return __glXBadContext;
+ client->errorValue = req->context;
+ return __glXBadContext;
}
reply.isDirect = 0;
@@ -1369,25 +1446,28 @@ int __glXIsDirect(__GLXclientState *cl, GLbyte *pc)
reply.sequenceNumber = client->sequence;
if (client->swapped) {
- __glXSwapIsDirectReply(client, &reply);
- } else {
- WriteToClient(client, sz_xGLXIsDirectReply, (char *)&reply);
+ __glXSwapIsDirectReply(client, &reply);
+ }
+ else {
+ WriteToClient(client, sz_xGLXIsDirectReply, (char *) &reply);
}
return Success;
}
-int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc)
+int
+__glXQueryVersion(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
+
/* xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; */
xGLXQueryVersionReply reply;
/*
- ** Server should take into consideration the version numbers sent by the
- ** client if it wants to work with older clients; however, in this
- ** implementation the server just returns its version number.
- */
+ ** Server should take into consideration the version numbers sent by the
+ ** client if it wants to work with older clients; however, in this
+ ** implementation the server just returns its version number.
+ */
reply.majorVersion = __glXVersionMajor;
reply.minorVersion = __glXVersionMinor;
reply.length = 0;
@@ -1395,98 +1475,104 @@ int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc)
reply.sequenceNumber = client->sequence;
if (client->swapped) {
- __glXSwapQueryVersionReply(client, &reply);
- } else {
- WriteToClient(client, sz_xGLXQueryVersionReply, (char *)&reply);
+ __glXSwapQueryVersionReply(client, &reply);
+ }
+ else {
+ WriteToClient(client, sz_xGLXQueryVersionReply, (char *) &reply);
}
return Success;
}
-int __glXWaitGL(__GLXclientState *cl, GLbyte *pc)
+int
+__glXWaitGL(__GLXclientState * cl, GLbyte * pc)
{
- xGLXWaitGLReq *req = (xGLXWaitGLReq *)pc;
- xGLXWaitGLReq *be_req = (xGLXWaitGLReq *)pc;
+ xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
+ xGLXWaitGLReq *be_req = (xGLXWaitGLReq *) pc;
int from_screen = 0;
int to_screen = 0;
int s;
__GLXcontext *glxc = NULL;
-
+
if (req->contextTag != 0) {
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (glxc) {
- from_screen = to_screen = glxc->pScreen->myNum;
- }
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (glxc) {
+ from_screen = to_screen = glxc->pScreen->myNum;
+ }
}
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
- LockDisplay(dpy);
- GetReq(GLXWaitGL,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXWaitGL;
- be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
- UnlockDisplay(dpy);
- SyncHandle();
+ LockDisplay(dpy);
+ GetReq(GLXWaitGL, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXWaitGL;
+ be_req->contextTag =
+ (glxc ? GetCurrentBackEndTag(cl, req->contextTag, s) : 0);
+ UnlockDisplay(dpy);
+ SyncHandle();
- XSync(dpy, False);
+ XSync(dpy, False);
}
-
+
return Success;
}
-int __glXWaitX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXWaitX(__GLXclientState * cl, GLbyte * pc)
{
- xGLXWaitXReq *req = (xGLXWaitXReq *)pc;
+ xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
xGLXWaitXReq *be_req;
int from_screen = 0;
int to_screen = 0;
int s;
__GLXcontext *glxc = NULL;
-
+
if (req->contextTag != 0) {
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (glxc) {
- from_screen = to_screen = glxc->pScreen->myNum;
- }
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (glxc) {
+ from_screen = to_screen = glxc->pScreen->myNum;
+ }
}
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
- dmxSync( dmxScreen, 1 );
+ dmxSync(dmxScreen, 1);
- LockDisplay(dpy);
- GetReq(GLXWaitX,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXWaitX;
- be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
- UnlockDisplay(dpy);
- SyncHandle();
+ LockDisplay(dpy);
+ GetReq(GLXWaitX, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXWaitX;
+ be_req->contextTag =
+ (glxc ? GetCurrentBackEndTag(cl, req->contextTag, s) : 0);
+ UnlockDisplay(dpy);
+ SyncHandle();
- XFlush( dpy );
+ XFlush(dpy);
}
return Success;
}
-int __glXCopyContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXCopyContext(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXCopyContextReq *be_req;
@@ -1501,81 +1587,83 @@ int __glXCopyContext(__GLXclientState *cl, GLbyte *pc)
int to_screen = 0;
/*
- ** Check that each context exists.
- */
- dixLookupResourceByType((pointer*) &src, source, __glXContextRes,
+ ** Check that each context exists.
+ */
+ dixLookupResourceByType((pointer *) &src, source, __glXContextRes,
NullClient, DixUnknownAccess);
if (!src) {
- client->errorValue = source;
- return __glXBadContext;
+ client->errorValue = source;
+ return __glXBadContext;
}
- dixLookupResourceByType((pointer*) &dst, dest, __glXContextRes,
+ dixLookupResourceByType((pointer *) &dst, dest, __glXContextRes,
NullClient, DixUnknownAccess);
if (!dst) {
- client->errorValue = dest;
- return __glXBadContext;
+ client->errorValue = dest;
+ return __glXBadContext;
}
/*
- ** They must be in the same address space, and same screen.
- */
+ ** They must be in the same address space, and same screen.
+ */
if (src->pGlxScreen != dst->pGlxScreen) {
- client->errorValue = source;
- return BadMatch;
+ client->errorValue = source;
+ return BadMatch;
}
/*
- ** The destination context must not be current for any client.
- */
+ ** The destination context must not be current for any client.
+ */
if (dst->isCurrent) {
- client->errorValue = dest;
- return BadAccess;
+ client->errorValue = dest;
+ return BadAccess;
}
if (tag) {
- __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag);
-
- if (!tagcx) {
- return __glXBadContextTag;
- }
- if (tagcx != src) {
- /*
- ** This would be caused by a faulty implementation of the client
- ** library.
- */
- return BadMatch;
- }
+ __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag);
+
+ if (!tagcx) {
+ return __glXBadContextTag;
+ }
+ if (tagcx != src) {
+ /*
+ ** This would be caused by a faulty implementation of the client
+ ** library.
+ */
+ return BadMatch;
+ }
}
from_screen = to_screen = src->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
- LockDisplay(dpy);
- GetReq(GLXCopyContext,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXCopyContext;
- be_req->source = (unsigned int)src->real_ids[s-from_screen];
- be_req->dest = (unsigned int)dst->real_ids[s-from_screen];
- be_req->mask = mask;
- be_req->contextTag = (tag ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
- UnlockDisplay(dpy);
- SyncHandle();
+ LockDisplay(dpy);
+ GetReq(GLXCopyContext, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXCopyContext;
+ be_req->source = (unsigned int) src->real_ids[s - from_screen];
+ be_req->dest = (unsigned int) dst->real_ids[s - from_screen];
+ be_req->mask = mask;
+ be_req->contextTag =
+ (tag ? GetCurrentBackEndTag(cl, req->contextTag, s) : 0);
+ UnlockDisplay(dpy);
+ SyncHandle();
}
return Success;
}
-int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
+int
+__glXGetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
@@ -1588,75 +1676,75 @@ int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
screen = req->screen;
if (screen >= screenInfo.numScreens) {
- /* The client library must send a valid screen number. */
- client->errorValue = screen;
- return BadValue;
+ /* The client library must send a valid screen number. */
+ client->errorValue = screen;
+ return BadValue;
}
pGlxScreen = &__glXActiveScreens[screen];
reply.numVisuals = pGlxScreen->numGLXVisuals;
reply.numProps = __GLX_TOTAL_CONFIG;
reply.length = (pGlxScreen->numGLXVisuals * __GLX_SIZE_CARD32 *
- __GLX_TOTAL_CONFIG) >> 2;
+ __GLX_TOTAL_CONFIG) >> 2;
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
- WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *)&reply);
-
- for (i=0; i < pGlxScreen->numVisuals; i++) {
- pGlxVisual = &pGlxScreen->pGlxVisual[i];
- if (!pGlxScreen->isGLXvis[i] || pGlxVisual->vid == 0) {
- /* not a usable visual */
- continue;
- }
- p = 0;
- buf[p++] = pGlxVisual->vid;
- buf[p++] = pGlxVisual->class;
- buf[p++] = pGlxVisual->rgba;
-
- buf[p++] = pGlxVisual->redSize;
- buf[p++] = pGlxVisual->greenSize;
- buf[p++] = pGlxVisual->blueSize;
- buf[p++] = pGlxVisual->alphaSize;
- buf[p++] = pGlxVisual->accumRedSize;
- buf[p++] = pGlxVisual->accumGreenSize;
- buf[p++] = pGlxVisual->accumBlueSize;
- buf[p++] = pGlxVisual->accumAlphaSize;
-
- buf[p++] = pGlxVisual->doubleBuffer;
- buf[p++] = pGlxVisual->stereo;
-
- buf[p++] = pGlxVisual->bufferSize;
- buf[p++] = pGlxVisual->depthSize;
- buf[p++] = pGlxVisual->stencilSize;
- buf[p++] = pGlxVisual->auxBuffers;
- buf[p++] = pGlxVisual->level;
- /*
- ** Add token/value pairs for extensions.
- */
- buf[p++] = GLX_VISUAL_CAVEAT_EXT;
- buf[p++] = pGlxVisual->visualRating;
- buf[p++] = GLX_TRANSPARENT_TYPE_EXT;
- buf[p++] = pGlxVisual->transparentPixel;
- buf[p++] = GLX_TRANSPARENT_RED_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentRed;
- buf[p++] = GLX_TRANSPARENT_GREEN_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentGreen;
- buf[p++] = GLX_TRANSPARENT_BLUE_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentBlue;
- buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentAlpha;
- buf[p++] = GLX_TRANSPARENT_INDEX_VALUE_EXT;
- buf[p++] = pGlxVisual->transparentIndex;
- buf[p++] = GLX_SAMPLES_SGIS;
- buf[p++] = pGlxVisual->multiSampleSize;
- buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
- buf[p++] = pGlxVisual->nMultiSampleBuffers;
- buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
- buf[p++] = pGlxVisual->visualSelectGroup;
-
- WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG,
- (char *)buf);
+ WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *) &reply);
+
+ for (i = 0; i < pGlxScreen->numVisuals; i++) {
+ pGlxVisual = &pGlxScreen->pGlxVisual[i];
+ if (!pGlxScreen->isGLXvis[i] || pGlxVisual->vid == 0) {
+ /* not a usable visual */
+ continue;
+ }
+ p = 0;
+ buf[p++] = pGlxVisual->vid;
+ buf[p++] = pGlxVisual->class;
+ buf[p++] = pGlxVisual->rgba;
+
+ buf[p++] = pGlxVisual->redSize;
+ buf[p++] = pGlxVisual->greenSize;
+ buf[p++] = pGlxVisual->blueSize;
+ buf[p++] = pGlxVisual->alphaSize;
+ buf[p++] = pGlxVisual->accumRedSize;
+ buf[p++] = pGlxVisual->accumGreenSize;
+ buf[p++] = pGlxVisual->accumBlueSize;
+ buf[p++] = pGlxVisual->accumAlphaSize;
+
+ buf[p++] = pGlxVisual->doubleBuffer;
+ buf[p++] = pGlxVisual->stereo;
+
+ buf[p++] = pGlxVisual->bufferSize;
+ buf[p++] = pGlxVisual->depthSize;
+ buf[p++] = pGlxVisual->stencilSize;
+ buf[p++] = pGlxVisual->auxBuffers;
+ buf[p++] = pGlxVisual->level;
+ /*
+ ** Add token/value pairs for extensions.
+ */
+ buf[p++] = GLX_VISUAL_CAVEAT_EXT;
+ buf[p++] = pGlxVisual->visualRating;
+ buf[p++] = GLX_TRANSPARENT_TYPE_EXT;
+ buf[p++] = pGlxVisual->transparentPixel;
+ buf[p++] = GLX_TRANSPARENT_RED_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentRed;
+ buf[p++] = GLX_TRANSPARENT_GREEN_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentGreen;
+ buf[p++] = GLX_TRANSPARENT_BLUE_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentBlue;
+ buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentAlpha;
+ buf[p++] = GLX_TRANSPARENT_INDEX_VALUE_EXT;
+ buf[p++] = pGlxVisual->transparentIndex;
+ buf[p++] = GLX_SAMPLES_SGIS;
+ buf[p++] = pGlxVisual->multiSampleSize;
+ buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
+ buf[p++] = pGlxVisual->nMultiSampleBuffers;
+ buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
+ buf[p++] = pGlxVisual->visualSelectGroup;
+
+ WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG,
+ (char *) buf);
}
return Success;
}
@@ -1664,9 +1752,10 @@ int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
/*
** Create a GLX Pixmap from an X Pixmap.
*/
-static int CreateGLXPixmap(__GLXclientState *cl,
- VisualID visual, GLXFBConfigID fbconfigId,
- int screenNum, XID pixmapId, XID glxpixmapId )
+static int
+CreateGLXPixmap(__GLXclientState * cl,
+ VisualID visual, GLXFBConfigID fbconfigId,
+ int screenNum, XID pixmapId, XID glxpixmapId)
{
ClientPtr client = cl->client;
xGLXCreateGLXPixmapReq *be_req;
@@ -1680,107 +1769,107 @@ static int CreateGLXPixmap(__GLXclientState *cl,
__GLXFBConfig *pFBConfig;
int i, s, rc;
int from_screen, to_screen;
+
#ifdef PANORAMIX
PanoramiXRes *pXinDraw = NULL;
#endif
rc = dixLookupDrawable(&pDraw, pixmapId, client, M_DRAWABLE_PIXMAP,
- DixAddAccess);
+ DixAddAccess);
if (rc != Success)
- return rc;
+ return rc;
/*
- ** Check if screen of visual matches screen of pixmap.
- */
+ ** Check if screen of visual matches screen of pixmap.
+ */
pScreen = pDraw->pScreen;
if (screenNum != pScreen->myNum) {
- return BadMatch;
+ return BadMatch;
}
if (fbconfigId == 0 && visual == 0) {
- return BadValue;
+ return BadValue;
}
if (fbconfigId != None) {
- pFBConfig = glxLookupFBConfig( fbconfigId );
- if (!pFBConfig) {
- client->errorValue = fbconfigId;
- return BadValue;
- }
- visual = pFBConfig->associatedVisualId;
+ pFBConfig = glxLookupFBConfig(fbconfigId);
+ if (!pFBConfig) {
+ client->errorValue = fbconfigId;
+ return BadValue;
+ }
+ visual = pFBConfig->associatedVisualId;
}
else {
- pFBConfig = NULL;
+ pFBConfig = NULL;
}
if (visual != None) {
- /*
- ** Find the VisualRec for this visual.
- */
- pVisual = pScreen->visuals;
- for (i=0; i < pScreen->numVisuals; i++, pVisual++) {
- if (pVisual->vid == visual) {
- break;
- }
- }
- if (i == pScreen->numVisuals) {
- client->errorValue = visual;
- return BadValue;
- }
- /*
- ** Check if depth of visual matches depth of pixmap.
- */
- if (pVisual->nplanes != pDraw->depth) {
- client->errorValue = visual;
- return BadMatch;
- }
-
- /*
- ** Get configuration of the visual.
- */
- pGlxScreen = &__glXActiveScreens[screenNum];
- pGlxVisual = pGlxScreen->pGlxVisual;
- for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
- if (pGlxVisual->vid == visual) {
- break;
- }
- }
- if (i == pGlxScreen->numVisuals) {
- /*
- ** Visual not support on this screen by this OpenGL implementation.
- */
- client->errorValue = visual;
- return BadValue;
- }
-
-
- /* find the FBConfig for that visual (if any) */
- if ( pFBConfig == NULL ) {
- pFBConfig = glxLookupFBConfigByVID( visual );
-
- if ( pFBConfig == NULL ) {
- /*
- * visual does not have an FBConfig ???
- client->errorValue = visual;
- return BadValue;
- */
- }
- }
+ /*
+ ** Find the VisualRec for this visual.
+ */
+ pVisual = pScreen->visuals;
+ for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
+ if (pVisual->vid == visual) {
+ break;
+ }
+ }
+ if (i == pScreen->numVisuals) {
+ client->errorValue = visual;
+ return BadValue;
+ }
+ /*
+ ** Check if depth of visual matches depth of pixmap.
+ */
+ if (pVisual->nplanes != pDraw->depth) {
+ client->errorValue = visual;
+ return BadMatch;
+ }
+
+ /*
+ ** Get configuration of the visual.
+ */
+ pGlxScreen = &__glXActiveScreens[screenNum];
+ pGlxVisual = pGlxScreen->pGlxVisual;
+ for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
+ if (pGlxVisual->vid == visual) {
+ break;
+ }
+ }
+ if (i == pGlxScreen->numVisuals) {
+ /*
+ ** Visual not support on this screen by this OpenGL implementation.
+ */
+ client->errorValue = visual;
+ return BadValue;
+ }
+
+ /* find the FBConfig for that visual (if any) */
+ if (pFBConfig == NULL) {
+ pFBConfig = glxLookupFBConfigByVID(visual);
+
+ if (pFBConfig == NULL) {
+ /*
+ * visual does not have an FBConfig ???
+ client->errorValue = visual;
+ return BadValue;
+ */
+ }
+ }
}
else {
- pVisual = NULL;
- pGlxVisual = NULL;
- pGlxScreen = &__glXActiveScreens[pDraw->pScreen->myNum];
+ pVisual = NULL;
+ pGlxVisual = NULL;
+ pGlxScreen = &__glXActiveScreens[pDraw->pScreen->myNum];
}
pGlxPixmap = (__GLXpixmap *) malloc(sizeof(__GLXpixmap));
if (!pGlxPixmap) {
- return BadAlloc;
+ return BadAlloc;
}
pGlxPixmap->be_xids = (XID *) malloc(sizeof(XID) * screenInfo.numScreens);
if (!pGlxPixmap->be_xids) {
- free( pGlxPixmap );
- return BadAlloc;
+ free(pGlxPixmap);
+ return BadAlloc;
}
pGlxPixmap->pDraw = pDraw;
@@ -1792,8 +1881,8 @@ static int CreateGLXPixmap(__GLXclientState *cl,
pGlxPixmap->refcnt = 0;
/*
- ** Bump the ref count on the X pixmap so it won't disappear.
- */
+ ** Bump the ref count on the X pixmap so it won't disappear.
+ */
((PixmapPtr) pDraw)->refcnt++;
/*
@@ -1802,121 +1891,128 @@ static int CreateGLXPixmap(__GLXclientState *cl,
from_screen = to_screen = screenNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
- dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess);
+ dixLookupResourceByClass((pointer *) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
}
#endif
- for (s=from_screen; s<=to_screen; s++) {
+ for (s = from_screen; s <= to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
- Pixmap be_pixmap;
- DrawablePtr pRealDraw = pDraw;
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
+ Pixmap be_pixmap;
+ DrawablePtr pRealDraw = pDraw;
#ifdef PANORAMIX
- if (pXinDraw) {
- dixLookupDrawable(&pRealDraw, pXinDraw->info[s].id, client, 0,
- DixAddAccess);
- }
+ if (pXinDraw) {
+ dixLookupDrawable(&pRealDraw, pXinDraw->info[s].id, client, 0,
+ DixAddAccess);
+ }
#endif
- be_pixmap = (DMX_GET_PIXMAP_PRIV((PixmapPtr)pRealDraw))->pixmap;
-
- /* make sure pixmap already created on back-end */
- dmxSync( dmxScreen, 1 );
-
- if ( pFBConfig && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- __GLXFBConfig *be_FBConfig = glxLookupBackEndFBConfig( pFBConfig->id, s );
-
- LockDisplay(dpy);
- pGlxPixmap->be_xids[s] = XAllocID(dpy);
- GetReq(GLXCreatePixmap,be_new_req);
- be_new_req->reqType = dmxScreen->glxMajorOpcode;
- be_new_req->glxCode = X_GLXCreatePixmap;
- be_new_req->screen = DefaultScreen(dpy);
- be_new_req->fbconfig = be_FBConfig->id;
- be_new_req->pixmap = (unsigned int)be_pixmap;
- be_new_req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
- be_new_req->numAttribs = 0;
- UnlockDisplay(dpy);
- SyncHandle();
- }
- else if (pFBConfig && glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
- __GLXFBConfig *be_FBConfig = glxLookupBackEndFBConfig( pFBConfig->id, s );
- xGLXCreateGLXPixmapWithConfigSGIXReq *ext_req;
- xGLXVendorPrivateReq *vpreq;
-
- LockDisplay(dpy);
- pGlxPixmap->be_xids[s] = XAllocID(dpy);
- GetReqExtra(GLXVendorPrivate,
- sz_xGLXCreateGLXPixmapWithConfigSGIXReq-sz_xGLXVendorPrivateReq,
- vpreq);
- ext_req = (xGLXCreateGLXPixmapWithConfigSGIXReq *)vpreq;
- ext_req->reqType = dmxScreen->glxMajorOpcode;
- ext_req->glxCode = X_GLXVendorPrivate;
- ext_req->vendorCode = X_GLXvop_CreateGLXPixmapWithConfigSGIX;
- ext_req->screen = DefaultScreen(dpy);
- ext_req->fbconfig = be_FBConfig->id;
- ext_req->pixmap = (unsigned int)be_pixmap;
- ext_req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
- UnlockDisplay(dpy);
- SyncHandle();
- }
- else if (pGlxVisual) {
- LockDisplay(dpy);
- pGlxPixmap->be_xids[s] = XAllocID(dpy);
- GetReq(GLXCreateGLXPixmap,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXCreateGLXPixmap;
- be_req->screen = DefaultScreen(dpy);
- be_req->visual = (unsigned int)glxMatchGLXVisualInConfigList(
- pGlxVisual,
- dmxScreen->glxVisuals,
- dmxScreen->numGlxVisuals );
- be_req->pixmap = (unsigned int)be_pixmap;
- be_req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
- UnlockDisplay(dpy);
- SyncHandle();
- }
- else {
- client->errorValue = ( visual ? visual : fbconfigId );
- free( pGlxPixmap );
- return BadValue;
- }
-
- XFlush( dpy );
+ be_pixmap = (DMX_GET_PIXMAP_PRIV((PixmapPtr) pRealDraw))->pixmap;
+
+ /* make sure pixmap already created on back-end */
+ dmxSync(dmxScreen, 1);
+
+ if (pFBConfig && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ __GLXFBConfig *be_FBConfig =
+ glxLookupBackEndFBConfig(pFBConfig->id, s);
+
+ LockDisplay(dpy);
+ pGlxPixmap->be_xids[s] = XAllocID(dpy);
+ GetReq(GLXCreatePixmap, be_new_req);
+ be_new_req->reqType = dmxScreen->glxMajorOpcode;
+ be_new_req->glxCode = X_GLXCreatePixmap;
+ be_new_req->screen = DefaultScreen(dpy);
+ be_new_req->fbconfig = be_FBConfig->id;
+ be_new_req->pixmap = (unsigned int) be_pixmap;
+ be_new_req->glxpixmap = (unsigned int) pGlxPixmap->be_xids[s];
+ be_new_req->numAttribs = 0;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ else if (pFBConfig && glxIsExtensionSupported("GLX_SGIX_fbconfig")) {
+ __GLXFBConfig *be_FBConfig =
+ glxLookupBackEndFBConfig(pFBConfig->id, s);
+ xGLXCreateGLXPixmapWithConfigSGIXReq *ext_req;
+ xGLXVendorPrivateReq *vpreq;
+
+ LockDisplay(dpy);
+ pGlxPixmap->be_xids[s] = XAllocID(dpy);
+ GetReqExtra(GLXVendorPrivate,
+ sz_xGLXCreateGLXPixmapWithConfigSGIXReq -
+ sz_xGLXVendorPrivateReq, vpreq);
+ ext_req = (xGLXCreateGLXPixmapWithConfigSGIXReq *) vpreq;
+ ext_req->reqType = dmxScreen->glxMajorOpcode;
+ ext_req->glxCode = X_GLXVendorPrivate;
+ ext_req->vendorCode = X_GLXvop_CreateGLXPixmapWithConfigSGIX;
+ ext_req->screen = DefaultScreen(dpy);
+ ext_req->fbconfig = be_FBConfig->id;
+ ext_req->pixmap = (unsigned int) be_pixmap;
+ ext_req->glxpixmap = (unsigned int) pGlxPixmap->be_xids[s];
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ else if (pGlxVisual) {
+ LockDisplay(dpy);
+ pGlxPixmap->be_xids[s] = XAllocID(dpy);
+ GetReq(GLXCreateGLXPixmap, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXCreateGLXPixmap;
+ be_req->screen = DefaultScreen(dpy);
+ be_req->visual =
+ (unsigned int) glxMatchGLXVisualInConfigList(pGlxVisual,
+ dmxScreen->
+ glxVisuals,
+ dmxScreen->
+ numGlxVisuals);
+ be_req->pixmap = (unsigned int) be_pixmap;
+ be_req->glxpixmap = (unsigned int) pGlxPixmap->be_xids[s];
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+ else {
+ client->errorValue = (visual ? visual : fbconfigId);
+ free(pGlxPixmap);
+ return BadValue;
+ }
+
+ XFlush(dpy);
}
if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) {
- free( pGlxPixmap );
- return BadAlloc;
+ free(pGlxPixmap);
+ return BadAlloc;
}
return Success;
}
-int __glXCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
+int
+__glXCreateGLXPixmap(__GLXclientState * cl, GLbyte * pc)
{
xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
- return( CreateGLXPixmap(cl, req->visual, None,
- req->screen, req->pixmap, req->glxpixmap) );
+ return (CreateGLXPixmap(cl, req->visual, None,
+ req->screen, req->pixmap, req->glxpixmap));
}
-int __glXCreatePixmap(__GLXclientState *cl, GLbyte *pc)
+int
+__glXCreatePixmap(__GLXclientState * cl, GLbyte * pc)
{
xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc;
- return( CreateGLXPixmap(cl, None, req->fbconfig,
- req->screen, req->pixmap, req->glxpixmap) );
+ return (CreateGLXPixmap(cl, None, req->fbconfig,
+ req->screen, req->pixmap, req->glxpixmap));
}
-int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
@@ -1926,13 +2022,13 @@ int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
int from_screen, to_screen;
/*
- ** Check if it's a valid GLX pixmap.
- */
- dixLookupResourceByType((pointer*) &pGlxPixmap, glxpixmap,
+ ** Check if it's a valid GLX pixmap.
+ */
+ dixLookupResourceByType((pointer *) &pGlxPixmap, glxpixmap,
__glXPixmapRes, NullClient, DixUnknownAccess);
if (!pGlxPixmap) {
- client->errorValue = glxpixmap;
- return __glXBadPixmap;
+ client->errorValue = glxpixmap;
+ return __glXBadPixmap;
}
FreeResource(glxpixmap, FALSE);
@@ -1942,28 +2038,27 @@ int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
from_screen = to_screen = pGlxPixmap->pDraw->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
- /* make sure pixmap exist in back-end */
- dmxSync( dmxScreen, 1 );
+ /* make sure pixmap exist in back-end */
+ dmxSync(dmxScreen, 1);
- LockDisplay(dpy);
- GetReq(GLXDestroyGLXPixmap,req);
- req->reqType = dmxScreen->glxMajorOpcode;
- req->glxCode = X_GLXDestroyGLXPixmap;
- req->glxpixmap = (unsigned int)pGlxPixmap->be_xids[s];
- UnlockDisplay(dpy);
- SyncHandle();
+ LockDisplay(dpy);
+ GetReq(GLXDestroyGLXPixmap, req);
+ req->reqType = dmxScreen->glxMajorOpcode;
+ req->glxCode = X_GLXDestroyGLXPixmap;
+ req->glxpixmap = (unsigned int) pGlxPixmap->be_xids[s];
+ UnlockDisplay(dpy);
+ SyncHandle();
}
-
return Success;
}
@@ -1974,7 +2069,8 @@ int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
** this time that is of value. Consequently, this code must be
** implemented by somebody other than SGI.
*/
-int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag)
+int
+__glXDoSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag)
{
ClientPtr client = cl->client;
DrawablePtr pDraw;
@@ -1982,6 +2078,7 @@ int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag)
WindowPtr pWin = NULL;
__GLXpixmap *pGlxPixmap = NULL;
__GLXcontext *glxc = NULL;
+
#ifdef PANORAMIX
PanoramiXRes *pXinDraw = NULL;
#endif
@@ -1989,152 +2086,154 @@ int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag)
int from_screen = 0;
int to_screen = 0;
int s, rc;
-
+
/*
- ** Check that the GLX drawable is valid.
- */
+ ** Check that the GLX drawable is valid.
+ */
rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
if (rc == Success) {
from_screen = to_screen = pDraw->pScreen->myNum;
- if (pDraw->type == DRAWABLE_WINDOW) {
- /*
- ** Drawable is an X window.
- */
- pWin = (WindowPtr)pDraw;
- } else {
- /*
- ** Drawable is an X pixmap, which is not allowed.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ /*
+ ** Drawable is an X window.
+ */
+ pWin = (WindowPtr) pDraw;
+ }
+ else {
+ /*
+ ** Drawable is an X pixmap, which is not allowed.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
if (!pDraw) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, drawId,
- __glXPixmapRes, NullClient, DixUnknownAccess);
- if (pGlxPixmap) {
- /*
- ** Drawable is a GLX pixmap.
- */
- pDraw = pGlxPixmap->pDraw;
- from_screen = to_screen = pGlxPixmap->pScreen->myNum;
- }
- }
-
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, drawId,
- __glXWindowRes, NullClient, DixUnknownAccess);
- if (pGlxWindow) {
- /*
- ** Drawable is a GLXWindow.
- */
- pDraw = pGlxWindow->pDraw;
- from_screen = to_screen = pGlxWindow->pScreen->myNum;
- }
+ dixLookupResourceByType((pointer *) &pGlxPixmap, drawId,
+ __glXPixmapRes, NullClient, DixUnknownAccess);
+ if (pGlxPixmap) {
+ /*
+ ** Drawable is a GLX pixmap.
+ */
+ pDraw = pGlxPixmap->pDraw;
+ from_screen = to_screen = pGlxPixmap->pScreen->myNum;
+ }
+ }
+
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ dixLookupResourceByType((pointer *) &pGlxWindow, drawId,
+ __glXWindowRes, NullClient, DixUnknownAccess);
+ if (pGlxWindow) {
+ /*
+ ** Drawable is a GLXWindow.
+ */
+ pDraw = pGlxWindow->pDraw;
+ from_screen = to_screen = pGlxWindow->pScreen->myNum;
+ }
}
if (!pDraw) {
- /*
- ** Drawable is neither a X window nor a GLX pixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
+ /*
+ ** Drawable is neither a X window nor a GLX pixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
}
if (tag) {
- glxc = __glXLookupContextByTag(cl, tag);
- if (!glxc) {
- return __glXBadContextTag;
- }
+ glxc = __glXLookupContextByTag(cl, tag);
+ if (!glxc) {
+ return __glXBadContextTag;
+ }
}
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
- dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess);
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
+ dixLookupResourceByClass((pointer *) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
}
#endif
/* If requested, send a glFinish to all back-end servers before swapping. */
if (dmxGLXFinishSwap) {
- for (s=from_screen; s<=to_screen; s++) {
- Display *dpy = GetBackEndDisplay(cl,s);
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- xGLXSingleReq *finishReq;
- xGLXSingleReply reply;
-
-#define X_GLXSingle 0 /* needed by GetReq below */
-
- LockDisplay(dpy);
- GetReq(GLXSingle,finishReq);
- finishReq->reqType = dmxScreen->glxMajorOpcode;
- finishReq->glxCode = X_GLsop_Finish;
- finishReq->contextTag = (tag ? GetCurrentBackEndTag(cl,tag,s) : 0);
- (void) _XReply(dpy, (xReply*) &reply, 0, False);
- UnlockDisplay(dpy);
- SyncHandle();
- }
+ for (s = from_screen; s <= to_screen; s++) {
+ Display *dpy = GetBackEndDisplay(cl, s);
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ xGLXSingleReq *finishReq;
+ xGLXSingleReply reply;
+
+#define X_GLXSingle 0 /* needed by GetReq below */
+
+ LockDisplay(dpy);
+ GetReq(GLXSingle, finishReq);
+ finishReq->reqType = dmxScreen->glxMajorOpcode;
+ finishReq->glxCode = X_GLsop_Finish;
+ finishReq->contextTag =
+ (tag ? GetCurrentBackEndTag(cl, tag, s) : 0);
+ (void) _XReply(dpy, (xReply *) & reply, 0, False);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
}
/* If requested, send an XSync to all back-end servers before swapping. */
if (dmxGLXSyncSwap) {
- for (s=from_screen; s<=to_screen; s++)
- XSync(GetBackEndDisplay(cl,s), False);
+ for (s = from_screen; s <= to_screen; s++)
+ XSync(GetBackEndDisplay(cl, s), False);
}
-
/* send the SwapBuffers request to all back-end servers */
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
- unsigned int be_draw = 0;
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
+ unsigned int be_draw = 0;
- if (pGlxPixmap) {
- be_draw = (unsigned int)pGlxPixmap->be_xids[s];
- }
+ if (pGlxPixmap) {
+ be_draw = (unsigned int) pGlxPixmap->be_xids[s];
+ }
#ifdef PANORAMIX
- else if (pXinDraw) {
- dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
- }
+ else if (pXinDraw) {
+ dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess);
+ }
#endif
- else if (pGlxWindow) {
- pWin = (WindowPtr)pGlxWindow->pDraw;
- }
-
- if (pWin && !be_draw) {
- be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- if (!be_draw) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pWin, TRUE );
- be_draw = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- }
- }
-
- dmxSync( dmxScreen, 1 );
-
- LockDisplay(dpy);
- GetReq(GLXSwapBuffers,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXSwapBuffers;
- be_req->drawable = be_draw;
- be_req->contextTag = ( tag ? GetCurrentBackEndTag(cl,tag,s) : 0 );
- UnlockDisplay(dpy);
- SyncHandle();
- XFlush(dpy);
+ else if (pGlxWindow) {
+ pWin = (WindowPtr) pGlxWindow->pDraw;
+ }
+
+ if (pWin && !be_draw) {
+ be_draw = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
+ if (!be_draw) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow(pWin, TRUE);
+ be_draw = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
+ }
+ }
+
+ dmxSync(dmxScreen, 1);
+
+ LockDisplay(dpy);
+ GetReq(GLXSwapBuffers, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXSwapBuffers;
+ be_req->drawable = be_draw;
+ be_req->contextTag = (tag ? GetCurrentBackEndTag(cl, tag, s) : 0);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ XFlush(dpy);
}
return Success;
}
-int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapBuffers(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
DrawablePtr pDraw;
@@ -2145,68 +2244,67 @@ int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc)
__GLXcontext *glxc = NULL;
__glXWindow *pGlxWindow = NULL;
int rc;
-
+
/*
- ** Check that the GLX drawable is valid.
- */
+ ** Check that the GLX drawable is valid.
+ */
rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixWriteAccess);
if (rc == Success) {
- if (pDraw->type != DRAWABLE_WINDOW) {
- /*
- ** Drawable is an X pixmap, which is not allowed.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
+ if (pDraw->type != DRAWABLE_WINDOW) {
+ /*
+ ** Drawable is an X pixmap, which is not allowed.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
if (!pDraw) {
- dixLookupResourceByType((pointer*) &pGlxPixmap, drawId,
- __glXPixmapRes, NullClient, DixUnknownAccess);
- if (pGlxPixmap) {
- /*
- ** Drawable is a GLX pixmap.
- */
- pDraw = pGlxPixmap->pDraw;
- }
- }
-
- if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1,3) ) {
- dixLookupResourceByType((pointer*) &pGlxWindow, drawId,
- __glXWindowRes, NullClient, DixUnknownAccess);
- if (pGlxWindow) {
- /*
- ** Drawable is a GLXWindow.
- */
- pDraw = pGlxWindow->pDraw;
- }
+ dixLookupResourceByType((pointer *) &pGlxPixmap, drawId,
+ __glXPixmapRes, NullClient, DixUnknownAccess);
+ if (pGlxPixmap) {
+ /*
+ ** Drawable is a GLX pixmap.
+ */
+ pDraw = pGlxPixmap->pDraw;
+ }
+ }
+
+ if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) {
+ dixLookupResourceByType((pointer *) &pGlxWindow, drawId,
+ __glXWindowRes, NullClient, DixUnknownAccess);
+ if (pGlxWindow) {
+ /*
+ ** Drawable is a GLXWindow.
+ */
+ pDraw = pGlxWindow->pDraw;
+ }
}
if (!pDraw) {
- /*
- ** Drawable is neither a X window nor a GLX pixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
+ /*
+ ** Drawable is neither a X window nor a GLX pixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
}
if (tag) {
- glxc = __glXLookupContextByTag(cl, tag);
- if (!glxc) {
- return __glXBadContextTag;
- }
+ glxc = __glXLookupContextByTag(cl, tag);
+ if (!glxc) {
+ return __glXBadContextTag;
+ }
}
if (pDraw &&
- pDraw->type == DRAWABLE_WINDOW &&
- DMX_GET_WINDOW_PRIV((WindowPtr)pDraw)->swapGroup) {
- return SGSwapBuffers(cl, drawId, tag, pDraw);
+ pDraw->type == DRAWABLE_WINDOW &&
+ DMX_GET_WINDOW_PRIV((WindowPtr) pDraw)->swapGroup) {
+ return SGSwapBuffers(cl, drawId, tag, pDraw);
}
return __glXDoSwapBuffers(cl, drawId, tag);
}
-
/************************************************************************/
/*
@@ -2217,7 +2315,8 @@ int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc)
/*
** Execute all the drawing commands in a request.
*/
-int __glXRender(__GLXclientState *cl, GLbyte *pc)
+int
+__glXRender(__GLXclientState * cl, GLbyte * pc)
{
xGLXRenderReq *req;
xGLXRenderReq *be_req;
@@ -2228,23 +2327,23 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc)
int s;
/*
- ** NOTE: much of this code also appears in the byteswapping version of this
- ** routine, __glXSwapRender(). Any changes made here should also be
- ** duplicated there.
- */
-
+ ** NOTE: much of this code also appears in the byteswapping version of this
+ ** routine, __glXSwapRender(). Any changes made here should also be
+ ** duplicated there.
+ */
+
req = (xGLXRenderReq *) pc;
glxc = __glXLookupContextByTag(cl, req->contextTag);
if (!glxc) {
- return 0;
+ return 0;
}
from_screen = to_screen = glxc->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
@@ -2254,19 +2353,19 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc)
/*
* just forward the request to back-end server(s)
*/
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
- LockDisplay(dpy);
- GetReq(GLXRender,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXRender;
- be_req->length = req->length;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- _XSend(dpy, (const char *)pc, size);
- UnlockDisplay(dpy);
- SyncHandle();
+ LockDisplay(dpy);
+ GetReq(GLXRender, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXRender;
+ be_req->length = req->length;
+ be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
+ _XSend(dpy, (const char *) pc, size);
+ UnlockDisplay(dpy);
+ SyncHandle();
}
return Success;
@@ -2275,7 +2374,8 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc)
/*
** Execute a large rendering request (one that spans multiple X requests).
*/
-int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
+int
+__glXRenderLarge(__GLXclientState * cl, GLbyte * pc)
{
xGLXRenderLargeReq *req;
xGLXRenderLargeReq *be_req;
@@ -2285,22 +2385,22 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
int s;
/*
- ** NOTE: much of this code also appears in the byteswapping version of this
- ** routine, __glXSwapRenderLarge(). Any changes made here should also be
- ** duplicated there.
- */
-
+ ** NOTE: much of this code also appears in the byteswapping version of this
+ ** routine, __glXSwapRenderLarge(). Any changes made here should also be
+ ** duplicated there.
+ */
+
req = (xGLXRenderLargeReq *) pc;
glxc = __glXLookupContextByTag(cl, req->contextTag);
if (!glxc) {
- return 0;
+ return 0;
}
from_screen = to_screen = glxc->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
@@ -2309,82 +2409,82 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc)
/*
* just forward the request to back-end server(s)
*/
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
- GetReq(GLXRenderLarge,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXRenderLarge;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- be_req->length = req->length;
- be_req->requestNumber = req->requestNumber;
- be_req->requestTotal = req->requestTotal;
- be_req->dataBytes = req->dataBytes;
- Data(dpy, (const char *)pc, req->dataBytes);
- UnlockDisplay(dpy);
- SyncHandle();
+ GetReq(GLXRenderLarge, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXRenderLarge;
+ be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
+ be_req->length = req->length;
+ be_req->requestNumber = req->requestNumber;
+ be_req->requestTotal = req->requestTotal;
+ be_req->dataBytes = req->dataBytes;
+ Data(dpy, (const char *) pc, req->dataBytes);
+ UnlockDisplay(dpy);
+ SyncHandle();
}
return Success;
}
-
/************************************************************************/
-int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc)
+int
+__glXVendorPrivate(__GLXclientState * cl, GLbyte * pc)
{
xGLXVendorPrivateReq *req;
req = (xGLXVendorPrivateReq *) pc;
- switch( req->vendorCode ) {
-
- case X_GLvop_DeleteTexturesEXT:
- return __glXVForwardSingleReq( cl, pc );
- break;
-
- case X_GLXvop_SwapIntervalSGI:
- if (glxIsExtensionSupported("SGI_swap_control")) {
- return __glXVForwardSingleReq( cl, pc );
- }
- else {
- return Success;
- }
- break;
-
-#if 0 /* glx 1.3 */
- case X_GLXvop_CreateGLXVideoSourceSGIX:
- break;
- case X_GLXvop_DestroyGLXVideoSourceSGIX:
- break;
- case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
- break;
- case X_GLXvop_DestroyGLXPbufferSGIX:
- break;
- case X_GLXvop_ChangeDrawableAttributesSGIX:
- break;
+ switch (req->vendorCode) {
+
+ case X_GLvop_DeleteTexturesEXT:
+ return __glXVForwardSingleReq(cl, pc);
+ break;
+
+ case X_GLXvop_SwapIntervalSGI:
+ if (glxIsExtensionSupported("SGI_swap_control")) {
+ return __glXVForwardSingleReq(cl, pc);
+ }
+ else {
+ return Success;
+ }
+ break;
+
+#if 0 /* glx 1.3 */
+ case X_GLXvop_CreateGLXVideoSourceSGIX:
+ break;
+ case X_GLXvop_DestroyGLXVideoSourceSGIX:
+ break;
+ case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
+ break;
+ case X_GLXvop_DestroyGLXPbufferSGIX:
+ break;
+ case X_GLXvop_ChangeDrawableAttributesSGIX:
+ break;
#endif
- case X_GLXvop_BindSwapBarrierSGIX:
- return __glXBindSwapBarrierSGIX( cl, pc );
- break;
+ case X_GLXvop_BindSwapBarrierSGIX:
+ return __glXBindSwapBarrierSGIX(cl, pc);
+ break;
- case X_GLXvop_JoinSwapGroupSGIX:
- return __glXJoinSwapGroupSGIX( cl, pc );
- break;
+ case X_GLXvop_JoinSwapGroupSGIX:
+ return __glXJoinSwapGroupSGIX(cl, pc);
+ break;
- case X_GLXvop_CreateContextWithConfigSGIX:
- return __glXCreateContextWithConfigSGIX( cl, pc );
- break;
+ case X_GLXvop_CreateContextWithConfigSGIX:
+ return __glXCreateContextWithConfigSGIX(cl, pc);
+ break;
- default:
- /*
- ** unsupported private request
- */
- cl->client->errorValue = req->vendorCode;
- return __glXUnsupportedPrivateRequest;
+ default:
+ /*
+ ** unsupported private request
+ */
+ cl->client->errorValue = req->vendorCode;
+ return __glXUnsupportedPrivateRequest;
}
cl->client->errorValue = req->vendorCode;
@@ -2392,78 +2492,79 @@ int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc)
}
-int __glXVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
+int
+__glXVendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc)
{
xGLXVendorPrivateWithReplyReq *req;
req = (xGLXVendorPrivateWithReplyReq *) pc;
- switch( req->vendorCode ) {
-
- case X_GLvop_GetConvolutionFilterEXT:
- case X_GLvop_GetConvolutionParameterfvEXT:
- case X_GLvop_GetConvolutionParameterivEXT:
- case X_GLvop_GetSeparableFilterEXT:
- case X_GLvop_GetHistogramEXT:
- case X_GLvop_GetHistogramParameterivEXT:
- case X_GLvop_GetMinmaxEXT:
- case X_GLvop_GetMinmaxParameterfvEXT:
- case X_GLvop_GetMinmaxParameterivEXT:
- case X_GLvop_AreTexturesResidentEXT:
- case X_GLvop_IsTextureEXT:
- return( __glXVForwardPipe0WithReply(cl, pc) );
- break;
-
- case X_GLvop_GenTexturesEXT:
- return( __glXVForwardAllWithReply(cl, pc) );
- break;
-
-
-#if 0 /* glx1.3 */
- case X_GLvop_GetDetailTexFuncSGIS:
- case X_GLvop_GetSharpenTexFuncSGIS:
- case X_GLvop_GetColorTableSGI:
- case X_GLvop_GetColorTableParameterfvSGI:
- case X_GLvop_GetColorTableParameterivSGI:
- case X_GLvop_GetTexFilterFuncSGIS:
- case X_GLvop_GetInstrumentsSGIX:
- case X_GLvop_InstrumentsBufferSGIX:
- case X_GLvop_PollInstrumentsSGIX:
- case X_GLvop_FlushRasterSGIX:
- case X_GLXvop_CreateGLXPbufferSGIX:
- case X_GLXvop_GetDrawableAttributesSGIX:
- case X_GLXvop_QueryHyperpipeNetworkSGIX:
- case X_GLXvop_QueryHyperpipeConfigSGIX:
- case X_GLXvop_HyperpipeConfigSGIX:
- case X_GLXvop_DestroyHyperpipeConfigSGIX:
+ switch (req->vendorCode) {
+
+ case X_GLvop_GetConvolutionFilterEXT:
+ case X_GLvop_GetConvolutionParameterfvEXT:
+ case X_GLvop_GetConvolutionParameterivEXT:
+ case X_GLvop_GetSeparableFilterEXT:
+ case X_GLvop_GetHistogramEXT:
+ case X_GLvop_GetHistogramParameterivEXT:
+ case X_GLvop_GetMinmaxEXT:
+ case X_GLvop_GetMinmaxParameterfvEXT:
+ case X_GLvop_GetMinmaxParameterivEXT:
+ case X_GLvop_AreTexturesResidentEXT:
+ case X_GLvop_IsTextureEXT:
+ return (__glXVForwardPipe0WithReply(cl, pc));
+ break;
+
+ case X_GLvop_GenTexturesEXT:
+ return (__glXVForwardAllWithReply(cl, pc));
+ break;
+
+#if 0 /* glx1.3 */
+ case X_GLvop_GetDetailTexFuncSGIS:
+ case X_GLvop_GetSharpenTexFuncSGIS:
+ case X_GLvop_GetColorTableSGI:
+ case X_GLvop_GetColorTableParameterfvSGI:
+ case X_GLvop_GetColorTableParameterivSGI:
+ case X_GLvop_GetTexFilterFuncSGIS:
+ case X_GLvop_GetInstrumentsSGIX:
+ case X_GLvop_InstrumentsBufferSGIX:
+ case X_GLvop_PollInstrumentsSGIX:
+ case X_GLvop_FlushRasterSGIX:
+ case X_GLXvop_CreateGLXPbufferSGIX:
+ case X_GLXvop_GetDrawableAttributesSGIX:
+ case X_GLXvop_QueryHyperpipeNetworkSGIX:
+ case X_GLXvop_QueryHyperpipeConfigSGIX:
+ case X_GLXvop_HyperpipeConfigSGIX:
+ case X_GLXvop_DestroyHyperpipeConfigSGIX:
#endif
- case X_GLXvop_QueryMaxSwapBarriersSGIX:
- return( __glXQueryMaxSwapBarriersSGIX(cl, pc) );
- break;
+ case X_GLXvop_QueryMaxSwapBarriersSGIX:
+ return (__glXQueryMaxSwapBarriersSGIX(cl, pc));
+ break;
- case X_GLXvop_GetFBConfigsSGIX:
- return( __glXGetFBConfigsSGIX(cl, pc) );
- break;
+ case X_GLXvop_GetFBConfigsSGIX:
+ return (__glXGetFBConfigsSGIX(cl, pc));
+ break;
- case X_GLXvop_MakeCurrentReadSGI:
- return( __glXMakeCurrentReadSGI(cl, pc) );
- break;
+ case X_GLXvop_MakeCurrentReadSGI:
+ return (__glXMakeCurrentReadSGI(cl, pc));
+ break;
- case X_GLXvop_QueryContextInfoEXT:
- return( __glXQueryContextInfoEXT(cl,pc) );
- break;
+ case X_GLXvop_QueryContextInfoEXT:
+ return (__glXQueryContextInfoEXT(cl, pc));
+ break;
- default:
- /*
- ** unsupported private request
- */
- cl->client->errorValue = req->vendorCode;
- return __glXUnsupportedPrivateRequest;
+ default:
+ /*
+ ** unsupported private request
+ */
+ cl->client->errorValue = req->vendorCode;
+ return __glXUnsupportedPrivateRequest;
}
}
-int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
+int
+__glXQueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc;
@@ -2484,34 +2585,36 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
screen = req->screen;
/*
- ** Check if screen exists.
- */
+ ** Check if screen exists.
+ */
if ((screen < 0) || (screen >= screenInfo.numScreens)) {
- client->errorValue = screen;
- return BadValue;
+ client->errorValue = screen;
+ return BadValue;
}
#ifdef FWD_QUERY_REQ
dmxScreen = &dmxScreens[screen];
/* Send the glXQueryServerString request */
- dpy = GetBackEndDisplay(cl,screen);
+ dpy = GetBackEndDisplay(cl, screen);
LockDisplay(dpy);
- GetReq(GLXQueryExtensionsString,be_req);
+ GetReq(GLXQueryExtensionsString, be_req);
be_req->reqType = dmxScreen->glxMajorOpcode;
be_req->glxCode = X_GLXQueryServerString;
be_req->screen = DefaultScreen(dpy);
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- len = (int)be_reply.length;
- numbytes = (int)be_reply.n;
+ _XReply(dpy, (xReply *) & be_reply, 0, False);
+ len = (int) be_reply.length;
+ numbytes = (int) be_reply.n;
slop = numbytes * __GLX_SIZE_INT8 & 3;
- be_buf = (char *)malloc(numbytes);
+ be_buf = (char *) malloc(numbytes);
if (!be_buf) {
/* Throw data on the floor */
_XEatData(dpy, len);
- } else {
- _XRead(dpy, (char *)be_buf, numbytes);
- if (slop) _XEatData(dpy,4-slop);
+ }
+ else {
+ _XRead(dpy, (char *) be_buf, numbytes);
+ if (slop)
+ _XEatData(dpy, 4 - slop);
}
UnlockDisplay(dpy);
SyncHandle();
@@ -2532,15 +2635,18 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) {
glxSwapQueryExtensionsStringReply(client, &reply, be_buf);
- } else {
- WriteToClient(client, sz_xGLXQueryExtensionsStringReply,(char *)&reply);
- WriteToClient(client, (int)(length << 2), (char *)be_buf);
+ }
+ else {
+ WriteToClient(client, sz_xGLXQueryExtensionsStringReply,
+ (char *) &reply);
+ WriteToClient(client, (int) (length << 2), (char *) be_buf);
}
return Success;
}
-int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
+int
+__glXQueryServerString(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc;
@@ -2550,46 +2656,49 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
size_t length;
int len, numbytes;
char *be_buf;
+
#ifdef FWD_QUERY_REQ
xGLXQueryServerStringReq *be_req;
xGLXQueryServerStringReply be_reply;
DMXScreenInfo *dmxScreen;
Display *dpy;
- int slop;
+ int slop;
#endif
name = req->name;
screen = req->screen;
/*
- ** Check if screen exists.
- */
+ ** Check if screen exists.
+ */
if ((screen < 0) || (screen >= screenInfo.numScreens)) {
- client->errorValue = screen;
- return BadValue;
+ client->errorValue = screen;
+ return BadValue;
}
#ifdef FWD_QUERY_REQ
dmxScreen = &dmxScreens[screen];
/* Send the glXQueryServerString request */
- dpy = GetBackEndDisplay(cl,screen);
+ dpy = GetBackEndDisplay(cl, screen);
LockDisplay(dpy);
- GetReq(GLXQueryServerString,be_req);
+ GetReq(GLXQueryServerString, be_req);
be_req->reqType = dmxScreen->glxMajorOpcode;
be_req->glxCode = X_GLXQueryServerString;
be_req->screen = DefaultScreen(dpy);
be_req->name = name;
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- len = (int)be_reply.length;
- numbytes = (int)be_reply.n;
+ _XReply(dpy, (xReply *) & be_reply, 0, False);
+ len = (int) be_reply.length;
+ numbytes = (int) be_reply.n;
slop = numbytes * __GLX_SIZE_INT8 & 3;
- be_buf = (char *)malloc(numbytes);
+ be_buf = (char *) malloc(numbytes);
if (!be_buf) {
/* Throw data on the floor */
_XEatData(dpy, len);
- } else {
- _XRead(dpy, (char *)be_buf, numbytes);
- if (slop) _XEatData(dpy,4-slop);
+ }
+ else {
+ _XRead(dpy, (char *) be_buf, numbytes);
+ if (slop)
+ _XEatData(dpy, 4 - slop);
}
UnlockDisplay(dpy);
SyncHandle();
@@ -2608,15 +2717,17 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc)
if (client->swapped) {
glxSwapQueryServerStringReply(client, &reply, be_buf);
- } else {
- WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)&reply);
- WriteToClient(client, (int)(length << 2), be_buf);
+ }
+ else {
+ WriteToClient(client, sz_xGLXQueryServerStringReply, (char *) &reply);
+ WriteToClient(client, (int) (length << 2), be_buf);
}
return Success;
}
-int __glXClientInfo(__GLXclientState *cl, GLbyte *pc)
+int
+__glXClientInfo(__GLXclientState * cl, GLbyte * pc)
{
xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc;
xGLXClientInfoReq *be_req;
@@ -2624,38 +2735,38 @@ int __glXClientInfo(__GLXclientState *cl, GLbyte *pc)
int from_screen = 0;
int to_screen = 0;
int s;
-
+
cl->GLClientmajorVersion = req->major;
cl->GLClientminorVersion = req->minor;
free(cl->GLClientextensions);
- buf = (const char *)(req+1);
+ buf = (const char *) (req + 1);
cl->GLClientextensions = strdup(buf);
to_screen = screenInfo.numScreens - 1;
- for (s=from_screen; s<=to_screen; s++)
- {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
- LockDisplay(dpy);
- GetReq(GLXClientInfo,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXClientInfo;
- be_req->major = req->major;
- be_req->minor = req->minor;
- be_req->length = req->length;
- be_req->numbytes = req->numbytes;
- Data(dpy, buf, req->numbytes);
+ LockDisplay(dpy);
+ GetReq(GLXClientInfo, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXClientInfo;
+ be_req->major = req->major;
+ be_req->minor = req->minor;
+ be_req->length = req->length;
+ be_req->numbytes = req->numbytes;
+ Data(dpy, buf, req->numbytes);
- UnlockDisplay(dpy);
- SyncHandle();
+ UnlockDisplay(dpy);
+ SyncHandle();
}
return Success;
}
-int __glXUseXFont(__GLXclientState *cl, GLbyte *pc)
+int
+__glXUseXFont(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXUseXFontReq *req;
@@ -2665,66 +2776,66 @@ int __glXUseXFont(__GLXclientState *cl, GLbyte *pc)
int from_screen = 0;
int to_screen = 0;
int s;
- dmxFontPrivPtr pFontPriv;
+ dmxFontPrivPtr pFontPriv;
DMXScreenInfo *dmxScreen;
Display *dpy;
req = (xGLXUseXFontReq *) pc;
if (req->contextTag != 0) {
- glxc = __glXLookupContextByTag(cl, req->contextTag);
- if (glxc) {
- from_screen = to_screen = glxc->pScreen->myNum;
- }
+ glxc = __glXLookupContextByTag(cl, req->contextTag);
+ if (glxc) {
+ from_screen = to_screen = glxc->pScreen->myNum;
+ }
}
/*
- ** Font can actually be either the ID of a font or the ID of a GC
- ** containing a font.
- */
- dixLookupResourceByType((pointer*) &pFont, req->font, RT_FONT,
+ ** Font can actually be either the ID of a font or the ID of a GC
+ ** containing a font.
+ */
+ dixLookupResourceByType((pointer *) &pFont, req->font, RT_FONT,
NullClient, DixUnknownAccess);
if (!pFont) {
GC *pGC;
- dixLookupResourceByType((pointer*) &pGC, req->font,
- RT_GC, NullClient,
- DixUnknownAccess);
+
+ dixLookupResourceByType((pointer *) &pGC, req->font,
+ RT_GC, NullClient, DixUnknownAccess);
if (!pGC) {
- client->errorValue = req->font;
+ client->errorValue = req->font;
return BadFont;
- }
- pFont = pGC->font;
+ }
+ pFont = pGC->font;
}
pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex);
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
+ for (s = from_screen; s <= to_screen; s++) {
+ dmxScreen = &dmxScreens[s];
+ dpy = GetBackEndDisplay(cl, s);
- for (s=from_screen; s<=to_screen; s++) {
- dmxScreen = &dmxScreens[s];
- dpy = GetBackEndDisplay(cl,s);
-
- dmxSync( dmxScreen, 1 );
+ dmxSync(dmxScreen, 1);
- LockDisplay(dpy);
- GetReq(GLXUseXFont,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXUseXFont;
- be_req->contextTag = (glxc ? GetCurrentBackEndTag(cl,req->contextTag,s) : 0);
- be_req->font = pFontPriv->font[s]->fid;
- be_req->first = req->first;
- be_req->count = req->count;
- be_req->listBase = req->listBase;
- UnlockDisplay(dpy);
- SyncHandle();
+ LockDisplay(dpy);
+ GetReq(GLXUseXFont, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXUseXFont;
+ be_req->contextTag =
+ (glxc ? GetCurrentBackEndTag(cl, req->contextTag, s) : 0);
+ be_req->font = pFontPriv->font[s]->fid;
+ be_req->first = req->first;
+ be_req->count = req->count;
+ be_req->listBase = req->listBase;
+ UnlockDisplay(dpy);
+ SyncHandle();
- XSync( dpy, False );
+ XSync(dpy, False);
}
return Success;
@@ -2734,7 +2845,8 @@ int __glXUseXFont(__GLXclientState *cl, GLbyte *pc)
* start GLX 1.3 here
*/
-int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
+int
+__glXGetFBConfigs(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
@@ -2747,9 +2859,9 @@ int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
__GLXscreenInfo *pGlxScreen;
if (screen >= screenInfo.numScreens) {
- /* The client library must send a valid screen number. */
- client->errorValue = screen;
- return BadValue;
+ /* The client library must send a valid screen number. */
+ client->errorValue = screen;
+ return BadValue;
}
pGlxScreen = &__glXActiveScreens[screen];
@@ -2762,169 +2874,174 @@ int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
reply.sequenceNumber = client->sequence;
if (client->swapped) {
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_SHORT(&reply.sequenceNumber);
- __GLX_SWAP_INT(&reply.length);
- __GLX_SWAP_INT(&reply.numFBConfigs);
- __GLX_SWAP_INT(&reply.numAttribs);
- }
- WriteToClient(client, sz_xGLXGetFBConfigsReply, (char *)&reply);
-
- for (i=0; i < numFBConfigs; i++) {
- int associatedVisualId = 0;
- int drawableTypeIndex;
- pFBConfig = __glXFBConfigs[ i * (screenInfo.numScreens+1) ];
-
- p = 0;
- /* core attributes */
- buf[p++] = GLX_FBCONFIG_ID;
- buf[p++] = pFBConfig->id;
- buf[p++] = GLX_BUFFER_SIZE;
- buf[p++] = pFBConfig->indexBits;
- buf[p++] = GLX_LEVEL;
- buf[p++] = pFBConfig->level;
- buf[p++] = GLX_DOUBLEBUFFER;
- buf[p++] = pFBConfig->doubleBufferMode;
- buf[p++] = GLX_STEREO;
- buf[p++] = pFBConfig->stereoMode;
- buf[p++] = GLX_AUX_BUFFERS;
- buf[p++] = pFBConfig->maxAuxBuffers;
- buf[p++] = GLX_RED_SIZE;
- buf[p++] = pFBConfig->redBits;
- buf[p++] = GLX_GREEN_SIZE;
- buf[p++] = pFBConfig->greenBits;
- buf[p++] = GLX_BLUE_SIZE;
- buf[p++] = pFBConfig->blueBits;
- buf[p++] = GLX_ALPHA_SIZE;
- buf[p++] = pFBConfig->alphaBits;
- buf[p++] = GLX_DEPTH_SIZE;
- buf[p++] = pFBConfig->depthBits;
- buf[p++] = GLX_STENCIL_SIZE;
- buf[p++] = pFBConfig->stencilBits;
- buf[p++] = GLX_ACCUM_RED_SIZE;
- buf[p++] = pFBConfig->accumRedBits;
- buf[p++] = GLX_ACCUM_GREEN_SIZE;
- buf[p++] = pFBConfig->accumGreenBits;
- buf[p++] = GLX_ACCUM_BLUE_SIZE;
- buf[p++] = pFBConfig->accumBlueBits;
- buf[p++] = GLX_ACCUM_ALPHA_SIZE;
- buf[p++] = pFBConfig->accumAlphaBits;
- buf[p++] = GLX_RENDER_TYPE;
- buf[p++] = pFBConfig->renderType;
- buf[p++] = GLX_DRAWABLE_TYPE;
- drawableTypeIndex = p;
- buf[p++] = pFBConfig->drawableType;
- buf[p++] = GLX_X_VISUAL_TYPE;
- buf[p++] = pFBConfig->visualType;
- buf[p++] = GLX_CONFIG_CAVEAT;
- buf[p++] = pFBConfig->visualCaveat;
- buf[p++] = GLX_TRANSPARENT_TYPE;
- buf[p++] = pFBConfig->transparentType;
- buf[p++] = GLX_TRANSPARENT_RED_VALUE;
- buf[p++] = pFBConfig->transparentRed;
- buf[p++] = GLX_TRANSPARENT_GREEN_VALUE;
- buf[p++] = pFBConfig->transparentGreen;
- buf[p++] = GLX_TRANSPARENT_BLUE_VALUE;
- buf[p++] = pFBConfig->transparentBlue;
- buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE;
- buf[p++] = pFBConfig->transparentAlpha;
- buf[p++] = GLX_TRANSPARENT_INDEX_VALUE;
- buf[p++] = pFBConfig->transparentIndex;
- buf[p++] = GLX_MAX_PBUFFER_WIDTH;
- buf[p++] = pFBConfig->maxPbufferWidth;
- buf[p++] = GLX_MAX_PBUFFER_HEIGHT;
- buf[p++] = pFBConfig->maxPbufferHeight;
- buf[p++] = GLX_MAX_PBUFFER_PIXELS;
- buf[p++] = pFBConfig->maxPbufferPixels;
-
- /*
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_SWAP_SHORT(&reply.sequenceNumber);
+ __GLX_SWAP_INT(&reply.length);
+ __GLX_SWAP_INT(&reply.numFBConfigs);
+ __GLX_SWAP_INT(&reply.numAttribs);
+ }
+ WriteToClient(client, sz_xGLXGetFBConfigsReply, (char *) &reply);
+
+ for (i = 0; i < numFBConfigs; i++) {
+ int associatedVisualId = 0;
+ int drawableTypeIndex;
+
+ pFBConfig = __glXFBConfigs[i * (screenInfo.numScreens + 1)];
+
+ p = 0;
+ /* core attributes */
+ buf[p++] = GLX_FBCONFIG_ID;
+ buf[p++] = pFBConfig->id;
+ buf[p++] = GLX_BUFFER_SIZE;
+ buf[p++] = pFBConfig->indexBits;
+ buf[p++] = GLX_LEVEL;
+ buf[p++] = pFBConfig->level;
+ buf[p++] = GLX_DOUBLEBUFFER;
+ buf[p++] = pFBConfig->doubleBufferMode;
+ buf[p++] = GLX_STEREO;
+ buf[p++] = pFBConfig->stereoMode;
+ buf[p++] = GLX_AUX_BUFFERS;
+ buf[p++] = pFBConfig->maxAuxBuffers;
+ buf[p++] = GLX_RED_SIZE;
+ buf[p++] = pFBConfig->redBits;
+ buf[p++] = GLX_GREEN_SIZE;
+ buf[p++] = pFBConfig->greenBits;
+ buf[p++] = GLX_BLUE_SIZE;
+ buf[p++] = pFBConfig->blueBits;
+ buf[p++] = GLX_ALPHA_SIZE;
+ buf[p++] = pFBConfig->alphaBits;
+ buf[p++] = GLX_DEPTH_SIZE;
+ buf[p++] = pFBConfig->depthBits;
+ buf[p++] = GLX_STENCIL_SIZE;
+ buf[p++] = pFBConfig->stencilBits;
+ buf[p++] = GLX_ACCUM_RED_SIZE;
+ buf[p++] = pFBConfig->accumRedBits;
+ buf[p++] = GLX_ACCUM_GREEN_SIZE;
+ buf[p++] = pFBConfig->accumGreenBits;
+ buf[p++] = GLX_ACCUM_BLUE_SIZE;
+ buf[p++] = pFBConfig->accumBlueBits;
+ buf[p++] = GLX_ACCUM_ALPHA_SIZE;
+ buf[p++] = pFBConfig->accumAlphaBits;
+ buf[p++] = GLX_RENDER_TYPE;
+ buf[p++] = pFBConfig->renderType;
+ buf[p++] = GLX_DRAWABLE_TYPE;
+ drawableTypeIndex = p;
+ buf[p++] = pFBConfig->drawableType;
+ buf[p++] = GLX_X_VISUAL_TYPE;
+ buf[p++] = pFBConfig->visualType;
+ buf[p++] = GLX_CONFIG_CAVEAT;
+ buf[p++] = pFBConfig->visualCaveat;
+ buf[p++] = GLX_TRANSPARENT_TYPE;
+ buf[p++] = pFBConfig->transparentType;
+ buf[p++] = GLX_TRANSPARENT_RED_VALUE;
+ buf[p++] = pFBConfig->transparentRed;
+ buf[p++] = GLX_TRANSPARENT_GREEN_VALUE;
+ buf[p++] = pFBConfig->transparentGreen;
+ buf[p++] = GLX_TRANSPARENT_BLUE_VALUE;
+ buf[p++] = pFBConfig->transparentBlue;
+ buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE;
+ buf[p++] = pFBConfig->transparentAlpha;
+ buf[p++] = GLX_TRANSPARENT_INDEX_VALUE;
+ buf[p++] = pFBConfig->transparentIndex;
+ buf[p++] = GLX_MAX_PBUFFER_WIDTH;
+ buf[p++] = pFBConfig->maxPbufferWidth;
+ buf[p++] = GLX_MAX_PBUFFER_HEIGHT;
+ buf[p++] = pFBConfig->maxPbufferHeight;
+ buf[p++] = GLX_MAX_PBUFFER_PIXELS;
+ buf[p++] = pFBConfig->maxPbufferPixels;
+
+ /*
* find the visual of the back-end server and match a visual
- * on the proxy.
- * do only once - if a visual is not yet associated.
- */
- if (pFBConfig->associatedVisualId == (unsigned int)-1) {
- DMXScreenInfo *dmxScreen = &dmxScreens[screen];
- __GLXFBConfig *be_pFBConfig = __glXFBConfigs[ i * (screenInfo.numScreens+1)+screen+1 ];
- __GLXvisualConfig *pGlxVisual = NULL;
- int v;
- int found = 0;
- for (v=0; v<dmxScreen->numGlxVisuals; v++) {
- if (dmxScreen->glxVisuals[v].vid == be_pFBConfig->associatedVisualId) {
- pGlxVisual = &dmxScreen->glxVisuals[v];
- break;
- }
- }
-
- if (pGlxVisual) {
- for (v=0; v<pGlxScreen->numVisuals; v++) {
- if (glxVisualsMatch(&pGlxScreen->pGlxVisual[v], pGlxVisual)) {
- associatedVisualId = pGlxScreen->pGlxVisual[v].vid;
- found = 1;
- break;
- }
- }
- }
-
- if (!found) {
- associatedVisualId = 0;
- pFBConfig->drawableType &= ~(GLX_WINDOW_BIT);
- buf[drawableTypeIndex] = pFBConfig->drawableType;
- }
+ * on the proxy.
+ * do only once - if a visual is not yet associated.
+ */
+ if (pFBConfig->associatedVisualId == (unsigned int) -1) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[screen];
+ __GLXFBConfig *be_pFBConfig =
+ __glXFBConfigs[i * (screenInfo.numScreens + 1) + screen + 1];
+ __GLXvisualConfig *pGlxVisual = NULL;
+ int v;
+ int found = 0;
+
+ for (v = 0; v < dmxScreen->numGlxVisuals; v++) {
+ if (dmxScreen->glxVisuals[v].vid ==
+ be_pFBConfig->associatedVisualId) {
+ pGlxVisual = &dmxScreen->glxVisuals[v];
+ break;
+ }
+ }
+
+ if (pGlxVisual) {
+ for (v = 0; v < pGlxScreen->numVisuals; v++) {
+ if (glxVisualsMatch(&pGlxScreen->pGlxVisual[v], pGlxVisual)) {
+ associatedVisualId = pGlxScreen->pGlxVisual[v].vid;
+ found = 1;
+ break;
+ }
+ }
+ }
+
+ if (!found) {
+ associatedVisualId = 0;
+ pFBConfig->drawableType &= ~(GLX_WINDOW_BIT);
+ buf[drawableTypeIndex] = pFBConfig->drawableType;
+ }
#ifdef PANORAMIX
- else if (!noPanoramiXExtension) {
- /* convert the associated visualId to the panoramix one */
- pFBConfig->associatedVisualId =
- PanoramiXTranslateVisualID(screen, v);
- }
+ else if (!noPanoramiXExtension) {
+ /* convert the associated visualId to the panoramix one */
+ pFBConfig->associatedVisualId =
+ PanoramiXTranslateVisualID(screen, v);
+ }
#endif
- }
- else {
- associatedVisualId = pFBConfig->associatedVisualId;
- }
-
- buf[p++] = GLX_VISUAL_ID;
- buf[p++] = associatedVisualId;
-
- /* SGIS_multisample attributes */
- buf[p++] = GLX_SAMPLES_SGIS;
- buf[p++] = pFBConfig->multiSampleSize;
- buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
- buf[p++] = pFBConfig->nMultiSampleBuffers;
-
- /* SGIX_pbuffer specific attributes */
- buf[p++] = GLX_OPTIMAL_PBUFFER_WIDTH_SGIX;
- buf[p++] = pFBConfig->optimalPbufferWidth;
- buf[p++] = GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX;
- buf[p++] = pFBConfig->optimalPbufferHeight;
-
- buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
- buf[p++] = pFBConfig->visualSelectGroup;
-
- if (client->swapped) {
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_INT_ARRAY((int *)buf, 2*numAttribs);
- }
- WriteToClient(client, 2*numAttribs * __GLX_SIZE_CARD32, (char *)buf);
+ }
+ else {
+ associatedVisualId = pFBConfig->associatedVisualId;
+ }
+
+ buf[p++] = GLX_VISUAL_ID;
+ buf[p++] = associatedVisualId;
+
+ /* SGIS_multisample attributes */
+ buf[p++] = GLX_SAMPLES_SGIS;
+ buf[p++] = pFBConfig->multiSampleSize;
+ buf[p++] = GLX_SAMPLE_BUFFERS_SGIS;
+ buf[p++] = pFBConfig->nMultiSampleBuffers;
+
+ /* SGIX_pbuffer specific attributes */
+ buf[p++] = GLX_OPTIMAL_PBUFFER_WIDTH_SGIX;
+ buf[p++] = pFBConfig->optimalPbufferWidth;
+ buf[p++] = GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX;
+ buf[p++] = pFBConfig->optimalPbufferHeight;
+
+ buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX;
+ buf[p++] = pFBConfig->visualSelectGroup;
+
+ if (client->swapped) {
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ __GLX_SWAP_INT_ARRAY((int *) buf, 2 * numAttribs);
+ }
+ WriteToClient(client, 2 * numAttribs * __GLX_SIZE_CARD32, (char *) buf);
}
return Success;
}
-int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc)
{
- xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *)pc;
- xGLXGetFBConfigsReq new_req;
+ xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc;
+ xGLXGetFBConfigsReq new_req;
- new_req.reqType = req->reqType;
- new_req.glxCode = req->glxCode;
- new_req.length = req->length;
- new_req.screen = req->screen;
+ new_req.reqType = req->reqType;
+ new_req.glxCode = req->glxCode;
+ new_req.length = req->length;
+ new_req.screen = req->screen;
- return( __glXGetFBConfigs( cl, (GLbyte *)&new_req ) );
+ return (__glXGetFBConfigs(cl, (GLbyte *) & new_req));
}
-
-int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc)
+int
+__glXCreateWindow(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
@@ -2942,86 +3059,87 @@ int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc)
pointer val;
/*
- ** Check if windowId is valid
- */
+ ** Check if windowId is valid
+ */
rc = dixLookupDrawable(&pDraw, windowId, client, M_DRAWABLE_WINDOW,
- DixAddAccess);
+ DixAddAccess);
if (rc != Success)
- return rc;
+ return rc;
/*
- ** Check if screen of window matches screen of fbconfig.
- */
+ ** Check if screen of window matches screen of fbconfig.
+ */
pScreen = pDraw->pScreen;
if (screen != pScreen->myNum) {
- return BadMatch;
+ return BadMatch;
}
/*
- ** Find the FBConfigRec for this fbconfigid.
- */
+ ** Find the FBConfigRec for this fbconfigid.
+ */
if (!(pGlxFBConfig = glxLookupFBConfig(fbconfigId))) {
- client->errorValue = fbconfigId;
- return __glXBadFBConfig;
+ client->errorValue = fbconfigId;
+ return __glXBadFBConfig;
}
visId = pGlxFBConfig->associatedVisualId;
/*
- ** Check if the fbconfig supports rendering to windows
- */
- if( !(pGlxFBConfig->drawableType & GLX_WINDOW_BIT) ) {
- return BadMatch;
+ ** Check if the fbconfig supports rendering to windows
+ */
+ if (!(pGlxFBConfig->drawableType & GLX_WINDOW_BIT)) {
+ return BadMatch;
}
if (visId != None) {
- /*
- ** Check if the visual ID is valid for this screen.
- */
- pVisual = pScreen->visuals;
- for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
- if (pVisual->vid == visId) {
- break;
- }
- }
- if (i == pScreen->numVisuals) {
- client->errorValue = visId;
- return BadValue;
- }
-
/*
- ** Check if color buffer depth of fbconfig matches depth
- ** of window.
- */
+ ** Check if the visual ID is valid for this screen.
+ */
+ pVisual = pScreen->visuals;
+ for (i = 0; i < pScreen->numVisuals; i++, pVisual++) {
+ if (pVisual->vid == visId) {
+ break;
+ }
+ }
+ if (i == pScreen->numVisuals) {
+ client->errorValue = visId;
+ return BadValue;
+ }
+
+ /*
+ ** Check if color buffer depth of fbconfig matches depth
+ ** of window.
+ */
if (pVisual->nplanes != pDraw->depth) {
- return BadMatch;
- }
- } else
- /*
- ** The window was created with no visual that corresponds
- ** to fbconfig
- */
- return BadMatch;
+ return BadMatch;
+ }
+ }
+ else
+ /*
+ ** The window was created with no visual that corresponds
+ ** to fbconfig
+ */
+ return BadMatch;
/*
- ** Check if there is already a fbconfig associated with this window
- */
+ ** Check if there is already a fbconfig associated with this window
+ */
if (Success == dixLookupResourceByType(&val,
- glxwindowId, __glXWindowRes,
- NullClient, DixUnknownAccess)) {
- client->errorValue = glxwindowId;
- return BadAlloc;
+ glxwindowId, __glXWindowRes,
+ NullClient, DixUnknownAccess)) {
+ client->errorValue = glxwindowId;
+ return BadAlloc;
}
pGlxWindow = (__glXWindow *) malloc(sizeof(__glXWindow));
if (!pGlxWindow) {
- return BadAlloc;
+ return BadAlloc;
}
/*
- ** Register this GLX window as a resource
- */
+ ** Register this GLX window as a resource
+ */
if (!(AddResource(glxwindowId, __glXWindowRes, pGlxWindow))) {
- return BadAlloc;
+ return BadAlloc;
}
pGlxWindow->pDraw = pDraw;
@@ -3034,7 +3152,8 @@ int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc)
return Success;
}
-int __glXDestroyWindow(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDestroyWindow(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
@@ -3042,24 +3161,25 @@ int __glXDestroyWindow(__GLXclientState *cl, GLbyte *pc)
pointer val;
/*
- ** Check if it's a valid GLX window.
- */
+ ** Check if it's a valid GLX window.
+ */
if (Success != dixLookupResourceByType(&val,
- glxwindow, __glXWindowRes,
- NullClient, DixUnknownAccess)) {
- client->errorValue = glxwindow;
- return __glXBadDrawable;
+ glxwindow, __glXWindowRes,
+ NullClient, DixUnknownAccess)) {
+ client->errorValue = glxwindow;
+ return __glXBadDrawable;
}
/*
- ** The glx window destructor will check whether it's current before
- ** freeing anything.
- */
- FreeResource(glxwindow, RT_NONE);
+ ** The glx window destructor will check whether it's current before
+ ** freeing anything.
+ */
+ FreeResource(glxwindow, RT_NONE);
return Success;
}
-int __glXQueryContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXQueryContext(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
__GLXcontext *ctx;
@@ -3069,8 +3189,8 @@ int __glXQueryContext(__GLXclientState *cl, GLbyte *pc)
int *sendBuf, *pSendBuf;
int nReplyBytes;
- req = (xGLXQueryContextReq *)pc;
- dixLookupResourceByType((pointer*) &ctx, req->context, __glXContextRes,
+ req = (xGLXQueryContextReq *) pc;
+ dixLookupResourceByType((pointer *) &ctx, req->context, __glXContextRes,
NullClient, DixUnknownAccess);
if (!ctx) {
client->errorValue = req->context;
@@ -3085,27 +3205,29 @@ int __glXQueryContext(__GLXclientState *cl, GLbyte *pc)
reply.n = nProps;
nReplyBytes = reply.length << 2;
- sendBuf = (int *)malloc(nReplyBytes);
+ sendBuf = (int *) malloc(nReplyBytes);
pSendBuf = sendBuf;
*pSendBuf++ = GLX_FBCONFIG_ID;
- *pSendBuf++ = (int)(ctx->pFBConfig->id);
+ *pSendBuf++ = (int) (ctx->pFBConfig->id);
*pSendBuf++ = GLX_RENDER_TYPE;
- *pSendBuf++ = (int)(ctx->pFBConfig->renderType);
+ *pSendBuf++ = (int) (ctx->pFBConfig->renderType);
*pSendBuf++ = GLX_SCREEN;
- *pSendBuf++ = (int)(ctx->pScreen->myNum);
+ *pSendBuf++ = (int) (ctx->pScreen->myNum);
if (client->swapped) {
__glXSwapQueryContextReply(client, &reply, sendBuf);
- } else {
- WriteToClient(client, sz_xGLXQueryContextReply, (char *)&reply);
- WriteToClient(client, nReplyBytes, (char *)sendBuf);
}
- free((char *)sendBuf);
+ else {
+ WriteToClient(client, sz_xGLXQueryContextReply, (char *) &reply);
+ WriteToClient(client, nReplyBytes, (char *) sendBuf);
+ }
+ free((char *) sendBuf);
return Success;
}
-int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
+int
+__glXQueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
__GLXcontext *ctx;
@@ -3115,10 +3237,10 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
int *sendBuf, *pSendBuf;
int nReplyBytes;
- req = (xGLXQueryContextInfoEXTReq *)pc;
- dixLookupResourceByType((pointer*) &ctx,
- req->context, __glXContextRes,
- client, DixReadAccess);
+ req = (xGLXQueryContextInfoEXTReq *) pc;
+ dixLookupResourceByType((pointer *) &ctx,
+ req->context, __glXContextRes,
+ client, DixReadAccess);
if (!ctx) {
client->errorValue = req->context;
@@ -3133,32 +3255,34 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
reply.n = nProps;
nReplyBytes = reply.length << 2;
- sendBuf = (int *)malloc(nReplyBytes);
+ sendBuf = (int *) malloc(nReplyBytes);
pSendBuf = sendBuf;
*pSendBuf++ = GLX_SHARE_CONTEXT_EXT;
- *pSendBuf++ = (int)(ctx->share_id);
+ *pSendBuf++ = (int) (ctx->share_id);
*pSendBuf++ = GLX_VISUAL_ID_EXT;
- *pSendBuf++ = (int)(ctx->pVisual ? ctx->pVisual->vid : 0);
+ *pSendBuf++ = (int) (ctx->pVisual ? ctx->pVisual->vid : 0);
*pSendBuf++ = GLX_SCREEN_EXT;
- *pSendBuf++ = (int)(ctx->pScreen->myNum);
+ *pSendBuf++ = (int) (ctx->pScreen->myNum);
*pSendBuf++ = GLX_FBCONFIG_ID;
- *pSendBuf++ = (int)(ctx->pFBConfig ? ctx->pFBConfig->id : 0);
+ *pSendBuf++ = (int) (ctx->pFBConfig ? ctx->pFBConfig->id : 0);
if (client->swapped) {
__glXSwapQueryContextInfoEXTReply(client, &reply, sendBuf);
- } else {
- WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)&reply);
- WriteToClient(client, nReplyBytes, (char *)sendBuf);
}
- free((char *)sendBuf);
+ else {
+ WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *) &reply);
+ WriteToClient(client, nReplyBytes, (char *) sendBuf);
+ }
+ free((char *) sendBuf);
return Success;
}
-int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
+int
+__glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
- xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *)pc;
+ xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc;
xGLXCreatePbufferReq *be_req;
int screen = req->screen;
GLXFBConfigID fbconfigId = req->fbconfig;
@@ -3175,9 +3299,9 @@ int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
int s;
int from_screen, to_screen;
- /*
- ** Look up screen and FBConfig.
- */
+ /*
+ ** Look up screen and FBConfig.
+ */
if (screen >= screenInfo.numScreens) {
/* The client library must send a valid screen number. */
client->errorValue = screen;
@@ -3186,22 +3310,22 @@ int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
pScreen = screenInfo.screens[screen];
/*
- ** Find the FBConfigRec for this fbconfigid.
- */
+ ** Find the FBConfigRec for this fbconfigid.
+ */
if (!(pGlxFBConfig = glxLookupFBConfig(fbconfigId))) {
- client->errorValue = fbconfigId;
- return __glXBadFBConfig;
+ client->errorValue = fbconfigId;
+ return __glXBadFBConfig;
}
/*
- ** Create the GLX part of the Pbuffer.
- */
+ ** Create the GLX part of the Pbuffer.
+ */
pGlxPbuffer = (__glXPbuffer *) malloc(sizeof(__glXPbuffer));
if (!pGlxPbuffer) {
return BadAlloc;
}
- pGlxPbuffer->be_xids = (XID *) malloc( sizeof(XID) * screenInfo.numScreens );
+ pGlxPbuffer->be_xids = (XID *) malloc(sizeof(XID) * screenInfo.numScreens);
if (!pGlxPbuffer->be_xids) {
free(pGlxPbuffer);
return BadAlloc;
@@ -3213,53 +3337,53 @@ int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
from_screen = to_screen = screen;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
- for (s=from_screen; s<=to_screen; s++) {
- dpy = GetBackEndDisplay(cl,s);
- be_xid = XAllocID(dpy);
- dmxScreen = &dmxScreens[s];
- be_pGlxFBConfig = glxLookupBackEndFBConfig( pGlxFBConfig->id, s );
-
- attr = (int *)( req+1 );
-
- LockDisplay(dpy);
- GetReqExtra(GLXCreatePbuffer, 2 * numAttribs * __GLX_SIZE_CARD32, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXCreatePbuffer;
- be_req->screen = be_pGlxFBConfig->screen;
- be_req->fbconfig = be_pGlxFBConfig->id;
- be_req->pbuffer = be_xid;
- be_req->numAttribs = numAttribs;
-
- /* Send attributes */
- if ( attr != NULL ) {
- CARD32 *pc = (CARD32 *)(be_req + 1);
-
- while (numAttribs-- > 0) {
- *pc++ = *attr++; /* token */
- *pc++ = *attr++; /* value */
- }
- }
+ for (s = from_screen; s <= to_screen; s++) {
+ dpy = GetBackEndDisplay(cl, s);
+ be_xid = XAllocID(dpy);
+ dmxScreen = &dmxScreens[s];
+ be_pGlxFBConfig = glxLookupBackEndFBConfig(pGlxFBConfig->id, s);
+
+ attr = (int *) (req + 1);
+
+ LockDisplay(dpy);
+ GetReqExtra(GLXCreatePbuffer, 2 * numAttribs * __GLX_SIZE_CARD32,
+ be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXCreatePbuffer;
+ be_req->screen = be_pGlxFBConfig->screen;
+ be_req->fbconfig = be_pGlxFBConfig->id;
+ be_req->pbuffer = be_xid;
+ be_req->numAttribs = numAttribs;
+
+ /* Send attributes */
+ if (attr != NULL) {
+ CARD32 *pc = (CARD32 *) (be_req + 1);
+
+ while (numAttribs-- > 0) {
+ *pc++ = *attr++; /* token */
+ *pc++ = *attr++; /* value */
+ }
+ }
- UnlockDisplay(dpy);
- SyncHandle();
+ UnlockDisplay(dpy);
+ SyncHandle();
- pGlxPbuffer->be_xids[s] = be_xid;
+ pGlxPbuffer->be_xids[s] = be_xid;
}
-
pGlxPbuffer->idExists = True;
pGlxPbuffer->refcnt = 0;
pGlxPbuffer->pFBConfig = pGlxFBConfig;
pGlxPbuffer->pScreen = pScreen;
/*
- ** Register the resource.
- */
+ ** Register the resource.
+ */
if (!(AddResource(pbuffer, __glXPbufferRes, pGlxPbuffer))) {
return BadAlloc;
}
@@ -3268,7 +3392,8 @@ int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
}
-int __glXDestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDestroyPbuffer(__GLXclientState * cl, GLbyte * pc)
{
ClientPtr client = cl->client;
xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
@@ -3282,13 +3407,13 @@ int __glXDestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
int from_screen, to_screen;
/*
- ** Check if it's a valid Pbuffer
- */
- dixLookupResourceByType((pointer*) &pGlxPbuffer, pbuffer,
+ ** Check if it's a valid Pbuffer
+ */
+ dixLookupResourceByType((pointer *) &pGlxPbuffer, pbuffer,
__glXPbufferRes, NullClient, DixUnknownAccess);
if (!pGlxPbuffer) {
- client->errorValue = pbuffer;
- return __glXBadPbuffer;
+ client->errorValue = pbuffer;
+ return __glXBadPbuffer;
}
screen = pGlxPbuffer->pScreen->myNum;
@@ -3296,327 +3421,342 @@ int __glXDestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
from_screen = to_screen = screen;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
- for (s=from_screen; s<=to_screen; s++) {
- dpy = GetBackEndDisplay(cl,s);
- dmxScreen = &dmxScreens[s];
+ for (s = from_screen; s <= to_screen; s++) {
+ dpy = GetBackEndDisplay(cl, s);
+ dmxScreen = &dmxScreens[s];
- /* send the destroy request to the back-end server */
- LockDisplay(dpy);
- GetReq(GLXDestroyPbuffer, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXDestroyPbuffer;
- be_req->pbuffer = pGlxPbuffer->be_xids[s];
- UnlockDisplay(dpy);
- SyncHandle();
+ /* send the destroy request to the back-end server */
+ LockDisplay(dpy);
+ GetReq(GLXDestroyPbuffer, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXDestroyPbuffer;
+ be_req->pbuffer = pGlxPbuffer->be_xids[s];
+ UnlockDisplay(dpy);
+ SyncHandle();
}
- FreeResource(pbuffer, RT_NONE);
+ FreeResource(pbuffer, RT_NONE);
return Success;
}
-int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
+int
+__glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
{
- xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc;
- xGLXGetDrawableAttributesReq *be_req;
- xGLXGetDrawableAttributesReply reply;
- ClientPtr client = cl->client;
- GLXDrawable drawId = req->drawable;
- GLXDrawable be_drawable = 0;
- DrawablePtr pDraw = NULL;
- Display *dpy;
- int screen, rc;
- DMXScreenInfo *dmxScreen;
- CARD32 *attribs = NULL;
- int attribs_size = 0;
+ xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc;
+ xGLXGetDrawableAttributesReq *be_req;
+ xGLXGetDrawableAttributesReply reply;
+ ClientPtr client = cl->client;
+ GLXDrawable drawId = req->drawable;
+ GLXDrawable be_drawable = 0;
+ DrawablePtr pDraw = NULL;
+ Display *dpy;
+ int screen, rc;
+ DMXScreenInfo *dmxScreen;
+ CARD32 *attribs = NULL;
+ int attribs_size = 0;
+
#ifdef PANORAMIX
PanoramiXRes *pXinDraw = NULL;
#endif
- if (drawId != None) {
- rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess);
- if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
- WindowPtr pWin = (WindowPtr)pDraw;
- be_drawable = 0;
- screen = pWin->drawable.pScreen->myNum;
- } else {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- if (!pDraw) {
- __GLXpixmap *pGlxPixmap;
- dixLookupResourceByType((pointer*) &pGlxPixmap,
- drawId, __glXPixmapRes,
- NullClient, DixUnknownAccess);
- if (pGlxPixmap) {
- pDraw = pGlxPixmap->pDraw;
- screen = pGlxPixmap->pScreen->myNum;
+ if (drawId != None) {
+ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess);
+ if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
+ WindowPtr pWin = (WindowPtr) pDraw;
+
+ be_drawable = 0;
+ screen = pWin->drawable.pScreen->myNum;
+ }
+ else {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ if (!pDraw) {
+ __GLXpixmap *pGlxPixmap;
+
+ dixLookupResourceByType((pointer *) &pGlxPixmap,
+ drawId, __glXPixmapRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxPixmap) {
+ pDraw = pGlxPixmap->pDraw;
+ screen = pGlxPixmap->pScreen->myNum;
be_drawable = pGlxPixmap->be_xids[screen];
- }
- }
-
- if (!pDraw) {
- __glXWindow *pGlxWindow;
- dixLookupResourceByType((pointer*) &pGlxWindow,
- drawId, __glXWindowRes,
- NullClient, DixUnknownAccess);
- if (pGlxWindow) {
- pDraw = pGlxWindow->pDraw;
- screen = pGlxWindow->pScreen->myNum;
- be_drawable = 0;
- }
- }
-
- if (!pDraw) {
- __glXPbuffer *pGlxPbuffer;
- dixLookupResourceByType((pointer*) &pGlxPbuffer,
- drawId, __glXPbufferRes,
- NullClient, DixUnknownAccess);
- if (pGlxPbuffer) {
- pDraw = (DrawablePtr)pGlxPbuffer;
- screen = pGlxPbuffer->pScreen->myNum;
- be_drawable = pGlxPbuffer->be_xids[screen];
- }
- }
+ }
+ }
+
+ if (!pDraw) {
+ __glXWindow *pGlxWindow;
+
+ dixLookupResourceByType((pointer *) &pGlxWindow,
+ drawId, __glXWindowRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxWindow) {
+ pDraw = pGlxWindow->pDraw;
+ screen = pGlxWindow->pScreen->myNum;
+ be_drawable = 0;
+ }
+ }
+
+ if (!pDraw) {
+ __glXPbuffer *pGlxPbuffer;
+
+ dixLookupResourceByType((pointer *) &pGlxPbuffer,
+ drawId, __glXPbufferRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxPbuffer) {
+ pDraw = (DrawablePtr) pGlxPbuffer;
+ screen = pGlxPbuffer->pScreen->myNum;
+ be_drawable = pGlxPbuffer->be_xids[screen];
+ }
+ }
}
if (!pDraw) {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- /* if the drawable is a window or GLXWindow -
- * we need to find the base id on the back-end server
- */
- if (!be_drawable) {
- WindowPtr pWin = (WindowPtr)pDraw;
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ /* if the drawable is a window or GLXWindow -
+ * we need to find the base id on the back-end server
+ */
+ if (!be_drawable) {
+ WindowPtr pWin = (WindowPtr) pDraw;
#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- if (Success != dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess)) {
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
- DixReadAccess);
- }
+ if (!noPanoramiXExtension) {
+ if (Success != dixLookupResourceByClass((pointer *) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess)) {
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
+ DixReadAccess);
+ }
#endif
- if (pWin) {
- be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- if (!be_drawable) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pWin, TRUE );
- be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- }
- }
- else {
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
-
-
- /* send the request to the back-end server */
- dpy = GetBackEndDisplay(cl,screen);
- dmxScreen = &dmxScreens[screen];
-
- /* make sure drawable exists on back-end */
- dmxSync( dmxScreen, 1 );
-
- LockDisplay(dpy);
- GetReq(GLXGetDrawableAttributes, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXGetDrawableAttributes;
- be_req->drawable = be_drawable;
- be_req->length = req->length;
- if (!_XReply(dpy, (xReply *) &reply, 0, False)) {
- UnlockDisplay(dpy);
- SyncHandle();
- return( BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code) );
- }
-
- if (reply.numAttribs) {
- attribs_size = 2 * reply.numAttribs * __GLX_SIZE_CARD32;
- attribs = (CARD32 *) malloc(attribs_size);
- if (attribs == NULL) {
- UnlockDisplay(dpy);
- SyncHandle();
- return BadAlloc;
- }
-
- _XRead(dpy, (char *) attribs, attribs_size);
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
-
- /* send the reply back to the client */
- reply.sequenceNumber = client->sequence;
- if (client->swapped) {
- __glXSwapGetDrawableAttributesReply(client, &reply, (int *)attribs);
- }
- else {
- WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *)&reply);
- WriteToClient(client, attribs_size, (char *)attribs);
- }
-
- free(attribs);
-
- return Success;
+ if (pWin) {
+ be_drawable = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
+ if (!be_drawable) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow(pWin, TRUE);
+ be_drawable =
+ (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
+ }
+ }
+ else {
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
+
+ /* send the request to the back-end server */
+ dpy = GetBackEndDisplay(cl, screen);
+ dmxScreen = &dmxScreens[screen];
+
+ /* make sure drawable exists on back-end */
+ dmxSync(dmxScreen, 1);
+
+ LockDisplay(dpy);
+ GetReq(GLXGetDrawableAttributes, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXGetDrawableAttributes;
+ be_req->drawable = be_drawable;
+ be_req->length = req->length;
+ if (!_XReply(dpy, (xReply *) & reply, 0, False)) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return (BE_TO_CLIENT_ERROR(dmxLastErrorEvent.error_code));
+ }
+
+ if (reply.numAttribs) {
+ attribs_size = 2 * reply.numAttribs * __GLX_SIZE_CARD32;
+ attribs = (CARD32 *) malloc(attribs_size);
+ if (attribs == NULL) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return BadAlloc;
+ }
+
+ _XRead(dpy, (char *) attribs, attribs_size);
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ /* send the reply back to the client */
+ reply.sequenceNumber = client->sequence;
+ if (client->swapped) {
+ __glXSwapGetDrawableAttributesReply(client, &reply, (int *) attribs);
+ }
+ else {
+ WriteToClient(client, sz_xGLXGetDrawableAttributesReply,
+ (char *) &reply);
+ WriteToClient(client, attribs_size, (char *) attribs);
+ }
+
+ free(attribs);
+
+ return Success;
}
-int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
+int
+__glXChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
{
- xGLXChangeDrawableAttributesReq *req = (xGLXChangeDrawableAttributesReq *)pc;
- xGLXChangeDrawableAttributesReq *be_req;
- ClientPtr client = cl->client;
- GLXDrawable drawId = req->drawable;
- GLXDrawable be_drawable = 0;
- DrawablePtr pDraw = NULL;
- Display *dpy;
- int screen, rc;
- DMXScreenInfo *dmxScreen;
-
- if (drawId != None) {
- rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
- if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
- be_drawable = 0;
- screen = pDraw->pScreen->myNum;
- } else {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- if (!pDraw) {
- __GLXpixmap *pGlxPixmap;
- dixLookupResourceByType((pointer*) &pGlxPixmap,
- drawId, __glXPixmapRes,
- NullClient, DixUnknownAccess);
- if (pGlxPixmap) {
- pDraw = pGlxPixmap->pDraw;
- screen = pGlxPixmap->pScreen->myNum;
+ xGLXChangeDrawableAttributesReq *req =
+ (xGLXChangeDrawableAttributesReq *) pc;
+ xGLXChangeDrawableAttributesReq *be_req;
+ ClientPtr client = cl->client;
+ GLXDrawable drawId = req->drawable;
+ GLXDrawable be_drawable = 0;
+ DrawablePtr pDraw = NULL;
+ Display *dpy;
+ int screen, rc;
+ DMXScreenInfo *dmxScreen;
+
+ if (drawId != None) {
+ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess);
+ if (rc == Success && pDraw->type == DRAWABLE_WINDOW) {
+ be_drawable = 0;
+ screen = pDraw->pScreen->myNum;
+ }
+ else {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ if (!pDraw) {
+ __GLXpixmap *pGlxPixmap;
+
+ dixLookupResourceByType((pointer *) &pGlxPixmap,
+ drawId, __glXPixmapRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxPixmap) {
+ pDraw = pGlxPixmap->pDraw;
+ screen = pGlxPixmap->pScreen->myNum;
be_drawable = pGlxPixmap->be_xids[screen];
- }
- }
-
- if (!pDraw) {
- __glXWindow *pGlxWindow;
- dixLookupResourceByType((pointer*) &pGlxWindow,
- drawId, __glXWindowRes,
- NullClient, DixUnknownAccess);
- if (pGlxWindow) {
- pDraw = pGlxWindow->pDraw;
- screen = pGlxWindow->pScreen->myNum;
- be_drawable = 0;
- }
- }
-
- if (!pDraw) {
- __glXPbuffer *pGlxPbuffer;
- dixLookupResourceByType((pointer*) &pGlxPbuffer,
- drawId, __glXPbufferRes,
- NullClient, DixUnknownAccess);
- if (pGlxPbuffer) {
- pDraw = (DrawablePtr)pGlxPbuffer;
- screen = pGlxPbuffer->pScreen->myNum;
- be_drawable = pGlxPbuffer->be_xids[screen];
- }
- }
- }
-
- if (!pDraw) {
- /*
- ** Drawable is not a Window , GLXWindow or a GLXPixmap.
- */
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- /* if the drawable is a window or GLXWindow -
- * we need to find the base id on the back-end server
- */
- if (!be_drawable) {
- WindowPtr pWin = (WindowPtr)pDraw;
+ }
+ }
+
+ if (!pDraw) {
+ __glXWindow *pGlxWindow;
+
+ dixLookupResourceByType((pointer *) &pGlxWindow,
+ drawId, __glXWindowRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxWindow) {
+ pDraw = pGlxWindow->pDraw;
+ screen = pGlxWindow->pScreen->myNum;
+ be_drawable = 0;
+ }
+ }
+
+ if (!pDraw) {
+ __glXPbuffer *pGlxPbuffer;
+
+ dixLookupResourceByType((pointer *) &pGlxPbuffer,
+ drawId, __glXPbufferRes,
+ NullClient, DixUnknownAccess);
+ if (pGlxPbuffer) {
+ pDraw = (DrawablePtr) pGlxPbuffer;
+ screen = pGlxPbuffer->pScreen->myNum;
+ be_drawable = pGlxPbuffer->be_xids[screen];
+ }
+ }
+ }
+
+ if (!pDraw) {
+ /*
+ ** Drawable is not a Window , GLXWindow or a GLXPixmap.
+ */
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ /* if the drawable is a window or GLXWindow -
+ * we need to find the base id on the back-end server
+ */
+ if (!be_drawable) {
+ WindowPtr pWin = (WindowPtr) pDraw;
#ifdef PANORAMIX
- if (!noPanoramiXExtension) {
- PanoramiXRes *pXinDraw;
- if (Success != dixLookupResourceByClass((pointer*) &pXinDraw,
- pDraw->id, XRC_DRAWABLE,
- client, DixReadAccess)) {
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
-
- dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
- DixReadAccess);
- }
+ if (!noPanoramiXExtension) {
+ PanoramiXRes *pXinDraw;
+
+ if (Success != dixLookupResourceByClass((pointer *) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess)) {
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+
+ dixLookupWindow(&pWin, pXinDraw->info[screen].id, client,
+ DixReadAccess);
+ }
#endif
- if (pWin) {
- be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- if (!be_drawable) {
- /* it might be that the window did not created yet on the */
- /* back-end server (lazy window creation option), force */
- /* creation of the window */
- dmxCreateAndRealizeWindow( pWin, TRUE );
- be_drawable = (unsigned int)(DMX_GET_WINDOW_PRIV(pWin))->window;
- }
- }
- else {
- client->errorValue = drawId;
- return __glXBadDrawable;
- }
- }
-
-
- /* send the request to the back-end server */
- dpy = GetBackEndDisplay(cl,screen);
- dmxScreen = &dmxScreens[screen];
-
- /* make sure drawable exists on back-end */
- dmxSync( dmxScreen, 1 );
-
- LockDisplay(dpy);
- GetReqExtra(GLXChangeDrawableAttributes,
- 2 * req->numAttribs * __GLX_SIZE_CARD32, be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLXChangeDrawableAttributes;
- be_req->drawable = be_drawable;
- be_req->numAttribs = req->numAttribs;
- be_req->length = req->length;
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- return Success;
+ if (pWin) {
+ be_drawable = (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
+ if (!be_drawable) {
+ /* it might be that the window did not created yet on the */
+ /* back-end server (lazy window creation option), force */
+ /* creation of the window */
+ dmxCreateAndRealizeWindow(pWin, TRUE);
+ be_drawable =
+ (unsigned int) (DMX_GET_WINDOW_PRIV(pWin))->window;
+ }
+ }
+ else {
+ client->errorValue = drawId;
+ return __glXBadDrawable;
+ }
+ }
+
+ /* send the request to the back-end server */
+ dpy = GetBackEndDisplay(cl, screen);
+ dmxScreen = &dmxScreens[screen];
+
+ /* make sure drawable exists on back-end */
+ dmxSync(dmxScreen, 1);
+
+ LockDisplay(dpy);
+ GetReqExtra(GLXChangeDrawableAttributes,
+ 2 * req->numAttribs * __GLX_SIZE_CARD32, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLXChangeDrawableAttributes;
+ be_req->drawable = be_drawable;
+ be_req->numAttribs = req->numAttribs;
+ be_req->length = req->length;
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ return Success;
}
-int __glXSendLargeCommand(__GLXclientState *cl, GLXContextTag contextTag)
+int
+__glXSendLargeCommand(__GLXclientState * cl, GLXContextTag contextTag)
{
- ClientPtr client = cl->client;
+ ClientPtr client = cl->client;
xGLXRenderLargeReq *req;
GLint maxSize, amount;
GLint totalRequests, requestNumber;
@@ -3626,56 +3766,57 @@ int __glXSendLargeCommand(__GLXclientState *cl, GLXContextTag contextTag)
int s;
int from_screen, to_screen;
- maxSize = cl->largeCmdMaxReqDataSize - (GLint)sizeof(xGLXRenderLargeReq);
+ maxSize = cl->largeCmdMaxReqDataSize - (GLint) sizeof(xGLXRenderLargeReq);
dataLen = cl->largeCmdBytesTotal;
totalRequests = (dataLen / maxSize);
- if (dataLen % maxSize) totalRequests++;
+ if (dataLen % maxSize)
+ totalRequests++;
glxc = __glXLookupContextByTag(cl, contextTag);
if (!glxc) {
- client->errorValue = contextTag;
- return __glXBadContext;
+ client->errorValue = contextTag;
+ return __glXBadContext;
}
from_screen = to_screen = glxc->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
/*
- ** Send enough requests until the whole array is sent.
- */
+ ** Send enough requests until the whole array is sent.
+ */
requestNumber = 1;
data = cl->largeCmdBuf;
while (dataLen > 0) {
- amount = dataLen;
- if (amount > maxSize) {
- amount = maxSize;
- }
-
- for (s=from_screen; s<=to_screen; s++) {
-
- Display *dpy = GetBackEndDisplay(cl,s);
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
-
- LockDisplay(dpy);
- GetReq(GLXRenderLarge,req);
- req->reqType = dmxScreen->glxMajorOpcode;
- req->glxCode = X_GLXRenderLarge;
- req->contextTag = GetCurrentBackEndTag(cl,contextTag,s);
- req->length += (amount + 3) >> 2;
- req->requestNumber = requestNumber++;
- req->requestTotal = totalRequests;
- req->dataBytes = amount;
- Data(dpy, ((const char*)data), amount);
- dataLen -= amount;
- data = ((GLbyte *) data) + amount;
- UnlockDisplay(dpy);
- SyncHandle();
- }
+ amount = dataLen;
+ if (amount > maxSize) {
+ amount = maxSize;
+ }
+
+ for (s = from_screen; s <= to_screen; s++) {
+
+ Display *dpy = GetBackEndDisplay(cl, s);
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+
+ LockDisplay(dpy);
+ GetReq(GLXRenderLarge, req);
+ req->reqType = dmxScreen->glxMajorOpcode;
+ req->glxCode = X_GLXRenderLarge;
+ req->contextTag = GetCurrentBackEndTag(cl, contextTag, s);
+ req->length += (amount + 3) >> 2;
+ req->requestNumber = requestNumber++;
+ req->requestTotal = totalRequests;
+ req->dataBytes = amount;
+ Data(dpy, ((const char *) data), amount);
+ dataLen -= amount;
+ data = ((GLbyte *) data) + amount;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
}
return Success;
diff --git a/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c b/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c
index f28a79df6..ec0e83d09 100644
--- a/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c
+++ b/xorg-server/hw/dmx/glxProxy/glxcmdsswap.c
@@ -39,9 +39,9 @@
#include "glxext.h"
#include "glxvendor.h"
-extern int glxIsExtensionSupported( char *ext );
+extern int glxIsExtensionSupported(char *ext);
-int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc);
+int __glXSwapGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc);
/************************************************************************/
@@ -52,9 +52,11 @@ int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc);
** it is called at the end of the unswapped routine.
*/
-int __glXSwapCreateContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapCreateContext(__GLXclientState * cl, GLbyte * pc)
{
xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -66,9 +68,11 @@ int __glXSwapCreateContext(__GLXclientState *cl, GLbyte *pc)
return __glXCreateContext(cl, pc);
}
-int __glXSwapCreateNewContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapCreateNewContext(__GLXclientState * cl, GLbyte * pc)
{
xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -80,9 +84,11 @@ int __glXSwapCreateNewContext(__GLXclientState *cl, GLbyte *pc)
return __glXCreateNewContext(cl, pc);
}
-int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc)
{
- xGLXCreateContextWithConfigSGIXReq *req = (xGLXCreateContextWithConfigSGIXReq *) pc;
+ xGLXCreateContextWithConfigSGIXReq *req =
+ (xGLXCreateContextWithConfigSGIXReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -94,10 +100,11 @@ int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
return __glXCreateContextWithConfigSGIX(cl, pc);
}
-int __glXSwapQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc)
{
xGLXQueryMaxSwapBarriersSGIXReq *req =
- (xGLXQueryMaxSwapBarriersSGIXReq *)pc;
+ (xGLXQueryMaxSwapBarriersSGIXReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -106,9 +113,11 @@ int __glXSwapQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc)
return __glXQueryMaxSwapBarriersSGIX(cl, pc);
}
-int __glXSwapBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapBindSwapBarrierSGIX(__GLXclientState * cl, GLbyte * pc)
{
- xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *)pc;
+ xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -118,9 +127,11 @@ int __glXSwapBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc)
return __glXBindSwapBarrierSGIX(cl, pc);
}
-int __glXSwapJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc)
{
- xGLXJoinSwapGroupSGIXReq *req = (xGLXJoinSwapGroupSGIXReq *)pc;
+ xGLXJoinSwapGroupSGIXReq *req = (xGLXJoinSwapGroupSGIXReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -130,9 +141,11 @@ int __glXSwapJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc)
return __glXJoinSwapGroupSGIX(cl, pc);
}
-int __glXSwapDestroyContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapDestroyContext(__GLXclientState * cl, GLbyte * pc)
{
xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -141,9 +154,11 @@ int __glXSwapDestroyContext(__GLXclientState *cl, GLbyte *pc)
return __glXDestroyContext(cl, pc);
}
-int __glXSwapMakeCurrent(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapMakeCurrent(__GLXclientState * cl, GLbyte * pc)
{
xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -154,9 +169,11 @@ int __glXSwapMakeCurrent(__GLXclientState *cl, GLbyte *pc)
return __glXMakeCurrent(cl, pc);
}
-int __glXSwapMakeContextCurrent(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapMakeContextCurrent(__GLXclientState * cl, GLbyte * pc)
{
xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -168,9 +185,11 @@ int __glXSwapMakeContextCurrent(__GLXclientState *cl, GLbyte *pc)
return __glXMakeContextCurrent(cl, pc);
}
-int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc)
{
xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -182,9 +201,11 @@ int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc)
return __glXMakeCurrentReadSGI(cl, pc);
}
-int __glXSwapIsDirect(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapIsDirect(__GLXclientState * cl, GLbyte * pc)
{
xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -193,9 +214,11 @@ int __glXSwapIsDirect(__GLXclientState *cl, GLbyte *pc)
return __glXIsDirect(cl, pc);
}
-int __glXSwapQueryVersion(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapQueryVersion(__GLXclientState * cl, GLbyte * pc)
{
xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -205,9 +228,11 @@ int __glXSwapQueryVersion(__GLXclientState *cl, GLbyte *pc)
return __glXQueryVersion(cl, pc);
}
-int __glXSwapWaitGL(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapWaitGL(__GLXclientState * cl, GLbyte * pc)
{
xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -216,9 +241,11 @@ int __glXSwapWaitGL(__GLXclientState *cl, GLbyte *pc)
return __glXWaitGL(cl, pc);
}
-int __glXSwapWaitX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapWaitX(__GLXclientState * cl, GLbyte * pc)
{
xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -227,9 +254,11 @@ int __glXSwapWaitX(__GLXclientState *cl, GLbyte *pc)
return __glXWaitX(cl, pc);
}
-int __glXSwapCopyContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapCopyContext(__GLXclientState * cl, GLbyte * pc)
{
xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -240,9 +269,10 @@ int __glXSwapCopyContext(__GLXclientState *cl, GLbyte *pc)
return __glXCopyContext(cl, pc);
}
-int __glXSwapGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapGetVisualConfigs(__GLXclientState * cl, GLbyte * pc)
{
- ClientPtr client = cl->client;
+ ClientPtr client = cl->client;
xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
xGLXGetVisualConfigsReply reply;
__GLXscreenInfo *pGlxScreen;
@@ -250,62 +280,63 @@ int __glXSwapGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
CARD32 buf[__GLX_TOTAL_CONFIG];
unsigned int screen;
int i, p;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
__GLX_SWAP_INT(&req->screen);
screen = req->screen;
if (screen >= screenInfo.numScreens) {
- /* The client library must send a valid screen number. */
- client->errorValue = screen;
- return BadValue;
+ /* The client library must send a valid screen number. */
+ client->errorValue = screen;
+ return BadValue;
}
pGlxScreen = &__glXActiveScreens[screen];
reply.numVisuals = pGlxScreen->numGLXVisuals;
reply.numProps = __GLX_TOTAL_CONFIG;
reply.length = (pGlxScreen->numGLXVisuals * __GLX_SIZE_CARD32 *
- __GLX_TOTAL_CONFIG) >> 2;
+ __GLX_TOTAL_CONFIG) >> 2;
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
-
+
__GLX_SWAP_SHORT(&reply.sequenceNumber);
__GLX_SWAP_INT(&reply.length);
__GLX_SWAP_INT(&reply.numVisuals);
__GLX_SWAP_INT(&reply.numProps);
- WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *)&reply);
-
- for (i=0; i < pGlxScreen->numVisuals; i++) {
- pGlxVisual = &pGlxScreen->pGlxVisual[i];
- if (!pGlxScreen->isGLXvis[i] || pGlxVisual->vid == 0) {
- /* not a usable visual */
- continue;
- }
- p = 0;
- buf[p++] = pGlxVisual->vid;
- buf[p++] = pGlxVisual->class;
- buf[p++] = pGlxVisual->rgba;
-
- buf[p++] = pGlxVisual->redSize;
- buf[p++] = pGlxVisual->greenSize;
- buf[p++] = pGlxVisual->blueSize;
- buf[p++] = pGlxVisual->alphaSize;
- buf[p++] = pGlxVisual->accumRedSize;
- buf[p++] = pGlxVisual->accumGreenSize;
- buf[p++] = pGlxVisual->accumBlueSize;
- buf[p++] = pGlxVisual->accumAlphaSize;
-
- buf[p++] = pGlxVisual->doubleBuffer;
- buf[p++] = pGlxVisual->stereo;
-
- buf[p++] = pGlxVisual->bufferSize;
- buf[p++] = pGlxVisual->depthSize;
- buf[p++] = pGlxVisual->stencilSize;
- buf[p++] = pGlxVisual->auxBuffers;
- buf[p++] = pGlxVisual->level;
+ WriteToClient(client, sz_xGLXGetVisualConfigsReply, (char *) &reply);
+
+ for (i = 0; i < pGlxScreen->numVisuals; i++) {
+ pGlxVisual = &pGlxScreen->pGlxVisual[i];
+ if (!pGlxScreen->isGLXvis[i] || pGlxVisual->vid == 0) {
+ /* not a usable visual */
+ continue;
+ }
+ p = 0;
+ buf[p++] = pGlxVisual->vid;
+ buf[p++] = pGlxVisual->class;
+ buf[p++] = pGlxVisual->rgba;
+
+ buf[p++] = pGlxVisual->redSize;
+ buf[p++] = pGlxVisual->greenSize;
+ buf[p++] = pGlxVisual->blueSize;
+ buf[p++] = pGlxVisual->alphaSize;
+ buf[p++] = pGlxVisual->accumRedSize;
+ buf[p++] = pGlxVisual->accumGreenSize;
+ buf[p++] = pGlxVisual->accumBlueSize;
+ buf[p++] = pGlxVisual->accumAlphaSize;
+
+ buf[p++] = pGlxVisual->doubleBuffer;
+ buf[p++] = pGlxVisual->stereo;
+
+ buf[p++] = pGlxVisual->bufferSize;
+ buf[p++] = pGlxVisual->depthSize;
+ buf[p++] = pGlxVisual->stencilSize;
+ buf[p++] = pGlxVisual->auxBuffers;
+ buf[p++] = pGlxVisual->level;
/*
- ** Add token/value pairs for extensions.
- */
+ ** Add token/value pairs for extensions.
+ */
buf[p++] = GLX_VISUAL_CAVEAT_EXT;
buf[p++] = pGlxVisual->visualRating;
buf[p++] = GLX_TRANSPARENT_TYPE_EXT;
@@ -321,16 +352,18 @@ int __glXSwapGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
buf[p++] = GLX_TRANSPARENT_INDEX_VALUE_EXT;
buf[p++] = pGlxVisual->transparentIndex;
- __GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG);
- WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG,
- (char *)buf);
+ __GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_CONFIG);
+ WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_CONFIG,
+ (char *) buf);
}
return Success;
}
-int __glXSwapCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapCreateGLXPixmap(__GLXclientState * cl, GLbyte * pc)
{
xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -342,9 +375,11 @@ int __glXSwapCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
return __glXCreateGLXPixmap(cl, pc);
}
-int __glXSwapCreatePixmap(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapCreatePixmap(__GLXclientState * cl, GLbyte * pc)
{
xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -357,9 +392,11 @@ int __glXSwapCreatePixmap(__GLXclientState *cl, GLbyte *pc)
return __glXCreatePixmap(cl, pc);
}
-int __glXSwapDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapDestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc)
{
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -368,9 +405,11 @@ int __glXSwapDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
return __glXDestroyGLXPixmap(cl, pc);
}
-int __glXSwapSwapBuffers(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapSwapBuffers(__GLXclientState * cl, GLbyte * pc)
{
xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -380,9 +419,11 @@ int __glXSwapSwapBuffers(__GLXclientState *cl, GLbyte *pc)
return __glXSwapBuffers(cl, pc);
}
-int __glXSwapUseXFont(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapUseXFont(__GLXclientState * cl, GLbyte * pc)
{
xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -395,10 +436,11 @@ int __glXSwapUseXFont(__GLXclientState *cl, GLbyte *pc)
return __glXUseXFont(cl, pc);
}
-
-int __glXSwapQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
{
xGLXQueryExtensionsStringReq *req = NULL;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -407,9 +449,11 @@ int __glXSwapQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
return __glXQueryExtensionsString(cl, pc);
}
-int __glXSwapQueryServerString(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapQueryServerString(__GLXclientState * cl, GLbyte * pc)
{
- xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *)pc;
+ xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -419,9 +463,11 @@ int __glXSwapQueryServerString(__GLXclientState *cl, GLbyte *pc)
return __glXQueryServerString(cl, pc);
}
-int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapClientInfo(__GLXclientState * cl, GLbyte * pc)
{
- xGLXClientInfoReq *req = (xGLXClientInfoReq *)pc;
+ xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -432,15 +478,17 @@ int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc)
return __glXClientInfo(cl, pc);
}
-int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc)
+int
+__glXSwapQueryContextInfoEXT(__GLXclientState * cl, char *pc)
{
xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->context);
- return __glXQueryContextInfoEXT(cl, (GLbyte *)pc);
+ return __glXQueryContextInfoEXT(cl, (GLbyte *) pc);
}
/************************************************************************/
@@ -449,7 +497,8 @@ int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc)
** Swap replies.
*/
-void __glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReadSGIReply *reply)
+void
+__glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReadSGIReply * reply)
{
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber);
@@ -459,103 +508,120 @@ void __glXSwapMakeCurrentReply(ClientPtr client, xGLXMakeCurrentReadSGIReply *r
__GLX_SWAP_INT(&reply->writeType);
__GLX_SWAP_INT(&reply->readVid);
__GLX_SWAP_INT(&reply->readType);
- WriteToClient(client, sz_xGLXMakeCurrentReadSGIReply, (char *)reply);
+ WriteToClient(client, sz_xGLXMakeCurrentReadSGIReply, (char *) reply);
}
-void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply *reply)
+void
+__glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply)
{
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length);
- WriteToClient(client, sz_xGLXIsDirectReply, (char *)reply);
+ WriteToClient(client, sz_xGLXIsDirectReply, (char *) reply);
}
-void __glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply *reply)
+void
+__glXSwapQueryVersionReply(ClientPtr client, xGLXQueryVersionReply * reply)
{
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->majorVersion);
__GLX_SWAP_INT(&reply->minorVersion);
- WriteToClient(client, sz_xGLXQueryVersionReply, (char *)reply);
+ WriteToClient(client, sz_xGLXQueryVersionReply, (char *) reply);
}
-void glxSwapQueryExtensionsStringReply(ClientPtr client,
- xGLXQueryExtensionsStringReply *reply, char *buf)
+void
+glxSwapQueryExtensionsStringReply(ClientPtr client,
+ xGLXQueryExtensionsStringReply * reply,
+ char *buf)
{
int length = reply->length;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->n);
- WriteToClient(client, sz_xGLXQueryExtensionsStringReply, (char *)reply);
- __GLX_SWAP_INT_ARRAY((int *)buf, length);
+ WriteToClient(client, sz_xGLXQueryExtensionsStringReply, (char *) reply);
+ __GLX_SWAP_INT_ARRAY((int *) buf, length);
WriteToClient(client, length << 2, buf);
}
-void glxSwapQueryServerStringReply(ClientPtr client,
- xGLXQueryServerStringReply *reply, char *buf)
+void
+glxSwapQueryServerStringReply(ClientPtr client,
+ xGLXQueryServerStringReply * reply, char *buf)
{
int length = reply->length;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->n);
- WriteToClient(client, sz_xGLXQueryServerStringReply, (char *)reply);
+ WriteToClient(client, sz_xGLXQueryServerStringReply, (char *) reply);
/** no swap is needed for an array of chars **/
/* __GLX_SWAP_INT_ARRAY((int *)buf, length); */
WriteToClient(client, length << 2, buf);
}
-void __glXSwapQueryContextInfoEXTReply(ClientPtr client, xGLXQueryContextInfoEXTReply *reply, int *buf)
+void
+__glXSwapQueryContextInfoEXTReply(ClientPtr client,
+ xGLXQueryContextInfoEXTReply * reply,
+ int *buf)
{
int length = reply->length;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->n);
- WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)reply);
- __GLX_SWAP_INT_ARRAY((int *)buf, length);
- WriteToClient(client, length << 2, (char *)buf);
+ WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *) reply);
+ __GLX_SWAP_INT_ARRAY((int *) buf, length);
+ WriteToClient(client, length << 2, (char *) buf);
}
-
-void __glXSwapQueryContextReply(ClientPtr client,
- xGLXQueryContextReply *reply, int *buf)
+void
+__glXSwapQueryContextReply(ClientPtr client,
+ xGLXQueryContextReply * reply, int *buf)
{
int length = reply->length;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->n);
- WriteToClient(client, sz_xGLXQueryContextReply, (char *)reply);
- __GLX_SWAP_INT_ARRAY((int *)buf, length);
- WriteToClient(client, length << 2, (char *)buf);
+ WriteToClient(client, sz_xGLXQueryContextReply, (char *) reply);
+ __GLX_SWAP_INT_ARRAY((int *) buf, length);
+ WriteToClient(client, length << 2, (char *) buf);
}
-void __glXSwapGetDrawableAttributesReply(ClientPtr client,
- xGLXGetDrawableAttributesReply *reply, int *buf)
+void
+__glXSwapGetDrawableAttributesReply(ClientPtr client,
+ xGLXGetDrawableAttributesReply * reply,
+ int *buf)
{
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->numAttribs);
- __GLX_SWAP_INT_ARRAY( buf, reply->length );
- WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *)reply);
- WriteToClient(client, reply->length << 2, (char *)buf);
+ __GLX_SWAP_INT_ARRAY(buf, reply->length);
+ WriteToClient(client, sz_xGLXGetDrawableAttributesReply, (char *) reply);
+ WriteToClient(client, reply->length << 2, (char *) buf);
}
-void __glXSwapQueryMaxSwapBarriersSGIXReply(ClientPtr client, xGLXQueryMaxSwapBarriersSGIXReply *reply)
+void
+__glXSwapQueryMaxSwapBarriersSGIXReply(ClientPtr client,
+ xGLXQueryMaxSwapBarriersSGIXReply *
+ reply)
{
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&reply->sequenceNumber);
__GLX_SWAP_INT(&reply->length);
__GLX_SWAP_INT(&reply->max);
- WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, (char *)reply);
+ WriteToClient(client, sz_xGLXQueryMaxSwapBarriersSGIXReply, (char *) reply);
}
/************************************************************************/
@@ -565,21 +631,23 @@ void __glXSwapQueryMaxSwapBarriersSGIXReply(ClientPtr client, xGLXQueryMaxSwapBa
** client library to send batches of GL rendering commands.
*/
-int __glXSwapRender(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapRender(__GLXclientState * cl, GLbyte * pc)
{
xGLXRenderReq *req;
int left;
__GLXrenderHeader *hdr;
ClientPtr client = cl->client;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
/*
- ** NOTE: much of this code also appears in the nonswapping version of this
- ** routine, __glXRender(). Any changes made here should also be
- ** duplicated there.
- */
-
+ ** NOTE: much of this code also appears in the nonswapping version of this
+ ** routine, __glXRender(). Any changes made here should also be
+ ** duplicated there.
+ */
+
req = (xGLXRenderReq *) pc;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->contextTag);
@@ -587,74 +655,81 @@ int __glXSwapRender(__GLXclientState *cl, GLbyte *pc)
pc += sz_xGLXRenderReq;
left = (req->length << 2) - sz_xGLXRenderReq;
while (left > 0) {
- void (* proc)(GLbyte *);
- CARD16 opcode;
-
- /*
- ** Verify that the header length and the overall length agree.
- ** Also, each command must be word aligned.
- */
- hdr = (__GLXrenderHeader *) pc;
- __GLX_SWAP_SHORT(&hdr->length);
- __GLX_SWAP_SHORT(&hdr->opcode);
-
- /*
+ void (*proc) (GLbyte *);
+ CARD16 opcode;
+
+ /*
+ ** Verify that the header length and the overall length agree.
+ ** Also, each command must be word aligned.
+ */
+ hdr = (__GLXrenderHeader *) pc;
+ __GLX_SWAP_SHORT(&hdr->length);
+ __GLX_SWAP_SHORT(&hdr->opcode);
+
+ /*
* call the command procedure to swap any arguments
- */
- opcode = hdr->opcode;
- if ( (opcode >= __GLX_MIN_RENDER_OPCODE) &&
- (opcode <= __GLX_MAX_RENDER_OPCODE) ) {
- proc = __glXSwapRenderTable[opcode];
+ */
+ opcode = hdr->opcode;
+ if ((opcode >= __GLX_MIN_RENDER_OPCODE) &&
+ (opcode <= __GLX_MAX_RENDER_OPCODE)) {
+ proc = __glXSwapRenderTable[opcode];
#if __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT
- } else if ( (opcode >= __GLX_MIN_RENDER_OPCODE_EXT) &&
- (opcode <= __GLX_MAX_RENDER_OPCODE_EXT) ) {
- int index = opcode - __GLX_MIN_RENDER_OPCODE_EXT;
- __GLXRenderSwapInfo *info = &__glXSwapRenderTable_EXT[index];
- if (info->swapfunc) {
- proc = info->swapfunc;
- }
- else {
- proc = NULL;
- if (info->elem_size == 4 && info->nelems > 0) {
- __GLX_SWAP_INT_ARRAY( (int *)(pc + __GLX_RENDER_HDR_SIZE),
- info->nelems );
- }
- else if (info->elem_size == 2 && info->nelems > 0) {
- __GLX_SWAP_SHORT_ARRAY( (short *)(pc + __GLX_RENDER_HDR_SIZE),
- info->nelems );
- }
- else if (info->elem_size == 8 && info->nelems > 0) {
- __GLX_SWAP_DOUBLE_ARRAY( (double *)(pc + __GLX_RENDER_HDR_SIZE),
- info->nelems );
- }
- }
-#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
- } else {
- client->errorValue = 0;
- return __glXBadRenderRequest;
- }
-
- if (proc != NULL)
- (*proc)(pc + __GLX_RENDER_HDR_SIZE);
-
- /*
- * proceed to the next command
- */
- pc += hdr->length;
- left -= hdr->length;
+ }
+ else if ((opcode >= __GLX_MIN_RENDER_OPCODE_EXT) &&
+ (opcode <= __GLX_MAX_RENDER_OPCODE_EXT)) {
+ int index = opcode - __GLX_MIN_RENDER_OPCODE_EXT;
+ __GLXRenderSwapInfo *info = &__glXSwapRenderTable_EXT[index];
+
+ if (info->swapfunc) {
+ proc = info->swapfunc;
+ }
+ else {
+ proc = NULL;
+ if (info->elem_size == 4 && info->nelems > 0) {
+ __GLX_SWAP_INT_ARRAY((int *) (pc + __GLX_RENDER_HDR_SIZE),
+ info->nelems);
+ }
+ else if (info->elem_size == 2 && info->nelems > 0) {
+ __GLX_SWAP_SHORT_ARRAY((short *) (pc +
+ __GLX_RENDER_HDR_SIZE),
+ info->nelems);
+ }
+ else if (info->elem_size == 8 && info->nelems > 0) {
+ __GLX_SWAP_DOUBLE_ARRAY((double *) (pc +
+ __GLX_RENDER_HDR_SIZE),
+ info->nelems);
+ }
+ }
+#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
+ }
+ else {
+ client->errorValue = 0;
+ return __glXBadRenderRequest;
+ }
+
+ if (proc != NULL)
+ (*proc) (pc + __GLX_RENDER_HDR_SIZE);
+
+ /*
+ * proceed to the next command
+ */
+ pc += hdr->length;
+ left -= hdr->length;
}
- return __glXRender( cl, (GLbyte *)req );
+ return __glXRender(cl, (GLbyte *) req);
}
/*
** Execute a large rendering request (one that spans multiple X requests).
*/
-int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapRenderLarge(__GLXclientState * cl, GLbyte * pc)
{
- ClientPtr client = cl->client;
+ ClientPtr client = cl->client;
xGLXRenderLargeReq *req;
__GLXrenderLargeHeader *hdr;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
@@ -666,134 +741,139 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_SHORT(&req->requestTotal);
pc += sz_xGLXRenderLargeReq;
-
+
if (req->requestNumber == 1) {
- void (* proc)(GLbyte *) = NULL;
- __GLXRenderSwapInfo *info = NULL;
- CARD16 opcode;
+ void (*proc) (GLbyte *) = NULL;
+ __GLXRenderSwapInfo *info = NULL;
+ CARD16 opcode;
- hdr = (__GLXrenderLargeHeader *) pc;
- __GLX_SWAP_INT(&hdr->length);
- __GLX_SWAP_INT(&hdr->opcode);
+ hdr = (__GLXrenderLargeHeader *) pc;
+ __GLX_SWAP_INT(&hdr->length);
+ __GLX_SWAP_INT(&hdr->opcode);
- /*
+ /*
* call the command procedure to swap any arguments
- * Note that we are assuming that all arguments that needs to be
- * swaped are on the first req only !
- */
- opcode = hdr->opcode;
- if ( (opcode >= __GLX_MIN_RENDER_OPCODE) &&
- (opcode <= __GLX_MAX_RENDER_OPCODE) ) {
- proc = __glXSwapRenderTable[opcode];
+ * Note that we are assuming that all arguments that needs to be
+ * swaped are on the first req only !
+ */
+ opcode = hdr->opcode;
+ if ((opcode >= __GLX_MIN_RENDER_OPCODE) &&
+ (opcode <= __GLX_MAX_RENDER_OPCODE)) {
+ proc = __glXSwapRenderTable[opcode];
#if __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT
- } else if ( (opcode >= __GLX_MIN_RENDER_OPCODE_EXT) &&
- (opcode <= __GLX_MAX_RENDER_OPCODE_EXT) ) {
- int index = opcode - __GLX_MIN_RENDER_OPCODE_EXT;
- info = &__glXSwapRenderTable_EXT[index];
- if (info->swapfunc) {
- proc = info->swapfunc;
- }
-#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
- } else {
- client->errorValue = 0;
- cl->largeCmdRequestsTotal = 0;
- return __glXBadLargeRequest;
- }
-
- /*
- ** Make enough space in the buffer, then copy the entire request.
- */
- if (cl->largeCmdBufSize < hdr->length) {
- if (!cl->largeCmdBuf) {
- cl->largeCmdBuf = (GLbyte *) malloc(hdr->length);
- } else {
- cl->largeCmdBuf = (GLbyte *) realloc(cl->largeCmdBuf, hdr->length);
- }
- if (!cl->largeCmdBuf) {
- cl->largeCmdRequestsTotal = 0;
- return BadAlloc;
- }
- cl->largeCmdBufSize = hdr->length;
- }
- memcpy(cl->largeCmdBuf, pc, req->dataBytes);
-
- cl->largeCmdBytesSoFar = req->dataBytes;
- cl->largeCmdBytesTotal = hdr->length;
- cl->largeCmdRequestsSoFar = 1;
- cl->largeCmdRequestsTotal = req->requestTotal;
- cl->largeCmdRequestsSwapProc = proc;
- cl->largeCmdMaxReqDataSize = req->dataBytes;
- cl->largeCmdRequestsSwap_info = info;
-
- return Success;
-
+ }
+ else if ((opcode >= __GLX_MIN_RENDER_OPCODE_EXT) &&
+ (opcode <= __GLX_MAX_RENDER_OPCODE_EXT)) {
+ int index = opcode - __GLX_MIN_RENDER_OPCODE_EXT;
+
+ info = &__glXSwapRenderTable_EXT[index];
+ if (info->swapfunc) {
+ proc = info->swapfunc;
+ }
+#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
+ }
+ else {
+ client->errorValue = 0;
+ cl->largeCmdRequestsTotal = 0;
+ return __glXBadLargeRequest;
+ }
+
+ /*
+ ** Make enough space in the buffer, then copy the entire request.
+ */
+ if (cl->largeCmdBufSize < hdr->length) {
+ if (!cl->largeCmdBuf) {
+ cl->largeCmdBuf = (GLbyte *) malloc(hdr->length);
+ }
+ else {
+ cl->largeCmdBuf =
+ (GLbyte *) realloc(cl->largeCmdBuf, hdr->length);
+ }
+ if (!cl->largeCmdBuf) {
+ cl->largeCmdRequestsTotal = 0;
+ return BadAlloc;
+ }
+ cl->largeCmdBufSize = hdr->length;
+ }
+ memcpy(cl->largeCmdBuf, pc, req->dataBytes);
+
+ cl->largeCmdBytesSoFar = req->dataBytes;
+ cl->largeCmdBytesTotal = hdr->length;
+ cl->largeCmdRequestsSoFar = 1;
+ cl->largeCmdRequestsTotal = req->requestTotal;
+ cl->largeCmdRequestsSwapProc = proc;
+ cl->largeCmdMaxReqDataSize = req->dataBytes;
+ cl->largeCmdRequestsSwap_info = info;
+
+ return Success;
}
else if (req->requestNumber < cl->largeCmdRequestsTotal) {
- /*
- * This is not the first nor last request - just copy the data
- */
- if ( cl->largeCmdBytesSoFar + req->dataBytes > cl->largeCmdBytesTotal) {
- cl->largeCmdRequestsTotal = 0;
- return __glXBadLargeRequest;
- }
+ /*
+ * This is not the first nor last request - just copy the data
+ */
+ if (cl->largeCmdBytesSoFar + req->dataBytes > cl->largeCmdBytesTotal) {
+ cl->largeCmdRequestsTotal = 0;
+ return __glXBadLargeRequest;
+ }
- memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
- pc, req->dataBytes);
+ memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, req->dataBytes);
- cl->largeCmdBytesSoFar += req->dataBytes;
+ cl->largeCmdBytesSoFar += req->dataBytes;
- if (req->dataBytes > cl->largeCmdMaxReqDataSize)
- cl->largeCmdMaxReqDataSize = req->dataBytes;
+ if (req->dataBytes > cl->largeCmdMaxReqDataSize)
+ cl->largeCmdMaxReqDataSize = req->dataBytes;
- return Success;
+ return Success;
}
else if (req->requestNumber == cl->largeCmdRequestsTotal) {
- /*
- * this is the last request
- * copy the remainder bytes, call the procedure to swap any
- * needed data, and then call to transfer the command to all
- * back-end servers
- */
- if ( cl->largeCmdBytesSoFar + req->dataBytes > cl->largeCmdBytesTotal) {
- cl->largeCmdRequestsTotal = 0;
- return __glXBadLargeRequest;
- }
-
- memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar,
- pc, req->dataBytes);
-
- cl->largeCmdBytesSoFar += req->dataBytes;
-
- if (req->dataBytes > cl->largeCmdMaxReqDataSize)
- cl->largeCmdMaxReqDataSize = req->dataBytes;
-
- if (cl->largeCmdRequestsSwapProc != NULL) {
- (*cl->largeCmdRequestsSwapProc)(cl->largeCmdBuf + __GLX_RENDER_LARGE_HDR_SIZE);
- }
- else if (cl->largeCmdRequestsSwap_info &&
- cl->largeCmdRequestsSwap_info->nelems > 0) {
- if (cl->largeCmdRequestsSwap_info->elem_size == 4) {
- __GLX_SWAP_INT_ARRAY( (int *)(pc + __GLX_RENDER_LARGE_HDR_SIZE),
- cl->largeCmdRequestsSwap_info->nelems );
- }
- else if (cl->largeCmdRequestsSwap_info->elem_size == 2) {
- __GLX_SWAP_SHORT_ARRAY( (short *)(pc + __GLX_RENDER_LARGE_HDR_SIZE),
- cl->largeCmdRequestsSwap_info->nelems );
- }
- else if (cl->largeCmdRequestsSwap_info->elem_size == 8) {
- __GLX_SWAP_DOUBLE_ARRAY( (double *)(pc + __GLX_RENDER_LARGE_HDR_SIZE),
- cl->largeCmdRequestsSwap_info->nelems );
- }
- }
-
- cl->largeCmdRequestsTotal = 0;
- return( __glXSendLargeCommand(cl, req->contextTag) );
+ /*
+ * this is the last request
+ * copy the remainder bytes, call the procedure to swap any
+ * needed data, and then call to transfer the command to all
+ * back-end servers
+ */
+ if (cl->largeCmdBytesSoFar + req->dataBytes > cl->largeCmdBytesTotal) {
+ cl->largeCmdRequestsTotal = 0;
+ return __glXBadLargeRequest;
+ }
+
+ memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, req->dataBytes);
+
+ cl->largeCmdBytesSoFar += req->dataBytes;
+
+ if (req->dataBytes > cl->largeCmdMaxReqDataSize)
+ cl->largeCmdMaxReqDataSize = req->dataBytes;
+
+ if (cl->largeCmdRequestsSwapProc != NULL) {
+ (*cl->largeCmdRequestsSwapProc) (cl->largeCmdBuf +
+ __GLX_RENDER_LARGE_HDR_SIZE);
+ }
+ else if (cl->largeCmdRequestsSwap_info &&
+ cl->largeCmdRequestsSwap_info->nelems > 0) {
+ if (cl->largeCmdRequestsSwap_info->elem_size == 4) {
+ __GLX_SWAP_INT_ARRAY((int *) (pc + __GLX_RENDER_LARGE_HDR_SIZE),
+ cl->largeCmdRequestsSwap_info->nelems);
+ }
+ else if (cl->largeCmdRequestsSwap_info->elem_size == 2) {
+ __GLX_SWAP_SHORT_ARRAY((short *) (pc +
+ __GLX_RENDER_LARGE_HDR_SIZE),
+ cl->largeCmdRequestsSwap_info->nelems);
+ }
+ else if (cl->largeCmdRequestsSwap_info->elem_size == 8) {
+ __GLX_SWAP_DOUBLE_ARRAY((double *) (pc +
+ __GLX_RENDER_LARGE_HDR_SIZE),
+ cl->largeCmdRequestsSwap_info->nelems);
+ }
+ }
+
+ cl->largeCmdRequestsTotal = 0;
+ return (__glXSendLargeCommand(cl, req->contextTag));
}
else {
- cl->largeCmdRequestsTotal = 0;
- return __glXBadLargeRequest;
+ cl->largeCmdRequestsTotal = 0;
+ return __glXBadLargeRequest;
}
}
@@ -805,7 +885,8 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
** allocating these entry points in the dispatch table.
*/
-int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapVendorPrivate(__GLXclientState * cl, GLbyte * pc)
{
xGLXVendorPrivateReq *req;
CARD32 vendorCode;
@@ -816,58 +897,58 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc)
vendorCode = req->vendorCode;
__GLX_SWAP_INT(&vendorCode);
-
- switch( vendorCode ) {
-
- case X_GLvop_DeleteTexturesEXT:
- return __glXVForwardSingleReqSwap( cl, pc );
- break;
-
- case X_GLXvop_SwapIntervalSGI:
- if (glxIsExtensionSupported("SGI_swap_control")) {
- return __glXVForwardSingleReqSwap( cl, pc );
- }
- else {
- return Success;
- }
- break;
-
-#if 0 /* glx 1.3 */
- case X_GLXvop_CreateGLXVideoSourceSGIX:
- break;
- case X_GLXvop_DestroyGLXVideoSourceSGIX:
- break;
- case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
- break;
- case X_GLXvop_DestroyGLXPbufferSGIX:
- break;
- case X_GLXvop_ChangeDrawableAttributesSGIX:
- break;
+ switch (vendorCode) {
+
+ case X_GLvop_DeleteTexturesEXT:
+ return __glXVForwardSingleReqSwap(cl, pc);
+ break;
+
+ case X_GLXvop_SwapIntervalSGI:
+ if (glxIsExtensionSupported("SGI_swap_control")) {
+ return __glXVForwardSingleReqSwap(cl, pc);
+ }
+ else {
+ return Success;
+ }
+ break;
+
+#if 0 /* glx 1.3 */
+ case X_GLXvop_CreateGLXVideoSourceSGIX:
+ break;
+ case X_GLXvop_DestroyGLXVideoSourceSGIX:
+ break;
+ case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
+ break;
+ case X_GLXvop_DestroyGLXPbufferSGIX:
+ break;
+ case X_GLXvop_ChangeDrawableAttributesSGIX:
+ break;
#endif
- case X_GLXvop_JoinSwapGroupSGIX:
- return __glXSwapJoinSwapGroupSGIX( cl, pc );
- break;
+ case X_GLXvop_JoinSwapGroupSGIX:
+ return __glXSwapJoinSwapGroupSGIX(cl, pc);
+ break;
- case X_GLXvop_BindSwapBarrierSGIX:
- return __glXSwapBindSwapBarrierSGIX( cl, pc );
- break;
+ case X_GLXvop_BindSwapBarrierSGIX:
+ return __glXSwapBindSwapBarrierSGIX(cl, pc);
+ break;
- case X_GLXvop_CreateContextWithConfigSGIX:
- return __glXSwapCreateContextWithConfigSGIX( cl, pc );
- break;
+ case X_GLXvop_CreateContextWithConfigSGIX:
+ return __glXSwapCreateContextWithConfigSGIX(cl, pc);
+ break;
- default:
- /*
- ** unsupported private request
- */
- cl->client->errorValue = req->vendorCode;
- return __glXUnsupportedPrivateRequest;
+ default:
+ /*
+ ** unsupported private request
+ */
+ cl->client->errorValue = req->vendorCode;
+ return __glXUnsupportedPrivateRequest;
}
}
-int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapVendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc)
{
xGLXVendorPrivateWithReplyReq *req;
CARD32 vendorCode;
@@ -878,76 +959,78 @@ int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
vendorCode = req->vendorCode;
__GLX_SWAP_INT(&vendorCode);
- switch( vendorCode ) {
-
- case X_GLvop_GetConvolutionFilterEXT:
- case X_GLvop_GetSeparableFilterEXT:
- case X_GLvop_GetHistogramEXT:
- case X_GLvop_GetMinmaxEXT:
- return( __glXNoSuchSingleOpcode(cl, pc) );
- break;
-
- case X_GLvop_GetConvolutionParameterfvEXT:
- case X_GLvop_GetConvolutionParameterivEXT:
- case X_GLvop_GetHistogramParameterivEXT:
- case X_GLvop_GetMinmaxParameterfvEXT:
- case X_GLvop_GetMinmaxParameterivEXT:
- case X_GLvop_GenTexturesEXT:
- return( __glXVForwardAllWithReplySwapiv(cl, pc) );
- break;
-
- case X_GLvop_AreTexturesResidentEXT:
- case X_GLvop_IsTextureEXT:
- return( __glXVForwardPipe0WithReplySwap(cl, pc) );
- break;
-
-#if 0 /* glx1.3 */
- case X_GLvop_GetDetailTexFuncSGIS:
- case X_GLvop_GetSharpenTexFuncSGIS:
- case X_GLvop_GetColorTableSGI:
- case X_GLvop_GetColorTableParameterfvSGI:
- case X_GLvop_GetColorTableParameterivSGI:
- case X_GLvop_GetTexFilterFuncSGIS:
- case X_GLvop_GetInstrumentsSGIX:
- case X_GLvop_InstrumentsBufferSGIX:
- case X_GLvop_PollInstrumentsSGIX:
- case X_GLvop_FlushRasterSGIX:
- case X_GLXvop_CreateGLXPbufferSGIX:
- case X_GLXvop_GetDrawableAttributesSGIX:
- case X_GLXvop_QueryHyperpipeNetworkSGIX:
- case X_GLXvop_QueryHyperpipeConfigSGIX:
- case X_GLXvop_HyperpipeConfigSGIX:
- case X_GLXvop_DestroyHyperpipeConfigSGIX:
+ switch (vendorCode) {
+
+ case X_GLvop_GetConvolutionFilterEXT:
+ case X_GLvop_GetSeparableFilterEXT:
+ case X_GLvop_GetHistogramEXT:
+ case X_GLvop_GetMinmaxEXT:
+ return (__glXNoSuchSingleOpcode(cl, pc));
+ break;
+
+ case X_GLvop_GetConvolutionParameterfvEXT:
+ case X_GLvop_GetConvolutionParameterivEXT:
+ case X_GLvop_GetHistogramParameterivEXT:
+ case X_GLvop_GetMinmaxParameterfvEXT:
+ case X_GLvop_GetMinmaxParameterivEXT:
+ case X_GLvop_GenTexturesEXT:
+ return (__glXVForwardAllWithReplySwapiv(cl, pc));
+ break;
+
+ case X_GLvop_AreTexturesResidentEXT:
+ case X_GLvop_IsTextureEXT:
+ return (__glXVForwardPipe0WithReplySwap(cl, pc));
+ break;
+
+#if 0 /* glx1.3 */
+ case X_GLvop_GetDetailTexFuncSGIS:
+ case X_GLvop_GetSharpenTexFuncSGIS:
+ case X_GLvop_GetColorTableSGI:
+ case X_GLvop_GetColorTableParameterfvSGI:
+ case X_GLvop_GetColorTableParameterivSGI:
+ case X_GLvop_GetTexFilterFuncSGIS:
+ case X_GLvop_GetInstrumentsSGIX:
+ case X_GLvop_InstrumentsBufferSGIX:
+ case X_GLvop_PollInstrumentsSGIX:
+ case X_GLvop_FlushRasterSGIX:
+ case X_GLXvop_CreateGLXPbufferSGIX:
+ case X_GLXvop_GetDrawableAttributesSGIX:
+ case X_GLXvop_QueryHyperpipeNetworkSGIX:
+ case X_GLXvop_QueryHyperpipeConfigSGIX:
+ case X_GLXvop_HyperpipeConfigSGIX:
+ case X_GLXvop_DestroyHyperpipeConfigSGIX:
#endif
- case X_GLXvop_QueryMaxSwapBarriersSGIX:
- return( __glXSwapQueryMaxSwapBarriersSGIX(cl, pc) );
- break;
-
- case X_GLXvop_GetFBConfigsSGIX:
- return( __glXSwapGetFBConfigsSGIX(cl, pc) );
- break;
-
- case X_GLXvop_MakeCurrentReadSGI:
- return( __glXSwapMakeCurrentReadSGI(cl, pc) );
- break;
-
- case X_GLXvop_QueryContextInfoEXT:
- return( __glXSwapQueryContextInfoEXT(cl,(char *)pc) );
- break;
-
- default:
- /*
- ** unsupported private request
- */
- cl->client->errorValue = req->vendorCode;
- return __glXUnsupportedPrivateRequest;
+ case X_GLXvop_QueryMaxSwapBarriersSGIX:
+ return (__glXSwapQueryMaxSwapBarriersSGIX(cl, pc));
+ break;
+
+ case X_GLXvop_GetFBConfigsSGIX:
+ return (__glXSwapGetFBConfigsSGIX(cl, pc));
+ break;
+
+ case X_GLXvop_MakeCurrentReadSGI:
+ return (__glXSwapMakeCurrentReadSGI(cl, pc));
+ break;
+
+ case X_GLXvop_QueryContextInfoEXT:
+ return (__glXSwapQueryContextInfoEXT(cl, (char *) pc));
+ break;
+
+ default:
+ /*
+ ** unsupported private request
+ */
+ cl->client->errorValue = req->vendorCode;
+ return __glXUnsupportedPrivateRequest;
}
}
-int __glXSwapGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapGetFBConfigs(__GLXclientState * cl, GLbyte * pc)
{
xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -956,22 +1039,25 @@ int __glXSwapGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
return __glXGetFBConfigs(cl, pc);
}
-int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapGetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc)
{
- xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *)pc;
- xGLXGetFBConfigsReq new_req;
+ xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc;
+ xGLXGetFBConfigsReq new_req;
- new_req.reqType = req->reqType;
- new_req.glxCode = req->glxCode;
- new_req.length = req->length;
- new_req.screen = req->screen;
+ new_req.reqType = req->reqType;
+ new_req.glxCode = req->glxCode;
+ new_req.length = req->length;
+ new_req.screen = req->screen;
- return( __glXSwapGetFBConfigs( cl, (GLbyte *)&new_req ) );
+ return (__glXSwapGetFBConfigs(cl, (GLbyte *) & new_req));
}
-int __glXSwapCreateWindow(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapCreateWindow(__GLXclientState * cl, GLbyte * pc)
{
xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
@@ -981,37 +1067,42 @@ int __glXSwapCreateWindow(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->glxwindow);
__GLX_SWAP_INT(&req->numAttribs);
- return( __glXCreateWindow( cl, (GLbyte *)pc ) );
+ return (__glXCreateWindow(cl, (GLbyte *) pc));
}
-int __glXSwapDestroyWindow(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapDestroyWindow(__GLXclientState * cl, GLbyte * pc)
{
xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->glxwindow);
- return( __glXDestroyWindow( cl, (GLbyte *)pc ) );
+ return (__glXDestroyWindow(cl, (GLbyte *) pc));
}
-int __glXSwapQueryContext(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapQueryContext(__GLXclientState * cl, GLbyte * pc)
{
- xGLXQueryContextReq *req = (xGLXQueryContextReq *)pc;
+ xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->context);
- return( __glXQueryContext(cl, (GLbyte *)pc) );
-
+ return (__glXQueryContext(cl, (GLbyte *) pc));
+
}
-int __glXSwapCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapCreatePbuffer(__GLXclientState * cl, GLbyte * pc)
{
- xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *)pc;
+ xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc;
int nattr = req->numAttribs;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
@@ -1020,43 +1111,49 @@ int __glXSwapCreatePbuffer(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->fbconfig);
__GLX_SWAP_INT(&req->pbuffer);
__GLX_SWAP_INT(&req->numAttribs);
- __GLX_SWAP_INT_ARRAY( (int *)(req+1), nattr*2 );
+ __GLX_SWAP_INT_ARRAY((int *) (req + 1), nattr * 2);
- return( __glXCreatePbuffer( cl, pc ) );
+ return (__glXCreatePbuffer(cl, pc));
}
-int __glXSwapDestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapDestroyPbuffer(__GLXclientState * cl, GLbyte * pc)
{
xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->pbuffer);
- return( __glXDestroyPbuffer( cl, (GLbyte *)pc ) );
+ return (__glXDestroyPbuffer(cl, (GLbyte *) pc));
}
-int __glXSwapGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
{
- xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc;
+ xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->drawable);
- return( __glXGetDrawableAttributes(cl, pc) );
+ return (__glXGetDrawableAttributes(cl, pc));
}
-int __glXSwapChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
+int
+__glXSwapChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc)
{
- xGLXChangeDrawableAttributesReq *req = (xGLXChangeDrawableAttributesReq *)pc;
+ xGLXChangeDrawableAttributesReq *req =
+ (xGLXChangeDrawableAttributesReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->drawable);
__GLX_SWAP_INT(&req->numAttribs);
- __GLX_SWAP_INT_ARRAY( (int *)(req+1), req->numAttribs * 2 );
+ __GLX_SWAP_INT_ARRAY((int *) (req + 1), req->numAttribs * 2);
- return( __glXChangeDrawableAttributes(cl, pc) );
+ return (__glXChangeDrawableAttributes(cl, pc));
}
diff --git a/xorg-server/hw/dmx/glxProxy/glxext.c b/xorg-server/hw/dmx/glxProxy/glxext.c
index 4da16a77d..b0710ccc6 100644
--- a/xorg-server/hw/dmx/glxProxy/glxext.c
+++ b/xorg-server/hw/dmx/glxProxy/glxext.c
@@ -1,496 +1,517 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-
-#include "glxserver.h"
-#include <windowstr.h>
-#include <propertyst.h>
-#include <os.h>
-#include "g_disptab.h"
-#include "glxutil.h"
-#include "glxext.h"
-#include "glxvisuals.h"
-#include "micmap.h"
-#include "glxswap.h"
-
-/*
-** Stubs to satisfy miinitext.c references.
-*/
-typedef int __GLXprovider;
-__GLXprovider __glXDRISWRastProvider;
-void GlxPushProvider(__GLXprovider *provider) { }
-
-/*
-** Forward declarations.
-*/
-static int __glXSwapDispatch(ClientPtr);
-static int __glXDispatch(ClientPtr);
-
-/*
-** Called when the extension is reset.
-*/
-static void ResetExtension(ExtensionEntry* extEntry)
-{
- __glXFlushContextCache();
- __glXScreenReset();
- SwapBarrierReset();
-}
-
-/*
-** Initialize the per-client context storage.
-*/
-static void ResetClientState(int clientIndex)
-{
- __GLXclientState *cl = __glXClients[clientIndex];
- Display **keep_be_displays;
- int i;
-
- free(cl->returnBuf);
- free(cl->currentContexts);
- free(cl->currentDrawables);
- free(cl->largeCmdBuf);
-
- for (i=0; i< screenInfo.numScreens; i++) {
- if (cl->be_displays[i])
- XCloseDisplay( cl->be_displays[i] );
- }
-
- keep_be_displays = cl->be_displays;
- memset(cl, 0, sizeof(__GLXclientState));
- cl->be_displays = keep_be_displays;
-
- /*
- ** By default, assume that the client supports
- ** GLX major version 1 minor version 0 protocol.
- */
- cl->GLClientmajorVersion = 1;
- cl->GLClientminorVersion = 0;
- free(cl->GLClientextensions);
-
- memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
-}
-
-
-/*
-** This procedure is called when the client who created the context goes
-** away OR when glXDestroyContext is called. In either case, all we do is
-** flag that the ID is no longer valid, and (maybe) free the context.
-** use.
-*/
-static int ContextGone(__GLXcontext* cx, XID id)
-{
- cx->idExists = GL_FALSE;
- if (!cx->isCurrent) {
- __glXFreeContext(cx);
- }
-
- return True;
-}
-
-/*
-** Free a client's state.
-*/
-static int ClientGone(int clientIndex, XID id)
-{
- __GLXcontext *cx;
- __GLXclientState *cl = __glXClients[clientIndex];
- int i;
-
- if (cl) {
- /*
- ** Free all the contexts that are current for this client.
- */
- for (i=0; i < cl->numCurrentContexts; i++) {
- cx = cl->currentContexts[i];
- if (cx) {
- cx->isCurrent = GL_FALSE;
- if (!cx->idExists) {
- __glXFreeContext(cx);
- }
- }
- }
- /*
- ** Re-initialize the client state structure. Don't free it because
- ** we'll probably get another client with this index and use the struct
- ** again. There is a maximum of MAXCLIENTS of these structures.
- */
- ResetClientState(clientIndex);
- }
-
- return True;
-}
-
-/*
-** Free a GLX Pixmap.
-*/
-void __glXFreeGLXPixmap( __GLXpixmap *pGlxPixmap )
-{
- if (!pGlxPixmap->idExists &&
- !pGlxPixmap->refcnt) {
-
- PixmapPtr pPixmap = (PixmapPtr) pGlxPixmap->pDraw;
-
- /*
- ** The DestroyPixmap routine should decrement the refcount and free
- ** only if it's zero.
- */
- (*pGlxPixmap->pScreen->DestroyPixmap)(pPixmap);
- free(pGlxPixmap->be_xids);
- free(pGlxPixmap);
- }
-
-}
-
-static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id)
-{
-
- pGlxPixmap->idExists = False;
- __glXFreeGLXPixmap( pGlxPixmap );
-
- return True;
-}
-
-void __glXFreeGLXWindow(__glXWindow *pGlxWindow)
-{
- if (!pGlxWindow->idExists && !pGlxWindow->refcnt) {
- WindowPtr pWindow = (WindowPtr) pGlxWindow->pDraw;
- WindowPtr ret;
-
- dixLookupResourceByType((pointer) &ret,
- pWindow->drawable.id, RT_WINDOW,
- NullClient, DixUnknownAccess);
- if (ret == pWindow) {
- (*pGlxWindow->pScreen->DestroyWindow)(pWindow);
- }
-
- free(pGlxWindow);
- }
-}
-
-static void WindowGone(__glXWindow *pGlxWindow, XID id)
-{
- pGlxWindow->idExists = False;
- __glXFreeGLXWindow(pGlxWindow);
-}
-
-void __glXFreeGLXPbuffer(__glXPbuffer *pGlxPbuffer)
-{
- if (!pGlxPbuffer->idExists && !pGlxPbuffer->refcnt) {
- free(pGlxPbuffer->be_xids);
- free(pGlxPbuffer);
- }
-}
-
-static void PbufferGone(__glXPbuffer *pGlxPbuffer, XID id)
-{
- pGlxPbuffer->idExists = False;
- __glXFreeGLXPbuffer(pGlxPbuffer);
-}
-
-/*
-** Free a context.
-*/
-GLboolean __glXFreeContext(__GLXcontext *cx)
-{
- if (cx->idExists || cx->isCurrent) return GL_FALSE;
-
- free(cx->feedbackBuf);
- free(cx->selectBuf);
- free(cx->real_ids);
- free(cx->real_vids);
-
- if (cx->pGlxPixmap) {
- /*
- ** The previous drawable was a glx pixmap, release it.
- */
- cx->pGlxPixmap->refcnt--;
- __glXFreeGLXPixmap( cx->pGlxPixmap );
- cx->pGlxPixmap = 0;
- }
-
- if (cx->pGlxReadPixmap) {
- /*
- ** The previous drawable was a glx pixmap, release it.
- */
- cx->pGlxReadPixmap->refcnt--;
- __glXFreeGLXPixmap( cx->pGlxReadPixmap );
- cx->pGlxReadPixmap = 0;
- }
-
- if (cx->pGlxWindow) {
- /*
- ** The previous drawable was a glx window, release it.
- */
- cx->pGlxWindow->refcnt--;
- __glXFreeGLXWindow( cx->pGlxWindow );
- cx->pGlxWindow = 0;
- }
-
- if (cx->pGlxReadWindow) {
- /*
- ** The previous drawable was a glx window, release it.
- */
- cx->pGlxReadWindow->refcnt--;
- __glXFreeGLXWindow( cx->pGlxReadWindow );
- cx->pGlxReadWindow = 0;
- }
-
- free(cx);
-
- if (cx == __glXLastContext) {
- __glXFlushContextCache();
- }
-
- return GL_TRUE;
-}
-
-/*
-** Initialize the GLX extension.
-*/
-void GlxExtensionInit(void)
-{
- ExtensionEntry *extEntry;
- int i;
- int glxSupported = 1;
-
- /*
- // do not initialize GLX extension if GLX is not supported
- // by ALL back-end servers.
- */
- for (i=0; i<screenInfo.numScreens; i++) {
- glxSupported &= (dmxScreens[i].glxMajorOpcode > 0);
- }
-
- if (!glxSupported || !dmxGLXProxy) {
- return;
- }
-
- __glXContextRes = CreateNewResourceType((DeleteType)ContextGone,
- "GLXContext");
- __glXClientRes = CreateNewResourceType((DeleteType)ClientGone,
- "GLXClient");
- __glXPixmapRes = CreateNewResourceType((DeleteType)PixmapGone,
- "GLXPixmap");
- __glXWindowRes = CreateNewResourceType((DeleteType)WindowGone,
- "GLXWindow");
- __glXPbufferRes = CreateNewResourceType((DeleteType)PbufferGone,
- "GLXPbuffer");
-
- if (!__glXContextRes || !__glXClientRes || !__glXPixmapRes ||
- !__glXWindowRes || !__glXPbufferRes)
- return;
-
- /*
- ** Add extension to server extensions.
- */
- extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS,
- __GLX_NUMBER_ERRORS, __glXDispatch,
- __glXSwapDispatch, ResetExtension,
- StandardMinorOpcode);
- if (!extEntry) {
- FatalError("__glXExtensionInit: AddExtensions failed\n");
- return;
- }
- /*
- if (!AddExtensionAlias(GLX_EXTENSION_ALIAS, extEntry)) {
- ErrorF("__glXExtensionInit: AddExtensionAlias failed\n");
- return;
- }
- */
-
- __glXerrorBase = extEntry->errorBase;
- __glXBadContext = extEntry->errorBase + GLXBadContext;
- __glXBadContextState = extEntry->errorBase + GLXBadContextState;
- __glXBadDrawable = extEntry->errorBase + GLXBadDrawable;
- __glXBadPixmap = extEntry->errorBase + GLXBadPixmap;
- __glXBadContextTag = extEntry->errorBase + GLXBadContextTag;
- __glXBadCurrentWindow = extEntry->errorBase + GLXBadCurrentWindow;
- __glXBadRenderRequest = extEntry->errorBase + GLXBadRenderRequest;
- __glXBadLargeRequest = extEntry->errorBase + GLXBadLargeRequest;
- __glXUnsupportedPrivateRequest = extEntry->errorBase +
- GLXUnsupportedPrivateRequest;
- __glXBadFBConfig = extEntry->errorBase + GLXBadFBConfig;
- __glXBadPbuffer = extEntry->errorBase + GLXBadPbuffer;
-
- /*
- ** Initialize table of client state. There is never a client 0.
- */
- for (i=1; i <= MAXCLIENTS; i++) {
- __glXClients[i] = 0;
- }
-
- /*
- ** Initialize screen specific data.
- */
- __glXScreenInit(screenInfo.numScreens);
-
- /*
- ** Initialize swap barrier support.
- */
- SwapBarrierInit();
-}
-
-/************************************************************************/
-
-Bool __glXCoreType(void)
-{
- return 0;
-}
-
-/************************************************************************/
-
-void __glXFlushContextCache(void)
-{
- __glXLastContext = 0;
-}
-
-/************************************************************************/
-
-/*
-** Top level dispatcher; all commands are executed from here down.
-*/
-static int __glXDispatch(ClientPtr client)
-{
- REQUEST(xGLXSingleReq);
- CARD8 opcode;
- int (*proc)(__GLXclientState *cl, GLbyte *pc);
- __GLXclientState *cl;
-
- opcode = stuff->glxCode;
- cl = __glXClients[client->index];
- if (!cl) {
- cl = calloc(1, sizeof(__GLXclientState));
- __glXClients[client->index] = cl;
- if (!cl) {
- return BadAlloc;
- }
-
- cl->be_displays = calloc(screenInfo.numScreens, sizeof(Display *));
- if (!cl->be_displays) {
- free( cl );
- return BadAlloc;
- }
- }
-
- if (!cl->inUse) {
- /*
- ** This is first request from this client. Associate a resource
- ** with the client so we will be notified when the client dies.
- */
- XID xid = FakeClientID(client->index);
- if (!AddResource( xid, __glXClientRes, (pointer)(long)client->index)) {
- return BadAlloc;
- }
- ResetClientState(client->index);
- cl->largeCmdRequestsTotal = 0;
- cl->inUse = GL_TRUE;
- cl->client = client;
- }
-
- /*
- ** Check for valid opcode.
- */
- if (opcode >= __GLX_SINGLE_TABLE_SIZE) {
- return BadRequest;
- }
-
- /*
- ** Use the opcode to index into the procedure table.
- */
- proc = __glXSingleTable[opcode];
- return (*proc)(cl, (GLbyte *) stuff);
-}
-
-static int __glXSwapDispatch(ClientPtr client)
-{
- REQUEST(xGLXSingleReq);
- CARD8 opcode;
- int (*proc)(__GLXclientState *cl, GLbyte *pc);
- __GLXclientState *cl;
-
- opcode = stuff->glxCode;
- cl = __glXClients[client->index];
- if (!cl) {
- cl = calloc(1, sizeof(__GLXclientState));
- __glXClients[client->index] = cl;
- if (!cl) {
- return BadAlloc;
- }
-
- cl->be_displays = calloc(screenInfo.numScreens, sizeof(Display *));
- if (!cl->be_displays) {
- free( cl );
- return BadAlloc;
- }
- }
-
- if (!cl->inUse) {
- /*
- ** This is first request from this client. Associate a resource
- ** with the client so we will be notified when the client dies.
- */
- XID xid = FakeClientID(client->index);
- if (!AddResource( xid, __glXClientRes, (pointer)(long)client->index)) {
- return BadAlloc;
- }
- ResetClientState(client->index);
- cl->inUse = GL_TRUE;
- cl->client = client;
- }
-
- /*
- ** Check for valid opcode.
- */
- if (opcode >= __GLX_SINGLE_TABLE_SIZE) {
- return BadRequest;
- }
-
- /*
- ** Use the opcode to index into the procedure table.
- */
- proc = __glXSwapSingleTable[opcode];
- return (*proc)(cl, (GLbyte *) stuff);
-}
-
-int __glXNoSuchSingleOpcode(__GLXclientState *cl, GLbyte *pc)
-{
- return BadRequest;
-}
-
-void __glXNoSuchRenderOpcode(GLbyte *pc)
-{
- return;
-}
-
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#ifdef HAVE_DMX_CONFIG_H
+#include <dmx-config.h>
+#endif
+
+#include "dmx.h"
+
+#include "glxserver.h"
+#include <windowstr.h>
+#include <propertyst.h>
+#include <os.h>
+#include "g_disptab.h"
+#include "glxutil.h"
+#include "glxext.h"
+#include "glxvisuals.h"
+#include "micmap.h"
+#include "glxswap.h"
+
+/*
+** Stubs to satisfy miinitext.c references.
+*/
+typedef int __GLXprovider;
+__GLXprovider __glXDRISWRastProvider;
+void
+GlxPushProvider(__GLXprovider * provider)
+{
+}
+
+/*
+** Forward declarations.
+*/
+static int __glXSwapDispatch(ClientPtr);
+static int __glXDispatch(ClientPtr);
+
+/*
+** Called when the extension is reset.
+*/
+static void
+ResetExtension(ExtensionEntry * extEntry)
+{
+ __glXFlushContextCache();
+ __glXScreenReset();
+ SwapBarrierReset();
+}
+
+/*
+** Initialize the per-client context storage.
+*/
+static void
+ResetClientState(int clientIndex)
+{
+ __GLXclientState *cl = __glXClients[clientIndex];
+ Display **keep_be_displays;
+ int i;
+
+ free(cl->returnBuf);
+ free(cl->currentContexts);
+ free(cl->currentDrawables);
+ free(cl->largeCmdBuf);
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ if (cl->be_displays[i])
+ XCloseDisplay(cl->be_displays[i]);
+ }
+
+ keep_be_displays = cl->be_displays;
+ memset(cl, 0, sizeof(__GLXclientState));
+ cl->be_displays = keep_be_displays;
+
+ /*
+ ** By default, assume that the client supports
+ ** GLX major version 1 minor version 0 protocol.
+ */
+ cl->GLClientmajorVersion = 1;
+ cl->GLClientminorVersion = 0;
+ free(cl->GLClientextensions);
+
+ memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *));
+}
+
+/*
+** This procedure is called when the client who created the context goes
+** away OR when glXDestroyContext is called. In either case, all we do is
+** flag that the ID is no longer valid, and (maybe) free the context.
+** use.
+*/
+static int
+ContextGone(__GLXcontext * cx, XID id)
+{
+ cx->idExists = GL_FALSE;
+ if (!cx->isCurrent) {
+ __glXFreeContext(cx);
+ }
+
+ return True;
+}
+
+/*
+** Free a client's state.
+*/
+static int
+ClientGone(int clientIndex, XID id)
+{
+ __GLXcontext *cx;
+ __GLXclientState *cl = __glXClients[clientIndex];
+ int i;
+
+ if (cl) {
+ /*
+ ** Free all the contexts that are current for this client.
+ */
+ for (i = 0; i < cl->numCurrentContexts; i++) {
+ cx = cl->currentContexts[i];
+ if (cx) {
+ cx->isCurrent = GL_FALSE;
+ if (!cx->idExists) {
+ __glXFreeContext(cx);
+ }
+ }
+ }
+ /*
+ ** Re-initialize the client state structure. Don't free it because
+ ** we'll probably get another client with this index and use the struct
+ ** again. There is a maximum of MAXCLIENTS of these structures.
+ */
+ ResetClientState(clientIndex);
+ }
+
+ return True;
+}
+
+/*
+** Free a GLX Pixmap.
+*/
+void
+__glXFreeGLXPixmap(__GLXpixmap * pGlxPixmap)
+{
+ if (!pGlxPixmap->idExists && !pGlxPixmap->refcnt) {
+
+ PixmapPtr pPixmap = (PixmapPtr) pGlxPixmap->pDraw;
+
+ /*
+ ** The DestroyPixmap routine should decrement the refcount and free
+ ** only if it's zero.
+ */
+ (*pGlxPixmap->pScreen->DestroyPixmap) (pPixmap);
+ free(pGlxPixmap->be_xids);
+ free(pGlxPixmap);
+ }
+
+}
+
+static int
+PixmapGone(__GLXpixmap * pGlxPixmap, XID id)
+{
+
+ pGlxPixmap->idExists = False;
+ __glXFreeGLXPixmap(pGlxPixmap);
+
+ return True;
+}
+
+void
+__glXFreeGLXWindow(__glXWindow * pGlxWindow)
+{
+ if (!pGlxWindow->idExists && !pGlxWindow->refcnt) {
+ WindowPtr pWindow = (WindowPtr) pGlxWindow->pDraw;
+ WindowPtr ret;
+
+ dixLookupResourceByType((pointer) &ret,
+ pWindow->drawable.id, RT_WINDOW,
+ NullClient, DixUnknownAccess);
+ if (ret == pWindow) {
+ (*pGlxWindow->pScreen->DestroyWindow) (pWindow);
+ }
+
+ free(pGlxWindow);
+ }
+}
+
+static void
+WindowGone(__glXWindow * pGlxWindow, XID id)
+{
+ pGlxWindow->idExists = False;
+ __glXFreeGLXWindow(pGlxWindow);
+}
+
+void
+__glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer)
+{
+ if (!pGlxPbuffer->idExists && !pGlxPbuffer->refcnt) {
+ free(pGlxPbuffer->be_xids);
+ free(pGlxPbuffer);
+ }
+}
+
+static void
+PbufferGone(__glXPbuffer * pGlxPbuffer, XID id)
+{
+ pGlxPbuffer->idExists = False;
+ __glXFreeGLXPbuffer(pGlxPbuffer);
+}
+
+/*
+** Free a context.
+*/
+GLboolean
+__glXFreeContext(__GLXcontext * cx)
+{
+ if (cx->idExists || cx->isCurrent)
+ return GL_FALSE;
+
+ free(cx->feedbackBuf);
+ free(cx->selectBuf);
+ free(cx->real_ids);
+ free(cx->real_vids);
+
+ if (cx->pGlxPixmap) {
+ /*
+ ** The previous drawable was a glx pixmap, release it.
+ */
+ cx->pGlxPixmap->refcnt--;
+ __glXFreeGLXPixmap(cx->pGlxPixmap);
+ cx->pGlxPixmap = 0;
+ }
+
+ if (cx->pGlxReadPixmap) {
+ /*
+ ** The previous drawable was a glx pixmap, release it.
+ */
+ cx->pGlxReadPixmap->refcnt--;
+ __glXFreeGLXPixmap(cx->pGlxReadPixmap);
+ cx->pGlxReadPixmap = 0;
+ }
+
+ if (cx->pGlxWindow) {
+ /*
+ ** The previous drawable was a glx window, release it.
+ */
+ cx->pGlxWindow->refcnt--;
+ __glXFreeGLXWindow(cx->pGlxWindow);
+ cx->pGlxWindow = 0;
+ }
+
+ if (cx->pGlxReadWindow) {
+ /*
+ ** The previous drawable was a glx window, release it.
+ */
+ cx->pGlxReadWindow->refcnt--;
+ __glXFreeGLXWindow(cx->pGlxReadWindow);
+ cx->pGlxReadWindow = 0;
+ }
+
+ free(cx);
+
+ if (cx == __glXLastContext) {
+ __glXFlushContextCache();
+ }
+
+ return GL_TRUE;
+}
+
+/*
+** Initialize the GLX extension.
+*/
+void
+GlxExtensionInit(void)
+{
+ ExtensionEntry *extEntry;
+ int i;
+ int glxSupported = 1;
+
+ /*
+ // do not initialize GLX extension if GLX is not supported
+ // by ALL back-end servers.
+ */
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ glxSupported &= (dmxScreens[i].glxMajorOpcode > 0);
+ }
+
+ if (!glxSupported || !dmxGLXProxy) {
+ return;
+ }
+
+ __glXContextRes = CreateNewResourceType((DeleteType) ContextGone,
+ "GLXContext");
+ __glXClientRes = CreateNewResourceType((DeleteType) ClientGone,
+ "GLXClient");
+ __glXPixmapRes = CreateNewResourceType((DeleteType) PixmapGone,
+ "GLXPixmap");
+ __glXWindowRes = CreateNewResourceType((DeleteType) WindowGone,
+ "GLXWindow");
+ __glXPbufferRes = CreateNewResourceType((DeleteType) PbufferGone,
+ "GLXPbuffer");
+
+ if (!__glXContextRes || !__glXClientRes || !__glXPixmapRes ||
+ !__glXWindowRes || !__glXPbufferRes)
+ return;
+
+ /*
+ ** Add extension to server extensions.
+ */
+ extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS,
+ __GLX_NUMBER_ERRORS, __glXDispatch,
+ __glXSwapDispatch, ResetExtension,
+ StandardMinorOpcode);
+ if (!extEntry) {
+ FatalError("__glXExtensionInit: AddExtensions failed\n");
+ return;
+ }
+ /*
+ if (!AddExtensionAlias(GLX_EXTENSION_ALIAS, extEntry)) {
+ ErrorF("__glXExtensionInit: AddExtensionAlias failed\n");
+ return;
+ }
+ */
+
+ __glXerrorBase = extEntry->errorBase;
+ __glXBadContext = extEntry->errorBase + GLXBadContext;
+ __glXBadContextState = extEntry->errorBase + GLXBadContextState;
+ __glXBadDrawable = extEntry->errorBase + GLXBadDrawable;
+ __glXBadPixmap = extEntry->errorBase + GLXBadPixmap;
+ __glXBadContextTag = extEntry->errorBase + GLXBadContextTag;
+ __glXBadCurrentWindow = extEntry->errorBase + GLXBadCurrentWindow;
+ __glXBadRenderRequest = extEntry->errorBase + GLXBadRenderRequest;
+ __glXBadLargeRequest = extEntry->errorBase + GLXBadLargeRequest;
+ __glXUnsupportedPrivateRequest = extEntry->errorBase +
+ GLXUnsupportedPrivateRequest;
+ __glXBadFBConfig = extEntry->errorBase + GLXBadFBConfig;
+ __glXBadPbuffer = extEntry->errorBase + GLXBadPbuffer;
+
+ /*
+ ** Initialize table of client state. There is never a client 0.
+ */
+ for (i = 1; i <= MAXCLIENTS; i++) {
+ __glXClients[i] = 0;
+ }
+
+ /*
+ ** Initialize screen specific data.
+ */
+ __glXScreenInit(screenInfo.numScreens);
+
+ /*
+ ** Initialize swap barrier support.
+ */
+ SwapBarrierInit();
+}
+
+/************************************************************************/
+
+Bool
+__glXCoreType(void)
+{
+ return 0;
+}
+
+/************************************************************************/
+
+void
+__glXFlushContextCache(void)
+{
+ __glXLastContext = 0;
+}
+
+/************************************************************************/
+
+/*
+** Top level dispatcher; all commands are executed from here down.
+*/
+static int
+__glXDispatch(ClientPtr client)
+{
+ REQUEST(xGLXSingleReq);
+ CARD8 opcode;
+ int (*proc) (__GLXclientState * cl, GLbyte * pc);
+ __GLXclientState *cl;
+
+ opcode = stuff->glxCode;
+ cl = __glXClients[client->index];
+ if (!cl) {
+ cl = calloc(1, sizeof(__GLXclientState));
+ __glXClients[client->index] = cl;
+ if (!cl) {
+ return BadAlloc;
+ }
+
+ cl->be_displays = calloc(screenInfo.numScreens, sizeof(Display *));
+ if (!cl->be_displays) {
+ free(cl);
+ return BadAlloc;
+ }
+ }
+
+ if (!cl->inUse) {
+ /*
+ ** This is first request from this client. Associate a resource
+ ** with the client so we will be notified when the client dies.
+ */
+ XID xid = FakeClientID(client->index);
+
+ if (!AddResource(xid, __glXClientRes, (pointer) (long) client->index)) {
+ return BadAlloc;
+ }
+ ResetClientState(client->index);
+ cl->largeCmdRequestsTotal = 0;
+ cl->inUse = GL_TRUE;
+ cl->client = client;
+ }
+
+ /*
+ ** Check for valid opcode.
+ */
+ if (opcode >= __GLX_SINGLE_TABLE_SIZE) {
+ return BadRequest;
+ }
+
+ /*
+ ** Use the opcode to index into the procedure table.
+ */
+ proc = __glXSingleTable[opcode];
+ return (*proc) (cl, (GLbyte *) stuff);
+}
+
+static int
+__glXSwapDispatch(ClientPtr client)
+{
+ REQUEST(xGLXSingleReq);
+ CARD8 opcode;
+ int (*proc) (__GLXclientState * cl, GLbyte * pc);
+ __GLXclientState *cl;
+
+ opcode = stuff->glxCode;
+ cl = __glXClients[client->index];
+ if (!cl) {
+ cl = calloc(1, sizeof(__GLXclientState));
+ __glXClients[client->index] = cl;
+ if (!cl) {
+ return BadAlloc;
+ }
+
+ cl->be_displays = calloc(screenInfo.numScreens, sizeof(Display *));
+ if (!cl->be_displays) {
+ free(cl);
+ return BadAlloc;
+ }
+ }
+
+ if (!cl->inUse) {
+ /*
+ ** This is first request from this client. Associate a resource
+ ** with the client so we will be notified when the client dies.
+ */
+ XID xid = FakeClientID(client->index);
+
+ if (!AddResource(xid, __glXClientRes, (pointer) (long) client->index)) {
+ return BadAlloc;
+ }
+ ResetClientState(client->index);
+ cl->inUse = GL_TRUE;
+ cl->client = client;
+ }
+
+ /*
+ ** Check for valid opcode.
+ */
+ if (opcode >= __GLX_SINGLE_TABLE_SIZE) {
+ return BadRequest;
+ }
+
+ /*
+ ** Use the opcode to index into the procedure table.
+ */
+ proc = __glXSwapSingleTable[opcode];
+ return (*proc) (cl, (GLbyte *) stuff);
+}
+
+int
+__glXNoSuchSingleOpcode(__GLXclientState * cl, GLbyte * pc)
+{
+ return BadRequest;
+}
+
+void
+__glXNoSuchRenderOpcode(GLbyte * pc)
+{
+ return;
+}
diff --git a/xorg-server/hw/dmx/glxProxy/glxext.h b/xorg-server/hw/dmx/glxProxy/glxext.h
index 3e3e5b7f3..881152d1c 100644
--- a/xorg-server/hw/dmx/glxProxy/glxext.h
+++ b/xorg-server/hw/dmx/glxProxy/glxext.h
@@ -1,78 +1,71 @@
-#ifndef _glxext_h_
-#define _glxext_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-/*
- * Added by VA Linux for XFree86 4.0.x
- */
-typedef struct {
- int type;
- void (*resetExtension)(void);
- Bool (*initVisuals)(
- VisualPtr * visualp,
- DepthPtr * depthp,
- int * nvisualp,
- int * ndepthp,
- int * rootDepthp,
- VisualID * defaultVisp,
- unsigned long sizes,
- int bitsPerRGB
- );
- void (*setVisualConfigs)(
- int nconfigs,
- __GLXvisualConfig *configs,
- void **privates
- );
-} __GLXextensionInfo;
-
-extern GLboolean __glXFreeContext(__GLXcontext *glxc);
-extern void __glXFlushContextCache(void);
-
-extern void __glXFreeGLXWindow(__glXWindow *pGlxWindow);
-extern void __glXFreeGLXPixmap( __GLXpixmap *pGlxPixmap );
-
-extern void __glXNoSuchRenderOpcode(GLbyte*);
-extern int __glXNoSuchSingleOpcode(__GLXclientState*, GLbyte*);
-extern void __glXErrorCallBack(GLenum code);
-extern void __glXClearErrorOccured(void);
-extern GLboolean __glXErrorOccured(void);
-extern void __glXResetLargeCommandStatus(__GLXclientState*);
-
-extern int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc);
-extern int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, char *pc);
-
-extern void GlxExtensionInit(void);
-
-extern Bool __glXCoreType(void);
-
-#endif /* _glxext_h_ */
-
+#ifndef _glxext_h_
+#define _glxext_h_
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+/*
+ * Added by VA Linux for XFree86 4.0.x
+ */
+typedef struct {
+ int type;
+ void (*resetExtension) (void);
+ Bool (*initVisuals) (VisualPtr * visualp,
+ DepthPtr * depthp,
+ int *nvisualp,
+ int *ndepthp,
+ int *rootDepthp,
+ VisualID * defaultVisp,
+ unsigned long sizes, int bitsPerRGB);
+ void (*setVisualConfigs) (int nconfigs,
+ __GLXvisualConfig * configs, void **privates);
+} __GLXextensionInfo;
+
+extern GLboolean __glXFreeContext(__GLXcontext * glxc);
+extern void __glXFlushContextCache(void);
+
+extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
+extern void __glXFreeGLXPixmap(__GLXpixmap * pGlxPixmap);
+
+extern void __glXNoSuchRenderOpcode(GLbyte *);
+extern int __glXNoSuchSingleOpcode(__GLXclientState *, GLbyte *);
+extern void __glXErrorCallBack(GLenum code);
+extern void __glXClearErrorOccured(void);
+extern GLboolean __glXErrorOccured(void);
+extern void __glXResetLargeCommandStatus(__GLXclientState *);
+
+extern int __glXQueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc);
+extern int __glXSwapQueryContextInfoEXT(__GLXclientState * cl, char *pc);
+
+extern void GlxExtensionInit(void);
+
+extern Bool __glXCoreType(void);
+
+#endif /* _glxext_h_ */
diff --git a/xorg-server/hw/dmx/glxProxy/glxfbconfig.c b/xorg-server/hw/dmx/glxProxy/glxfbconfig.c
index 3611cf61e..2f46bd07a 100644
--- a/xorg-server/hw/dmx/glxProxy/glxfbconfig.c
+++ b/xorg-server/hw/dmx/glxProxy/glxfbconfig.c
@@ -1,106 +1,106 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxfbconfig.h"
-
-int AreFBConfigsMatch( __GLXFBConfig *c1, __GLXFBConfig *c2 )
-{
- int match;
-
- match = (
- (c1->visualType == c2->visualType) &&
- (c1->transparentType == c2->transparentType) &&
- (c1->transparentRed == c2->transparentRed) &&
- (c1->transparentGreen == c2->transparentGreen) &&
- (c1->transparentBlue == c2->transparentBlue) &&
- (c1->transparentAlpha == c2->transparentAlpha) &&
- (c1->transparentIndex == c2->transparentIndex) &&
- (c1->visualCaveat == c2->visualCaveat) &&
- (c1->drawableType == c2->drawableType) &&
- (c1->renderType == c2->renderType) &&
-#if 0
- (c1->maxPbufferWidth == c2->maxPbufferWidth) &&
- (c1->maxPbufferHeight == c2->maxPbufferHeight) &&
- (c1->maxPbufferPixels == c2->maxPbufferPixels) &&
- (c1->optimalPbufferWidth == c2->optimalPbufferWidth) &&
- (c1->optimalPbufferHeight == c2->optimalPbufferHeight) &&
-#endif
- (c1->visualSelectGroup == c2->visualSelectGroup) &&
- (c1->rgbMode == c2->rgbMode) &&
- (c1->colorIndexMode == c2->colorIndexMode) &&
- (c1->doubleBufferMode == c2->doubleBufferMode) &&
- (c1->stereoMode == c2->stereoMode) &&
- (c1->haveAccumBuffer == c2->haveAccumBuffer) &&
- (c1->haveDepthBuffer == c2->haveDepthBuffer) &&
- (c1->haveStencilBuffer == c2->haveStencilBuffer) &&
- (c1->accumRedBits == c2->accumRedBits) &&
- (c1->accumGreenBits == c2->accumGreenBits) &&
- (c1->accumBlueBits == c2->accumBlueBits) &&
- (c1->accumAlphaBits == c2->accumAlphaBits) &&
- (c1->depthBits == c2->depthBits) &&
- (c1->stencilBits == c2->stencilBits) &&
- (c1->indexBits == c2->indexBits) &&
- (c1->redBits == c2->redBits) &&
- (c1->greenBits == c2->greenBits) &&
- (c1->blueBits == c2->blueBits) &&
- (c1->alphaBits == c2->alphaBits) &&
- (c1->redMask == c2->redMask) &&
- (c1->greenMask == c2->greenMask) &&
- (c1->blueMask == c2->blueMask) &&
- (c1->alphaMask == c2->alphaMask) &&
- (c1->multiSampleSize == c2->multiSampleSize) &&
- (c1->nMultiSampleBuffers == c2->nMultiSampleBuffers) &&
- (c1->maxAuxBuffers == c2->maxAuxBuffers) &&
- (c1->level == c2->level) &&
- (c1->extendedRange == c2->extendedRange) &&
- (c1->minRed == c2->minRed) &&
- (c1->maxRed == c2->maxRed) &&
- (c1->minGreen == c2->minGreen) &&
- (c1->maxGreen == c2->maxGreen) &&
- (c1->minBlue == c2->minBlue) &&
- (c1->maxBlue == c2->maxBlue) &&
- (c1->minAlpha == c2->minAlpha) &&
- (c1->maxAlpha == c2->maxAlpha)
- );
-
- return match;
-}
-
-__GLXFBConfig *FindMatchingFBConfig( __GLXFBConfig *c, __GLXFBConfig *configs, int nconfigs )
-{
- int i;
-
- for (i=0; i<nconfigs; i++) {
- if ( AreFBConfigsMatch( c, configs + i ) )
- return configs + i;
- }
-
- return 0;
-}
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#include "glxfbconfig.h"
+
+int
+AreFBConfigsMatch(__GLXFBConfig * c1, __GLXFBConfig * c2)
+{
+ int match;
+
+ match = ((c1->visualType == c2->visualType) &&
+ (c1->transparentType == c2->transparentType) &&
+ (c1->transparentRed == c2->transparentRed) &&
+ (c1->transparentGreen == c2->transparentGreen) &&
+ (c1->transparentBlue == c2->transparentBlue) &&
+ (c1->transparentAlpha == c2->transparentAlpha) &&
+ (c1->transparentIndex == c2->transparentIndex) &&
+ (c1->visualCaveat == c2->visualCaveat) &&
+ (c1->drawableType == c2->drawableType) &&
+ (c1->renderType == c2->renderType) &&
+#if 0
+ (c1->maxPbufferWidth == c2->maxPbufferWidth) &&
+ (c1->maxPbufferHeight == c2->maxPbufferHeight) &&
+ (c1->maxPbufferPixels == c2->maxPbufferPixels) &&
+ (c1->optimalPbufferWidth == c2->optimalPbufferWidth) &&
+ (c1->optimalPbufferHeight == c2->optimalPbufferHeight) &&
+#endif
+ (c1->visualSelectGroup == c2->visualSelectGroup) &&
+ (c1->rgbMode == c2->rgbMode) &&
+ (c1->colorIndexMode == c2->colorIndexMode) &&
+ (c1->doubleBufferMode == c2->doubleBufferMode) &&
+ (c1->stereoMode == c2->stereoMode) &&
+ (c1->haveAccumBuffer == c2->haveAccumBuffer) &&
+ (c1->haveDepthBuffer == c2->haveDepthBuffer) &&
+ (c1->haveStencilBuffer == c2->haveStencilBuffer) &&
+ (c1->accumRedBits == c2->accumRedBits) &&
+ (c1->accumGreenBits == c2->accumGreenBits) &&
+ (c1->accumBlueBits == c2->accumBlueBits) &&
+ (c1->accumAlphaBits == c2->accumAlphaBits) &&
+ (c1->depthBits == c2->depthBits) &&
+ (c1->stencilBits == c2->stencilBits) &&
+ (c1->indexBits == c2->indexBits) &&
+ (c1->redBits == c2->redBits) &&
+ (c1->greenBits == c2->greenBits) &&
+ (c1->blueBits == c2->blueBits) &&
+ (c1->alphaBits == c2->alphaBits) &&
+ (c1->redMask == c2->redMask) &&
+ (c1->greenMask == c2->greenMask) &&
+ (c1->blueMask == c2->blueMask) &&
+ (c1->alphaMask == c2->alphaMask) &&
+ (c1->multiSampleSize == c2->multiSampleSize) &&
+ (c1->nMultiSampleBuffers == c2->nMultiSampleBuffers) &&
+ (c1->maxAuxBuffers == c2->maxAuxBuffers) &&
+ (c1->level == c2->level) &&
+ (c1->extendedRange == c2->extendedRange) &&
+ (c1->minRed == c2->minRed) &&
+ (c1->maxRed == c2->maxRed) &&
+ (c1->minGreen == c2->minGreen) &&
+ (c1->maxGreen == c2->maxGreen) &&
+ (c1->minBlue == c2->minBlue) &&
+ (c1->maxBlue == c2->maxBlue) &&
+ (c1->minAlpha == c2->minAlpha) && (c1->maxAlpha == c2->maxAlpha)
+ );
+
+ return match;
+}
+
+__GLXFBConfig *
+FindMatchingFBConfig(__GLXFBConfig * c, __GLXFBConfig * configs, int nconfigs)
+{
+ int i;
+
+ for (i = 0; i < nconfigs; i++) {
+ if (AreFBConfigsMatch(c, configs + i))
+ return configs + i;
+ }
+
+ return 0;
+}
diff --git a/xorg-server/hw/dmx/glxProxy/glxfbconfig.h b/xorg-server/hw/dmx/glxProxy/glxfbconfig.h
index c5e94043b..6626410d9 100644
--- a/xorg-server/hw/dmx/glxProxy/glxfbconfig.h
+++ b/xorg-server/hw/dmx/glxProxy/glxfbconfig.h
@@ -32,7 +32,8 @@
#include <GL/glxint.h>
-int AreFBConfigsMatch( __GLXFBConfig *c1, __GLXFBConfig *c2 );
-__GLXFBConfig *FindMatchingFBConfig( __GLXFBConfig *c, __GLXFBConfig *configs, int nconfigs );
+int AreFBConfigsMatch(__GLXFBConfig * c1, __GLXFBConfig * c2);
+__GLXFBConfig *FindMatchingFBConfig(__GLXFBConfig * c, __GLXFBConfig * configs,
+ int nconfigs);
#endif
diff --git a/xorg-server/hw/dmx/glxProxy/glxscreens.c b/xorg-server/hw/dmx/glxProxy/glxscreens.c
index baa4a65a7..f725bd138 100644
--- a/xorg-server/hw/dmx/glxProxy/glxscreens.c
+++ b/xorg-server/hw/dmx/glxProxy/glxscreens.c
@@ -49,285 +49,296 @@ __GLXscreenInfo *__glXActiveScreens;
GLint __glXNumActiveScreens;
__GLXFBConfig **__glXFBConfigs;
-int __glXNumFBConfigs;
+int __glXNumFBConfigs;
static char GLXServerVendorName[] = "SGI DMX/glxProxy";
static char GLXServerVersion[64];
static char GLXServerExtensions[] =
- "GLX_EXT_visual_info "
- "GLX_EXT_visual_rating "
- "GLX_EXT_import_context "
- "GLX_SGIX_fbconfig "
- "GLX_SGI_make_current_read "
- "GLX_SGI_swap_control "
- ;
+ "GLX_EXT_visual_info "
+ "GLX_EXT_visual_rating "
+ "GLX_EXT_import_context "
+ "GLX_SGIX_fbconfig " "GLX_SGI_make_current_read " "GLX_SGI_swap_control ";
static char ExtensionsString[1024];
-static void CalcServerVersionAndExtensions( void )
+static void
+CalcServerVersionAndExtensions(void)
{
- int s;
- xGLXQueryVersionReq *req;
- xGLXQueryVersionReply reply;
- char **be_extensions;
- char *ext;
- char *denied_extensions;
-
- /*
- * set the server glx version to be the minimum version
- * supported by all back-end servers
- */
- __glXVersionMajor = 0;
- __glXVersionMinor = 0;
- for (s=0; s<__glXNumActiveScreens; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = dmxScreen->beDisplay;
-
- /* Send the glXQueryVersion request */
- LockDisplay(dpy);
- GetReq(GLXQueryVersion,req);
- req->reqType = dmxScreen->glxMajorOpcode;
- req->glxCode = X_GLXQueryVersion;
- req->majorVersion = GLX_SERVER_MAJOR_VERSION;
- req->minorVersion = GLX_SERVER_MINOR_VERSION;
- _XReply(dpy, (xReply*) &reply, 0, False);
- UnlockDisplay(dpy);
- SyncHandle();
-
- if (s == 0) {
- __glXVersionMajor = reply.majorVersion;
- __glXVersionMinor = reply.minorVersion;
- }
- else {
- if (reply.majorVersion < __glXVersionMajor) {
- __glXVersionMajor = reply.majorVersion;
- __glXVersionMinor = reply.minorVersion;
- }
- else if ( (reply.majorVersion == __glXVersionMajor) &&
- (reply.minorVersion < __glXVersionMinor) ) {
- __glXVersionMinor = reply.minorVersion;
- }
- }
-
- }
-
- if (GLX_SERVER_MAJOR_VERSION < __glXVersionMajor) {
- __glXVersionMajor = GLX_SERVER_MAJOR_VERSION;
- __glXVersionMinor = GLX_SERVER_MINOR_VERSION;
- }
- else if ( (GLX_SERVER_MAJOR_VERSION == __glXVersionMajor) &&
- (GLX_SERVER_MINOR_VERSION < __glXVersionMinor) ) {
- __glXVersionMinor = GLX_SERVER_MINOR_VERSION;
- }
-
- snprintf(GLXServerVersion, sizeof(GLXServerVersion),
+ int s;
+ xGLXQueryVersionReq *req;
+ xGLXQueryVersionReply reply;
+ char **be_extensions;
+ char *ext;
+ char *denied_extensions;
+
+ /*
+ * set the server glx version to be the minimum version
+ * supported by all back-end servers
+ */
+ __glXVersionMajor = 0;
+ __glXVersionMinor = 0;
+ for (s = 0; s < __glXNumActiveScreens; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = dmxScreen->beDisplay;
+
+ /* Send the glXQueryVersion request */
+ LockDisplay(dpy);
+ GetReq(GLXQueryVersion, req);
+ req->reqType = dmxScreen->glxMajorOpcode;
+ req->glxCode = X_GLXQueryVersion;
+ req->majorVersion = GLX_SERVER_MAJOR_VERSION;
+ req->minorVersion = GLX_SERVER_MINOR_VERSION;
+ _XReply(dpy, (xReply *) & reply, 0, False);
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ if (s == 0) {
+ __glXVersionMajor = reply.majorVersion;
+ __glXVersionMinor = reply.minorVersion;
+ }
+ else {
+ if (reply.majorVersion < __glXVersionMajor) {
+ __glXVersionMajor = reply.majorVersion;
+ __glXVersionMinor = reply.minorVersion;
+ }
+ else if ((reply.majorVersion == __glXVersionMajor) &&
+ (reply.minorVersion < __glXVersionMinor)) {
+ __glXVersionMinor = reply.minorVersion;
+ }
+ }
+
+ }
+
+ if (GLX_SERVER_MAJOR_VERSION < __glXVersionMajor) {
+ __glXVersionMajor = GLX_SERVER_MAJOR_VERSION;
+ __glXVersionMinor = GLX_SERVER_MINOR_VERSION;
+ }
+ else if ((GLX_SERVER_MAJOR_VERSION == __glXVersionMajor) &&
+ (GLX_SERVER_MINOR_VERSION < __glXVersionMinor)) {
+ __glXVersionMinor = GLX_SERVER_MINOR_VERSION;
+ }
+
+ snprintf(GLXServerVersion, sizeof(GLXServerVersion),
"%d.%d DMX %d back-end server(s)",
- __glXVersionMajor, __glXVersionMinor, __glXNumActiveScreens );
- /*
- * set the ExtensionsString to the minimum extensions string
- */
- ExtensionsString[0] = '\0';
-
- /*
- * read extensions strings of all back-end servers
- */
- be_extensions = (char **)malloc( __glXNumActiveScreens * sizeof(char *) );
- if (!be_extensions)
- return;
-
- for (s=0; s<__glXNumActiveScreens; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = dmxScreen->beDisplay;
- xGLXQueryServerStringReq *req;
- xGLXQueryServerStringReply reply;
- int length, numbytes, slop;
-
- /* Send the glXQueryServerString request */
- LockDisplay(dpy);
- GetReq(GLXQueryServerString,req);
- req->reqType = dmxScreen->glxMajorOpcode;
- req->glxCode = X_GLXQueryServerString;
- req->screen = DefaultScreen(dpy);
- req->name = GLX_EXTENSIONS;
- _XReply(dpy, (xReply*) &reply, 0, False);
-
- length = (int)reply.length;
- numbytes = (int)reply.n;
- slop = numbytes * __GLX_SIZE_INT8 & 3;
- be_extensions[s] = (char *)malloc(numbytes);
- if (!be_extensions[s]) {
- /* Throw data on the floor */
- _XEatData(dpy, length);
- } else {
- _XRead(dpy, (char *)be_extensions[s], numbytes);
- if (slop) _XEatData(dpy,4-slop);
- }
- UnlockDisplay(dpy);
- SyncHandle();
- }
-
- /*
- * extensions string will include only extensions that our
- * server supports as well as all back-end servers supports.
- * extensions that are in the DMX_DENY_EXTENSIONS string will
- * not be supported.
- */
- denied_extensions = getenv("DMX_DENY_GLX_EXTENSIONS");
- ext = strtok(GLXServerExtensions, " ");
- while( ext ) {
- int supported = 1;
-
- if (denied_extensions && strstr(denied_extensions, ext)) {
- supported = 0;
- }
- else {
- for (s=0; s<__glXNumActiveScreens && supported; s++) {
- if ( !strstr(be_extensions[s], ext) ) {
- supported = 0;
- }
- }
- }
-
- if (supported) {
- strcat(ExtensionsString, ext);
- strcat(ExtensionsString, " ");
- }
-
- ext = strtok(NULL, " ");
- }
-
- /*
- * release temporary storage
- */
- for (s=0; s<__glXNumActiveScreens; s++) {
- free(be_extensions[s]);
- }
- free( be_extensions );
-
- if (dmxGLXSwapGroupSupport) {
- if (!denied_extensions ||
- !strstr(denied_extensions, "GLX_SGIX_swap_group")) {
- strcat(ExtensionsString, "GLX_SGIX_swap_group");
- if (!denied_extensions ||
- !strstr(denied_extensions, "GLX_SGIX_swap_barrier")) {
- strcat(ExtensionsString, " GLX_SGIX_swap_barrier");
- }
- }
- }
+ __glXVersionMajor, __glXVersionMinor, __glXNumActiveScreens);
+ /*
+ * set the ExtensionsString to the minimum extensions string
+ */
+ ExtensionsString[0] = '\0';
+
+ /*
+ * read extensions strings of all back-end servers
+ */
+ be_extensions = (char **) malloc(__glXNumActiveScreens * sizeof(char *));
+ if (!be_extensions)
+ return;
+
+ for (s = 0; s < __glXNumActiveScreens; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = dmxScreen->beDisplay;
+ xGLXQueryServerStringReq *req;
+ xGLXQueryServerStringReply reply;
+ int length, numbytes, slop;
+
+ /* Send the glXQueryServerString request */
+ LockDisplay(dpy);
+ GetReq(GLXQueryServerString, req);
+ req->reqType = dmxScreen->glxMajorOpcode;
+ req->glxCode = X_GLXQueryServerString;
+ req->screen = DefaultScreen(dpy);
+ req->name = GLX_EXTENSIONS;
+ _XReply(dpy, (xReply *) & reply, 0, False);
+
+ length = (int) reply.length;
+ numbytes = (int) reply.n;
+ slop = numbytes * __GLX_SIZE_INT8 & 3;
+ be_extensions[s] = (char *) malloc(numbytes);
+ if (!be_extensions[s]) {
+ /* Throw data on the floor */
+ _XEatData(dpy, length);
+ }
+ else {
+ _XRead(dpy, (char *) be_extensions[s], numbytes);
+ if (slop)
+ _XEatData(dpy, 4 - slop);
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
+
+ /*
+ * extensions string will include only extensions that our
+ * server supports as well as all back-end servers supports.
+ * extensions that are in the DMX_DENY_EXTENSIONS string will
+ * not be supported.
+ */
+ denied_extensions = getenv("DMX_DENY_GLX_EXTENSIONS");
+ ext = strtok(GLXServerExtensions, " ");
+ while (ext) {
+ int supported = 1;
+
+ if (denied_extensions && strstr(denied_extensions, ext)) {
+ supported = 0;
+ }
+ else {
+ for (s = 0; s < __glXNumActiveScreens && supported; s++) {
+ if (!strstr(be_extensions[s], ext)) {
+ supported = 0;
+ }
+ }
+ }
+
+ if (supported) {
+ strcat(ExtensionsString, ext);
+ strcat(ExtensionsString, " ");
+ }
+
+ ext = strtok(NULL, " ");
+ }
+
+ /*
+ * release temporary storage
+ */
+ for (s = 0; s < __glXNumActiveScreens; s++) {
+ free(be_extensions[s]);
+ }
+ free(be_extensions);
+
+ if (dmxGLXSwapGroupSupport) {
+ if (!denied_extensions ||
+ !strstr(denied_extensions, "GLX_SGIX_swap_group")) {
+ strcat(ExtensionsString, "GLX_SGIX_swap_group");
+ if (!denied_extensions ||
+ !strstr(denied_extensions, "GLX_SGIX_swap_barrier")) {
+ strcat(ExtensionsString, " GLX_SGIX_swap_barrier");
+ }
+ }
+ }
}
-void __glXScreenInit(GLint numscreens)
+void
+__glXScreenInit(GLint numscreens)
{
- int s;
- int c;
- DMXScreenInfo *dmxScreen0 = &dmxScreens[0];
- __glXNumActiveScreens = numscreens;
-
+ int s;
+ int c;
+ DMXScreenInfo *dmxScreen0 = &dmxScreens[0];
- CalcServerVersionAndExtensions();
+ __glXNumActiveScreens = numscreens;
+ CalcServerVersionAndExtensions();
- __glXFBConfigs = NULL;
- __glXNumFBConfigs = 0;
+ __glXFBConfigs = NULL;
+ __glXNumFBConfigs = 0;
- if ( (__glXVersionMajor == 1 && __glXVersionMinor >= 3) ||
+ if ((__glXVersionMajor == 1 && __glXVersionMinor >= 3) ||
(__glXVersionMajor > 1) ||
- ( strstr(ExtensionsString, "GLX_SGIX_fbconfig") ) ) {
-
- /*
- // Initialize FBConfig info.
- // find the set of FBConfigs that are present on all back-end
- // servers - only those configs will be supported
- */
- __glXFBConfigs = (__GLXFBConfig **)malloc( dmxScreen0->numFBConfigs *
- (numscreens+1) * sizeof(__GLXFBConfig *) );
- __glXNumFBConfigs = 0;
-
- for (c=0; c<dmxScreen0->numFBConfigs; c++) {
- __GLXFBConfig *cfg = NULL;
-
- if (numscreens > 1) {
- for (s=1; s<numscreens; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
-
- cfg = FindMatchingFBConfig( &dmxScreen0->fbconfigs[c],
- dmxScreen->fbconfigs,
- dmxScreen->numFBConfigs );
- __glXFBConfigs[ __glXNumFBConfigs * (numscreens+1) + s + 1 ] = cfg;
- if (!cfg) {
- dmxLog(dmxInfo,"screen0 FBConfig 0x%x is missing on screen#%d\n", dmxScreen0->fbconfigs[c].id, s);
- break;
- }
- else {
- dmxLog(dmxInfo,"screen0 FBConfig 0x%x matched to 0x%x on screen#%d\n", dmxScreen0->fbconfigs[c].id, cfg->id, s);
- }
- }
- }
- else {
- cfg = &dmxScreen0->fbconfigs[c];
- }
-
- if (cfg) {
-
- /* filter out overlay visuals */
- if (cfg->level == 0) {
- __GLXFBConfig *proxy_cfg;
-
- __glXFBConfigs[ __glXNumFBConfigs * (numscreens+1) + 1 ] =
- &dmxScreen0->fbconfigs[c];
-
- proxy_cfg = malloc( sizeof(__GLXFBConfig) );
- memcpy( proxy_cfg, cfg, sizeof(__GLXFBConfig) );
- proxy_cfg->id = FakeClientID(0);
- /* visual will be associated later in __glXGetFBConfigs */
- proxy_cfg->associatedVisualId = (unsigned int)-1;
-
- __glXFBConfigs[ __glXNumFBConfigs * (numscreens+1) + 0 ] = proxy_cfg;
-
- __glXNumFBConfigs++;
- }
-
- }
-
- }
+ (strstr(ExtensionsString, "GLX_SGIX_fbconfig"))) {
+
+ /*
+ // Initialize FBConfig info.
+ // find the set of FBConfigs that are present on all back-end
+ // servers - only those configs will be supported
+ */
+ __glXFBConfigs = (__GLXFBConfig **) malloc(dmxScreen0->numFBConfigs *
+ (numscreens +
+ 1) *
+ sizeof(__GLXFBConfig *));
+ __glXNumFBConfigs = 0;
+
+ for (c = 0; c < dmxScreen0->numFBConfigs; c++) {
+ __GLXFBConfig *cfg = NULL;
+
+ if (numscreens > 1) {
+ for (s = 1; s < numscreens; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+
+ cfg = FindMatchingFBConfig(&dmxScreen0->fbconfigs[c],
+ dmxScreen->fbconfigs,
+ dmxScreen->numFBConfigs);
+ __glXFBConfigs[__glXNumFBConfigs * (numscreens + 1) + s +
+ 1] = cfg;
+ if (!cfg) {
+ dmxLog(dmxInfo,
+ "screen0 FBConfig 0x%x is missing on screen#%d\n",
+ dmxScreen0->fbconfigs[c].id, s);
+ break;
+ }
+ else {
+ dmxLog(dmxInfo,
+ "screen0 FBConfig 0x%x matched to 0x%x on screen#%d\n",
+ dmxScreen0->fbconfigs[c].id, cfg->id, s);
+ }
+ }
+ }
+ else {
+ cfg = &dmxScreen0->fbconfigs[c];
+ }
+
+ if (cfg) {
+
+ /* filter out overlay visuals */
+ if (cfg->level == 0) {
+ __GLXFBConfig *proxy_cfg;
+
+ __glXFBConfigs[__glXNumFBConfigs * (numscreens + 1) + 1] =
+ &dmxScreen0->fbconfigs[c];
+
+ proxy_cfg = malloc(sizeof(__GLXFBConfig));
+ memcpy(proxy_cfg, cfg, sizeof(__GLXFBConfig));
+ proxy_cfg->id = FakeClientID(0);
+ /* visual will be associated later in __glXGetFBConfigs */
+ proxy_cfg->associatedVisualId = (unsigned int) -1;
+
+ __glXFBConfigs[__glXNumFBConfigs * (numscreens + 1) + 0] =
+ proxy_cfg;
+
+ __glXNumFBConfigs++;
+ }
+
+ }
+
+ }
}
}
-void __glXScreenReset(void)
+void
+__glXScreenReset(void)
{
- __glXNumActiveScreens = 0;
+ __glXNumActiveScreens = 0;
}
-char *__glXGetServerString( unsigned int name )
+char *
+__glXGetServerString(unsigned int name)
{
- char *ret = NULL;
+ char *ret = NULL;
- switch( name) {
+ switch (name) {
- case GLX_VENDOR:
- ret = GLXServerVendorName;
- break;
+ case GLX_VENDOR:
+ ret = GLXServerVendorName;
+ break;
- case GLX_VERSION:
- ret = GLXServerVersion;
- break;
+ case GLX_VERSION:
+ ret = GLXServerVersion;
+ break;
- case GLX_EXTENSIONS:
- ret = ExtensionsString;
- break;
+ case GLX_EXTENSIONS:
+ ret = ExtensionsString;
+ break;
- default:
- break;
- }
+ default:
+ break;
+ }
- return ret;
+ return ret;
}
-int glxIsExtensionSupported( char *ext )
+int
+glxIsExtensionSupported(char *ext)
{
- return( strstr(ExtensionsString, ext) != NULL );
+ return (strstr(ExtensionsString, ext) != NULL);
}
diff --git a/xorg-server/hw/dmx/glxProxy/glxserver.h b/xorg-server/hw/dmx/glxProxy/glxserver.h
index 03e95b865..ad9496619 100644
--- a/xorg-server/hw/dmx/glxProxy/glxserver.h
+++ b/xorg-server/hw/dmx/glxProxy/glxserver.h
@@ -41,8 +41,7 @@
#include <resource.h>
#include <scrnintstr.h>
-
-#define GL_GLEXT_PROTOTYPES /* we want prototypes */
+#define GL_GLEXT_PROTOTYPES /* we want prototypes */
#include <GL/gl.h>
#include <GL/glxproto.h>
#include <GL/glxint.h>
@@ -52,7 +51,6 @@
#include "glxcontext.h"
#include "glxerror.h"
-
#define GLX_SERVER_MAJOR_VERSION 1
#define GLX_SERVER_MINOR_VERSION 3
@@ -84,14 +82,15 @@ extern GLint __glXNumActiveScreens;
** The last context used (from the server's persective) is cached.
*/
extern __GLXcontext *__glXLastContext;
-extern __GLXcontext *__glXForceCurrent(__GLXclientState*, GLXContextTag, int*);
+extern __GLXcontext *__glXForceCurrent(__GLXclientState *, GLXContextTag,
+ int *);
/************************************************************************/
typedef struct {
- int elem_size; /* element size in bytes */
- int nelems; /* number of elements to swap */
- void (*swapfunc)(GLbyte *pc);
+ int elem_size; /* element size in bytes */
+ int nelems; /* number of elements to swap */
+ void (*swapfunc) (GLbyte * pc);
} __GLXRenderSwapInfo;
/*
@@ -99,20 +98,20 @@ typedef struct {
*/
struct __GLXclientStateRec {
/*
- ** Whether this structure is currently being used to support a client.
- */
+ ** Whether this structure is currently being used to support a client.
+ */
Bool inUse;
/*
- ** Buffer for returned data.
- */
+ ** Buffer for returned data.
+ */
GLbyte *returnBuf;
GLint returnBufSize;
/*
- ** Keep a list of all the contexts that are current for this client's
- ** threads.
- */
+ ** Keep a list of all the contexts that are current for this client's
+ ** threads.
+ */
__GLXcontext **currentContexts;
DrawablePtr *currentDrawables;
GLint numCurrentContexts;
@@ -124,18 +123,18 @@ struct __GLXclientStateRec {
int GLClientminorVersion;
char *GLClientextensions;
- GLXContextTag *be_currentCTag;
+ GLXContextTag *be_currentCTag;
Display **be_displays;
/*
- ** Keep track of large rendering commands, which span multiple requests.
- */
- GLint largeCmdBytesSoFar; /* bytes received so far */
- GLint largeCmdBytesTotal; /* total bytes expected */
- GLint largeCmdRequestsSoFar; /* requests received so far */
- GLint largeCmdRequestsTotal; /* total requests expected */
- void (*largeCmdRequestsSwapProc)(GLbyte *);
- __GLXRenderSwapInfo *largeCmdRequestsSwap_info;
+ ** Keep track of large rendering commands, which span multiple requests.
+ */
+ GLint largeCmdBytesSoFar; /* bytes received so far */
+ GLint largeCmdBytesTotal; /* total bytes expected */
+ GLint largeCmdRequestsSoFar; /* requests received so far */
+ GLint largeCmdRequestsTotal; /* total requests expected */
+ void (*largeCmdRequestsSwapProc) (GLbyte *);
+ __GLXRenderSwapInfo *largeCmdRequestsSwap_info;
GLbyte *largeCmdBuf;
GLint largeCmdBufSize;
GLint largeCmdMaxReqDataSize;
@@ -149,9 +148,9 @@ extern __GLXclientState *__glXClients[];
/*
** Dispatch tables.
*/
-typedef void (*__GLXdispatchRenderProcPtr)(GLbyte *);
-typedef int (*__GLXdispatchSingleProcPtr)(__GLXclientState *, GLbyte *);
-typedef int (*__GLXdispatchVendorPrivProcPtr)(__GLXclientState *, GLbyte *);
+typedef void (*__GLXdispatchRenderProcPtr) (GLbyte *);
+typedef int (*__GLXdispatchSingleProcPtr) (__GLXclientState *, GLbyte *);
+typedef int (*__GLXdispatchVendorPrivProcPtr) (__GLXclientState *, GLbyte *);
extern __GLXdispatchSingleProcPtr __glXSingleTable[];
extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[];
extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[];
@@ -163,7 +162,7 @@ extern __GLXRenderSwapInfo __glXSwapRenderTable_EXT[];
/*
* Dispatch for GLX commands.
*/
-typedef int (*__GLXprocPtr)(__GLXclientState *, char *pc);
+typedef int (*__GLXprocPtr) (__GLXclientState *, char *pc);
extern __GLXprocPtr __glXProcTable[];
/*
@@ -171,7 +170,7 @@ extern __GLXprocPtr __glXProcTable[];
*/
typedef struct {
int bytes;
- int (*varsize)(GLbyte *pc, Bool swap);
+ int (*varsize) (GLbyte * pc, Bool swap);
} __GLXrenderSizeData;
extern __GLXrenderSizeData __glXRenderSizeTable[];
extern __GLXrenderSizeData __glXRenderSizeTable_EXT[];
@@ -194,37 +193,38 @@ extern RESTYPE __glXPbufferRes;
** Prototypes.
*/
-
extern char *__glXcombine_strings(const char *, const char *);
-extern void __glXDisp_DrawArrays(GLbyte*);
-extern void __glXDispSwap_DrawArrays(GLbyte*);
-
+extern void __glXDisp_DrawArrays(GLbyte *);
+extern void __glXDispSwap_DrawArrays(GLbyte *);
/*
** Routines for sending swapped replies.
*/
-extern void __glXSwapMakeCurrentReply(ClientPtr client,
- xGLXMakeCurrentReadSGIReply *reply);
+extern void __glXSwapMakeCurrentReply(ClientPtr client,
+ xGLXMakeCurrentReadSGIReply * reply);
-extern void __glXSwapIsDirectReply(ClientPtr client,
- xGLXIsDirectReply *reply);
+extern void __glXSwapIsDirectReply(ClientPtr client, xGLXIsDirectReply * reply);
extern void __glXSwapQueryVersionReply(ClientPtr client,
- xGLXQueryVersionReply *reply);
+ xGLXQueryVersionReply * reply);
extern void __glXSwapQueryContextInfoEXTReply(ClientPtr client,
- xGLXQueryContextInfoEXTReply *reply,
- int *buf);
+ xGLXQueryContextInfoEXTReply *
+ reply, int *buf);
extern void glxSwapQueryExtensionsStringReply(ClientPtr client,
- xGLXQueryExtensionsStringReply *reply, char *buf);
+ xGLXQueryExtensionsStringReply *
+ reply, char *buf);
extern void glxSwapQueryServerStringReply(ClientPtr client,
- xGLXQueryServerStringReply *reply, char *buf);
+ xGLXQueryServerStringReply * reply,
+ char *buf);
extern void __glXSwapQueryContextReply(ClientPtr client,
- xGLXQueryContextReply *reply, int *buf);
+ xGLXQueryContextReply * reply, int *buf);
extern void __glXSwapGetDrawableAttributesReply(ClientPtr client,
- xGLXGetDrawableAttributesReply *reply, int *buf);
+ xGLXGetDrawableAttributesReply *
+ reply, int *buf);
extern void __glXSwapQueryMaxSwapBarriersSGIXReply(ClientPtr client,
- xGLXQueryMaxSwapBarriersSGIXReply *reply);
+ xGLXQueryMaxSwapBarriersSGIXReply
+ * reply);
/*
* Routines for computing the size of variably-sized rendering commands.
@@ -232,55 +232,54 @@ extern void __glXSwapQueryMaxSwapBarriersSGIXReply(ClientPtr client,
extern int __glXTypeSize(GLenum enm);
extern int __glXImageSize(GLenum format, GLenum type, GLsizei w, GLsizei h,
- GLint rowLength, GLint skipRows, GLint alignment);
+ GLint rowLength, GLint skipRows, GLint alignment);
extern int __glXImage3DSize(GLenum format, GLenum type,
- GLsizei w, GLsizei h, GLsizei d,
- GLint imageHeight, GLint rowLength,
- GLint skipImages, GLint skipRows,
- GLint alignment);
-
-extern int __glXCallListsReqSize(GLbyte *pc, Bool swap);
-extern int __glXBitmapReqSize(GLbyte *pc, Bool swap);
-extern int __glXFogfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXFogivReqSize(GLbyte *pc, Bool swap);
-extern int __glXLightfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXLightivReqSize(GLbyte *pc, Bool swap);
-extern int __glXLightModelfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXLightModelivReqSize(GLbyte *pc, Bool swap);
-extern int __glXMaterialfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXMaterialivReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexParameterfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexParameterivReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexImage1DReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexImage2DReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexEnvfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexEnvivReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexGendvReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexGenfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexGenivReqSize(GLbyte *pc, Bool swap);
-extern int __glXMap1dReqSize(GLbyte *pc, Bool swap);
-extern int __glXMap1fReqSize(GLbyte *pc, Bool swap);
-extern int __glXMap2dReqSize(GLbyte *pc, Bool swap);
-extern int __glXMap2fReqSize(GLbyte *pc, Bool swap);
-extern int __glXPixelMapfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXPixelMapuivReqSize(GLbyte *pc, Bool swap);
-extern int __glXPixelMapusvReqSize(GLbyte *pc, Bool swap);
-extern int __glXDrawPixelsReqSize(GLbyte *pc, Bool swap);
-extern int __glXDrawArraysSize(GLbyte *pc, Bool swap);
-extern int __glXPrioritizeTexturesReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexSubImage1DReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexSubImage2DReqSize(GLbyte *pc, Bool swap);
-extern int __glXTexImage3DReqSize(GLbyte *pc, Bool swap );
-extern int __glXTexSubImage3DReqSize(GLbyte *pc, Bool swap);
-extern int __glXConvolutionFilter1DReqSize(GLbyte *pc, Bool swap);
-extern int __glXConvolutionFilter2DReqSize(GLbyte *pc, Bool swap);
-extern int __glXConvolutionParameterivReqSize(GLbyte *pc, Bool swap);
-extern int __glXConvolutionParameterfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXSeparableFilter2DReqSize(GLbyte *pc, Bool swap);
-extern int __glXColorTableReqSize(GLbyte *pc, Bool swap);
-extern int __glXColorSubTableReqSize(GLbyte *pc, Bool swap);
-extern int __glXColorTableParameterfvReqSize(GLbyte *pc, Bool swap);
-extern int __glXColorTableParameterivReqSize(GLbyte *pc, Bool swap);
+ GLsizei w, GLsizei h, GLsizei d,
+ GLint imageHeight, GLint rowLength,
+ GLint skipImages, GLint skipRows, GLint alignment);
+
+extern int __glXCallListsReqSize(GLbyte * pc, Bool swap);
+extern int __glXBitmapReqSize(GLbyte * pc, Bool swap);
+extern int __glXFogfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXFogivReqSize(GLbyte * pc, Bool swap);
+extern int __glXLightfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXLightivReqSize(GLbyte * pc, Bool swap);
+extern int __glXLightModelfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXLightModelivReqSize(GLbyte * pc, Bool swap);
+extern int __glXMaterialfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXMaterialivReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexParameterfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexParameterivReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexImage1DReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexImage2DReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexEnvfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexEnvivReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexGendvReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexGenfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexGenivReqSize(GLbyte * pc, Bool swap);
+extern int __glXMap1dReqSize(GLbyte * pc, Bool swap);
+extern int __glXMap1fReqSize(GLbyte * pc, Bool swap);
+extern int __glXMap2dReqSize(GLbyte * pc, Bool swap);
+extern int __glXMap2fReqSize(GLbyte * pc, Bool swap);
+extern int __glXPixelMapfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXPixelMapuivReqSize(GLbyte * pc, Bool swap);
+extern int __glXPixelMapusvReqSize(GLbyte * pc, Bool swap);
+extern int __glXDrawPixelsReqSize(GLbyte * pc, Bool swap);
+extern int __glXDrawArraysSize(GLbyte * pc, Bool swap);
+extern int __glXPrioritizeTexturesReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexSubImage1DReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexSubImage2DReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexImage3DReqSize(GLbyte * pc, Bool swap);
+extern int __glXTexSubImage3DReqSize(GLbyte * pc, Bool swap);
+extern int __glXConvolutionFilter1DReqSize(GLbyte * pc, Bool swap);
+extern int __glXConvolutionFilter2DReqSize(GLbyte * pc, Bool swap);
+extern int __glXConvolutionParameterivReqSize(GLbyte * pc, Bool swap);
+extern int __glXConvolutionParameterfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXSeparableFilter2DReqSize(GLbyte * pc, Bool swap);
+extern int __glXColorTableReqSize(GLbyte * pc, Bool swap);
+extern int __glXColorSubTableReqSize(GLbyte * pc, Bool swap);
+extern int __glXColorTableParameterfvReqSize(GLbyte * pc, Bool swap);
+extern int __glXColorTableParameterivReqSize(GLbyte * pc, Bool swap);
/*
* Routines for computing the size of returned data.
@@ -290,8 +289,8 @@ extern int __glXConvolutionParameterfvSize(GLenum pname);
extern int __glXColorTableParameterfvSize(GLenum pname);
extern int __glXColorTableParameterivSize(GLenum pname);
-extern void __glXFreeGLXWindow(__glXWindow *pGlxWindow);
-extern void __glXFreeGLXPbuffer(__glXPbuffer *pGlxPbuffer);
+extern void __glXFreeGLXWindow(__glXWindow * pGlxWindow);
+extern void __glXFreeGLXPbuffer(__glXPbuffer * pGlxPbuffer);
extern int __glXVersionMajor;
extern int __glXVersionMinor;
@@ -300,4 +299,4 @@ extern int __glXVersionMinor;
( (__glXVersionMajor > (major)) || \
((__glXVersionMajor == (major)) && (__glXVersionMinor >= (minor))) )
-#endif /* !__GLX_server_h__ */
+#endif /* !__GLX_server_h__ */
diff --git a/xorg-server/hw/dmx/glxProxy/glxsingle.c b/xorg-server/hw/dmx/glxProxy/glxsingle.c
index 33cc612a7..63786cf79 100644
--- a/xorg-server/hw/dmx/glxProxy/glxsingle.c
+++ b/xorg-server/hw/dmx/glxProxy/glxsingle.c
@@ -68,7 +68,7 @@
dpy->bufptr += SIZEOF(x##name##Req);\
dpy->request++
-#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
+#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
#define GetReqSingle(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
@@ -79,100 +79,101 @@
dpy->request++
#endif
-#define X_GLXSingle 0 /* needed by GetReqExtra */
+#define X_GLXSingle 0 /* needed by GetReqExtra */
-extern Display *GetBackEndDisplay( __GLXclientState *cl, int s );
-extern int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s);
+extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
+extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
+ int s);
static int swap_vec_element_size = 0;
-static void SendSwappedReply( ClientPtr client,
- xGLXSingleReply *reply,
- char *buf,
- int buf_size )
+static void
+SendSwappedReply(ClientPtr client,
+ xGLXSingleReply * reply, char *buf, int buf_size)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_SHORT(&reply->sequenceNumber);
- __GLX_SWAP_INT(&reply->length);
- __GLX_SWAP_INT(&reply->retval);
- __GLX_SWAP_INT(&reply->size);
-
- if ( (buf_size == 0) && (swap_vec_element_size > 0) ) {
- /*
- * the reply has single component - need to swap pad3
- */
- if (swap_vec_element_size == 2) {
- __GLX_SWAP_SHORT(&reply->pad3);
- }
- else if (swap_vec_element_size == 4) {
- __GLX_SWAP_INT(&reply->pad3);
- __GLX_SWAP_INT(&reply->pad4); /* some requests use also pad4
- * i.e GetConvolutionFilter
- */
- }
- else if (swap_vec_element_size == 8) {
- __GLX_SWAP_DOUBLE(&reply->pad3);
- }
- }
- else if ( (buf_size > 0) && (swap_vec_element_size > 0) ) {
- /*
- * the reply has vector of elements which needs to be swapped
- */
- int vsize = buf_size / swap_vec_element_size;
- char *p = buf;
- int i;
-
- for (i=0; i<vsize; i++) {
- if (swap_vec_element_size == 2) {
- __GLX_SWAP_SHORT(p);
- }
- else if (swap_vec_element_size == 4) {
- __GLX_SWAP_INT(p);
- }
- else if (swap_vec_element_size == 8) {
- __GLX_SWAP_DOUBLE(p);
- }
-
- p += swap_vec_element_size;
- }
-
- /*
- * swap pad words as well - for case that some single reply uses
- * them as well
- */
- __GLX_SWAP_INT(&reply->pad3);
- __GLX_SWAP_INT(&reply->pad4);
- __GLX_SWAP_INT(&reply->pad5);
- __GLX_SWAP_INT(&reply->pad6);
-
- }
-
- WriteToClient(client, sizeof(xGLXSingleReply),(char *)reply);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_SWAP_SHORT(&reply->sequenceNumber);
+ __GLX_SWAP_INT(&reply->length);
+ __GLX_SWAP_INT(&reply->retval);
+ __GLX_SWAP_INT(&reply->size);
+
+ if ((buf_size == 0) && (swap_vec_element_size > 0)) {
+ /*
+ * the reply has single component - need to swap pad3
+ */
+ if (swap_vec_element_size == 2) {
+ __GLX_SWAP_SHORT(&reply->pad3);
+ }
+ else if (swap_vec_element_size == 4) {
+ __GLX_SWAP_INT(&reply->pad3);
+ __GLX_SWAP_INT(&reply->pad4); /* some requests use also pad4
+ * i.e GetConvolutionFilter
+ */
+ }
+ else if (swap_vec_element_size == 8) {
+ __GLX_SWAP_DOUBLE(&reply->pad3);
+ }
+ }
+ else if ((buf_size > 0) && (swap_vec_element_size > 0)) {
+ /*
+ * the reply has vector of elements which needs to be swapped
+ */
+ int vsize = buf_size / swap_vec_element_size;
+ char *p = buf;
+ int i;
+
+ for (i = 0; i < vsize; i++) {
+ if (swap_vec_element_size == 2) {
+ __GLX_SWAP_SHORT(p);
+ }
+ else if (swap_vec_element_size == 4) {
+ __GLX_SWAP_INT(p);
+ }
+ else if (swap_vec_element_size == 8) {
+ __GLX_SWAP_DOUBLE(p);
+ }
+
+ p += swap_vec_element_size;
+ }
+
+ /*
+ * swap pad words as well - for case that some single reply uses
+ * them as well
+ */
+ __GLX_SWAP_INT(&reply->pad3);
+ __GLX_SWAP_INT(&reply->pad4);
+ __GLX_SWAP_INT(&reply->pad5);
+ __GLX_SWAP_INT(&reply->pad6);
+
+ }
+
+ WriteToClient(client, sizeof(xGLXSingleReply), (char *) reply);
if (buf_size > 0)
- WriteToClient(client, buf_size, (char *)buf);
+ WriteToClient(client, buf_size, (char *) buf);
}
-int __glXForwardSingleReq( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardSingleReq(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- xGLXSingleReq *be_req;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *be_req;
__GLXcontext *glxc;
- int from_screen = 0;
- int to_screen = 0;
- int buf_size;
- int s;
+ int from_screen = 0;
+ int to_screen = 0;
+ int buf_size;
+ int s;
glxc = __glXLookupContextByTag(cl, req->contextTag);
if (!glxc) {
- return 0;
+ return 0;
}
from_screen = to_screen = glxc->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
@@ -182,47 +183,48 @@ int __glXForwardSingleReq( __GLXclientState *cl, GLbyte *pc )
/*
* just forward the request to back-end server(s)
*/
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReqSingle(GLXSingle,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
- UnlockDisplay(dpy);
- SyncHandle();
-
- if (req->glxCode == X_GLsop_Flush) {
- XFlush(dpy);
- }
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
+
+ LockDisplay(dpy);
+ GetReqSingle(GLXSingle, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *) pc, buf_size);
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ if (req->glxCode == X_GLsop_Flush) {
+ XFlush(dpy);
+ }
}
return Success;
}
-int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc)
{
- ClientPtr client = cl->client;
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- xGLXSingleReq *be_req;
- xGLXSingleReply reply;
- xGLXSingleReply be_reply;
+ ClientPtr client = cl->client;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *be_req;
+ xGLXSingleReply reply;
+ xGLXSingleReply be_reply;
__GLXcontext *glxc;
- int buf_size;
- char *be_buf = NULL;
- int be_buf_size;
- DMXScreenInfo *dmxScreen;
- Display *dpy;
+ int buf_size;
+ char *be_buf = NULL;
+ int be_buf_size;
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
glxc = __glXLookupContextByTag(cl, req->contextTag);
if (!glxc) {
- return __glXBadContext;
+ return __glXBadContext;
}
pc += sz_xGLXSingleReq;
@@ -235,29 +237,30 @@ int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
* send the request to the first back-end server
*/
LockDisplay(dpy);
- GetReqSingle(GLXSingle,be_req);
+ GetReqSingle(GLXSingle, be_req);
be_req->reqType = dmxScreen->glxMajorOpcode;
be_req->glxCode = req->glxCode;
be_req->length = req->length;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,glxc->pScreen->myNum);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
+ be_req->contextTag =
+ GetCurrentBackEndTag(cl, req->contextTag, glxc->pScreen->myNum);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *) pc, buf_size);
/*
* get the reply from the back-end server
*/
- _XReply(dpy, (xReply*) &be_reply, 0, False);
+ _XReply(dpy, (xReply *) & be_reply, 0, False);
be_buf_size = be_reply.length << 2;
if (be_buf_size > 0) {
- be_buf = (char *)malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- return BadAlloc;
- }
+ be_buf = (char *) malloc(be_buf_size);
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ return BadAlloc;
+ }
}
UnlockDisplay(dpy);
@@ -275,47 +278,49 @@ int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
reply.pad4 = be_reply.pad4;
if (client->swapped) {
- SendSwappedReply( client, &reply, be_buf, be_buf_size );
+ SendSwappedReply(client, &reply, be_buf, be_buf_size);
}
else {
- WriteToClient(client, sizeof(xGLXSingleReply),(char *)&reply);
- if (be_buf_size > 0)
- WriteToClient(client, be_buf_size, (char *)be_buf);
+ WriteToClient(client, sizeof(xGLXSingleReply), (char *) &reply);
+ if (be_buf_size > 0)
+ WriteToClient(client, be_buf_size, (char *) be_buf);
}
- if (be_buf_size > 0) free(be_buf);
+ if (be_buf_size > 0)
+ free(be_buf);
return Success;
}
-int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardAllWithReply(__GLXclientState * cl, GLbyte * pc)
{
- ClientPtr client = cl->client;
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- xGLXSingleReq *be_req;
- xGLXSingleReply reply;
- xGLXSingleReply be_reply;
+ ClientPtr client = cl->client;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
+ xGLXSingleReq *be_req;
+ xGLXSingleReply reply;
+ xGLXSingleReply be_reply;
__GLXcontext *glxc;
- int buf_size;
- char *be_buf = NULL;
- int be_buf_size = 0;
- int from_screen = 0;
- int to_screen = 0;
- int s;
+ int buf_size;
+ char *be_buf = NULL;
+ int be_buf_size = 0;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
- DMXScreenInfo *dmxScreen;
- Display *dpy;
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
glxc = __glXLookupContextByTag(cl, req->contextTag);
if (!glxc) {
- return 0;
+ return 0;
}
from_screen = to_screen = glxc->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
@@ -325,42 +330,42 @@ int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
/*
* send the request to the first back-end server(s)
*/
- for (s=to_screen; s>=from_screen; s--) {
- dmxScreen = &dmxScreens[s];
- dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReqSingle(GLXSingle,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
-
- /*
- * get the reply from the back-end server
- */
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- be_buf_size = be_reply.length << 2;
- if (be_buf_size > 0) {
- be_buf = (char *)malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- return BadAlloc;
- }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- if (s > from_screen && be_buf_size > 0) {
- free(be_buf);
- }
+ for (s = to_screen; s >= from_screen; s--) {
+ dmxScreen = &dmxScreens[s];
+ dpy = GetBackEndDisplay(cl, s);
+
+ LockDisplay(dpy);
+ GetReqSingle(GLXSingle, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *) pc, buf_size);
+
+ /*
+ * get the reply from the back-end server
+ */
+ _XReply(dpy, (xReply *) & be_reply, 0, False);
+ be_buf_size = be_reply.length << 2;
+ if (be_buf_size > 0) {
+ be_buf = (char *) malloc(be_buf_size);
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ return BadAlloc;
+ }
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ if (s > from_screen && be_buf_size > 0) {
+ free(be_buf);
+ }
}
/*
@@ -375,380 +380,409 @@ int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
reply.pad4 = be_reply.pad4;
if (client->swapped) {
- SendSwappedReply( client, &reply, be_buf, be_buf_size );
+ SendSwappedReply(client, &reply, be_buf, be_buf_size);
}
else {
- WriteToClient(client, sizeof(xGLXSingleReply),(char *)&reply);
- if (be_buf_size > 0)
- WriteToClient(client, be_buf_size, (char *)be_buf);
+ WriteToClient(client, sizeof(xGLXSingleReply), (char *) &reply);
+ if (be_buf_size > 0)
+ WriteToClient(client, be_buf_size, (char *) be_buf);
}
- if (be_buf_size > 0) free(be_buf);
+ if (be_buf_size > 0)
+ free(be_buf);
return Success;
}
-int __glXForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardSingleReqSwap(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXForwardSingleReq( cl, pc ) );
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXSingleReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXForwardSingleReq(cl, pc));
}
-int __glXForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardPipe0WithReplySwap(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXForwardPipe0WithReply( cl, pc ) );
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXSingleReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXForwardPipe0WithReply(cl, pc));
}
-int __glXForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardPipe0WithReplySwapsv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
- swap_vec_element_size = 2;
+ swap_vec_element_size = 2;
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXSingleReq / 4;
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
- return( __glXForwardPipe0WithReply( cl, pc ) );
+ return (__glXForwardPipe0WithReply(cl, pc));
}
-int __glXForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardPipe0WithReplySwapiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- swap_vec_element_size = 4;
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
+ swap_vec_element_size = 4;
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXSingleReq / 4;
- return( __glXForwardPipe0WithReply( cl, pc ) );
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXForwardPipe0WithReply(cl, pc));
}
-int __glXForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardPipe0WithReplySwapdv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- swap_vec_element_size = 8;
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
+ swap_vec_element_size = 8;
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXSingleReq / 4;
- return( __glXForwardPipe0WithReply( cl, pc ) );
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXForwardPipe0WithReply(cl, pc));
}
-int __glXForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardAllWithReplySwap(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
- swap_vec_element_size = 0;
+ swap_vec_element_size = 0;
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXSingleReq / 4;
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
- return( __glXForwardAllWithReply( cl, pc ) );
+ return (__glXForwardAllWithReply(cl, pc));
}
-int __glXForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
- swap_vec_element_size = 2;
+ swap_vec_element_size = 2;
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXSingleReq / 4;
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
- return( __glXForwardAllWithReply( cl, pc ) );
+ return (__glXForwardAllWithReply(cl, pc));
}
-int __glXForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- swap_vec_element_size = 4;
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
+ swap_vec_element_size = 4;
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXSingleReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
- return( __glXForwardAllWithReply( cl, pc ) );
+ return (__glXForwardAllWithReply(cl, pc));
}
-int __glXForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->contextTag);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
- swap_vec_element_size = 8;
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->contextTag);
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXSingleReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXSingleReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
+ swap_vec_element_size = 8;
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXSingleReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXSingleReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
- return( __glXForwardAllWithReply( cl, pc ) );
+ return (__glXForwardAllWithReply(cl, pc));
}
-static GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h,
- int *elementbits_return, int *rowbytes_return )
+static GLint
+__glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h,
+ int *elementbits_return, int *rowbytes_return)
{
GLint elements, esize;
GLint rowsize, padding;
if (w < 0 || h < 0) {
- return -1;
+ return -1;
}
switch (format) {
- case GL_COLOR_INDEX:
- case GL_STENCIL_INDEX:
- case GL_DEPTH_COMPONENT:
- elements = 1;
- break;
- case GL_RED:
- case GL_GREEN:
- case GL_BLUE:
- case GL_ALPHA:
- case GL_LUMINANCE:
- elements = 1;
- break;
- case GL_LUMINANCE_ALPHA:
- elements = 2;
- break;
- case GL_RGB:
- case GL_BGR:
- elements = 3;
- break;
- case GL_RGBA:
- case GL_BGRA:
- case GL_ABGR_EXT:
- elements = 4;
- break;
- default:
- return -1;
+ case GL_COLOR_INDEX:
+ case GL_STENCIL_INDEX:
+ case GL_DEPTH_COMPONENT:
+ elements = 1;
+ break;
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ elements = 1;
+ break;
+ case GL_LUMINANCE_ALPHA:
+ elements = 2;
+ break;
+ case GL_RGB:
+ case GL_BGR:
+ elements = 3;
+ break;
+ case GL_RGBA:
+ case GL_BGRA:
+ case GL_ABGR_EXT:
+ elements = 4;
+ break;
+ default:
+ return -1;
}
/*
- ** According to the GLX protocol, each row must be padded to a multiple of
- ** 4 bytes. 4 bytes also happens to be the default alignment in the pixel
- ** store modes of the GL.
- */
+ ** According to the GLX protocol, each row must be padded to a multiple of
+ ** 4 bytes. 4 bytes also happens to be the default alignment in the pixel
+ ** store modes of the GL.
+ */
switch (type) {
- case GL_BITMAP:
- if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) {
- rowsize = ((w * elements)+7)/8;
- padding = rowsize % 4;
- if (padding) {
- rowsize += 4 - padding;
- }
- if (elementbits_return) *elementbits_return = elements;
- if (rowbytes_return) *rowbytes_return = rowsize;
- return rowsize * h;
- } else {
- return -1;
- }
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- esize = 1;
- break;
- case GL_UNSIGNED_BYTE_3_3_2:
- case GL_UNSIGNED_BYTE_2_3_3_REV:
- esize = 1;
- elements = 1;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- esize = 2;
- break;
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_5_6_5_REV:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_4_4_4_4_REV:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- case GL_UNSIGNED_SHORT_1_5_5_5_REV:
- esize = 2;
- elements = 1;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- esize = 4;
- break;
- case GL_UNSIGNED_INT_8_8_8_8:
- case GL_UNSIGNED_INT_8_8_8_8_REV:
- case GL_UNSIGNED_INT_10_10_10_2:
- case GL_UNSIGNED_INT_2_10_10_10_REV:
- esize = 4;
- elements = 1;
- break;
- default:
- return -1;
+ case GL_BITMAP:
+ if (format == GL_COLOR_INDEX || format == GL_STENCIL_INDEX) {
+ rowsize = ((w * elements) + 7) / 8;
+ padding = rowsize % 4;
+ if (padding) {
+ rowsize += 4 - padding;
+ }
+ if (elementbits_return)
+ *elementbits_return = elements;
+ if (rowbytes_return)
+ *rowbytes_return = rowsize;
+ return rowsize * h;
+ }
+ else {
+ return -1;
+ }
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ esize = 1;
+ break;
+ case GL_UNSIGNED_BYTE_3_3_2:
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ esize = 1;
+ elements = 1;
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ esize = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_4_4_4_4_REV:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ case GL_UNSIGNED_SHORT_1_5_5_5_REV:
+ esize = 2;
+ elements = 1;
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ case GL_FLOAT:
+ esize = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ case GL_UNSIGNED_INT_10_10_10_2:
+ case GL_UNSIGNED_INT_2_10_10_10_REV:
+ esize = 4;
+ elements = 1;
+ break;
+ default:
+ return -1;
}
rowsize = w * elements * esize;
padding = rowsize % 4;
if (padding) {
- rowsize += 4 - padding;
+ rowsize += 4 - padding;
}
- if (elementbits_return) *elementbits_return = esize*elements*8;
- if (rowbytes_return) *rowbytes_return = rowsize;
+ if (elementbits_return)
+ *elementbits_return = esize * elements * 8;
+ if (rowbytes_return)
+ *rowbytes_return = rowsize;
return rowsize * h;
}
-static int intersectRect( int x1, int x2, int y1, int y2,
- int X1, int X2, int Y1, int Y2,
- int *ix1, int *ix2, int *iy1, int *iy2 )
+static int
+intersectRect(int x1, int x2, int y1, int y2,
+ int X1, int X2, int Y1, int Y2,
+ int *ix1, int *ix2, int *iy1, int *iy2)
{
- int right = (x2 < X2 ? x2 : X2);
- int bottom = (y2 < Y2 ? y2 : Y2);
- int left = (x1 > X1 ? x1 : X1);
- int top = (y1 > Y1 ? y1 : Y1);
- int width = right - left + 1;
- int height = bottom - top + 1;
-
- if ( (width <= 0) || (height <= 0) ) {
- *ix1 = *ix2 = *iy1 = *iy2 = 0;
- return 0;
- }
- else {
- *ix1 = left;
- *ix2 = right;
- *iy1 = top;
- *iy2 = bottom;
- return width * height;
- }
+ int right = (x2 < X2 ? x2 : X2);
+ int bottom = (y2 < Y2 ? y2 : Y2);
+ int left = (x1 > X1 ? x1 : X1);
+ int top = (y1 > Y1 ? y1 : Y1);
+ int width = right - left + 1;
+ int height = bottom - top + 1;
+
+ if ((width <= 0) || (height <= 0)) {
+ *ix1 = *ix2 = *iy1 = *iy2 = 0;
+ return 0;
+ }
+ else {
+ *ix1 = left;
+ *ix2 = right;
+ *iy1 = top;
+ *iy2 = bottom;
+ return width * height;
+ }
}
-int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc)
{
- xGLXSingleReq *req = (xGLXSingleReq *)pc;
+ xGLXSingleReq *req = (xGLXSingleReq *) pc;
xGLXSingleReq *be_req;
xGLXReadPixelsReply reply;
xGLXReadPixelsReply be_reply;
GLbyte *be_pc;
- GLint x,y;
+ GLint x, y;
GLsizei width, height;
GLenum format, type;
GLboolean swapBytes, lsbFirst;
@@ -763,254 +797,262 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc)
int win_x1, win_x2;
int win_y1, win_y2;
int ebits, rowsize;
+
__GLX_DECLARE_SWAP_VARIABLES;
if (client->swapped) {
- __GLX_SWAP_INT(&req->contextTag);
+ __GLX_SWAP_INT(&req->contextTag);
}
glxc = __glXLookupContextByTag(cl, req->contextTag);
if (!glxc) {
- return 0;
+ return 0;
}
from_screen = to_screen = glxc->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
pc += sz_xGLXSingleReq;
- x = *(GLint *)(pc + 0);
- y = *(GLint *)(pc + 4);
- width = *(GLsizei *)(pc + 8);
- height = *(GLsizei *)(pc + 12);
- format = *(GLenum *)(pc + 16);
- type = *(GLenum *)(pc + 20);
- swapBytes = *(GLboolean *)(pc + 24);
- lsbFirst = *(GLboolean *)(pc + 25);
+ x = *(GLint *) (pc + 0);
+ y = *(GLint *) (pc + 4);
+ width = *(GLsizei *) (pc + 8);
+ height = *(GLsizei *) (pc + 12);
+ format = *(GLenum *) (pc + 16);
+ type = *(GLenum *) (pc + 20);
+ swapBytes = *(GLboolean *) (pc + 24);
+ lsbFirst = *(GLboolean *) (pc + 25);
if (client->swapped) {
- __GLX_SWAP_INT(&x);
- __GLX_SWAP_INT(&y);
- __GLX_SWAP_INT(&width);
- __GLX_SWAP_INT(&height);
- __GLX_SWAP_INT(&format);
- __GLX_SWAP_INT(&type);
- swapBytes = !swapBytes;
+ __GLX_SWAP_INT(&x);
+ __GLX_SWAP_INT(&y);
+ __GLX_SWAP_INT(&width);
+ __GLX_SWAP_INT(&height);
+ __GLX_SWAP_INT(&format);
+ __GLX_SWAP_INT(&type);
+ swapBytes = !swapBytes;
}
- buf_size = __glReadPixels_size(format,type,width,height, &ebits, &rowsize);
+ buf_size =
+ __glReadPixels_size(format, type, width, height, &ebits, &rowsize);
if (buf_size > 0) {
- buf = (char *) malloc( buf_size );
- if ( !buf ) {
- return BadAlloc;
- }
+ buf = (char *) malloc(buf_size);
+ if (!buf) {
+ return BadAlloc;
+ }
}
else {
- buf_size = 0;
- buf = NULL;
+ buf_size = 0;
+ buf = NULL;
}
if (buf_size > 0) {
- /*
- * Get the current drawable this context is bound to
- */
- pDraw = __glXLookupDrawableByTag( cl, req->contextTag );
- win_x1 = pDraw->x + x;
- win_x2 = win_x1 + width - 1;
- win_y1 = (dmxGlobalHeight - pDraw->y - pDraw->height) + y;
- win_y2 = win_y1 + height - 1;
- if (pDraw->type != DRAWABLE_WINDOW) {
- from_screen = to_screen = 0;
- }
-
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
- int scr_x1 = dmxScreen->rootXOrigin;
- int scr_x2 = dmxScreen->rootXOrigin + dmxScreen->scrnWidth - 1;
- int scr_y1 = dmxScreen->rootYOrigin;
- int scr_y2 = dmxScreen->rootYOrigin + dmxScreen->scrnHeight - 1;
- int wx1, wx2, wy1, wy2;
- int sx, sy, sw, sh;
- int npixels;
-
- /*
- * find the window portion that is on the current screen
- */
- if (pDraw->type == DRAWABLE_WINDOW) {
- npixels = intersectRect( scr_x1, scr_x2, scr_y1, scr_y2,
- win_x1, win_x2, win_y1, win_y2,
- &wx1, &wx2, &wy1, &wy2 );
- }
- else {
- wx1 = win_x1;
- wx2 = win_x2;
- wy1 = win_y1;
- wy2 = win_y2;
- npixels = (wx2-wx1+1) * (wy2-wy1+1);
- }
-
- if (npixels > 0) {
-
- /* send the request to the back-end server */
- LockDisplay(dpy);
- GetReqExtra(GLXSingle,__GLX_PAD(26),be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = X_GLsop_ReadPixels;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- be_pc = ((GLbyte *)(be_req) + sz_xGLXSingleReq);
-
- sx = wx1 - pDraw->x;
- sy = wy1 - (dmxGlobalHeight - pDraw->y - pDraw->height);
- sw = (wx2-wx1+1);
- sh = (wy2-wy1+1);
-
- *(GLint *)(be_pc + 0) = sx; /* x */
- *(GLint *)(be_pc + 4) = sy; /* y */
- *(GLsizei *)(be_pc + 8) = sw; /* width */
- *(GLsizei *)(be_pc + 12) = sh; /* height */
- *(GLenum *)(be_pc + 16) = format;
- *(GLenum *)(be_pc + 20) = type;
- *(GLboolean *)(be_pc + 24) = swapBytes;
- *(GLboolean *)(be_pc + 25) = lsbFirst;
-
- _XReply(dpy, (xReply*) &be_reply, 0, False);
-
- if (be_reply.length > 0) {
- char *be_buf;
- int be_buf_size = be_reply.length << 2;
-
- be_buf = (char *) malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
-
- /* copy pixels data to the right location of the */
- /* reply buffer */
- if ( type != GL_BITMAP ) {
- int pbytes = ebits / 8;
- char *dst = buf + (sy-y)*rowsize + (sx-x)*pbytes;
- char *src = be_buf;
- int pad = (pbytes * sw) % 4;
- int r;
-
- for (r=0; r<sh; r++) {
- memcpy( dst, src, pbytes*sw );
- dst += rowsize;
- src += (pbytes*sw + (pad ? 4-pad : 0) );
- }
- }
- else {
- /* this is a GL_BITMAP pixel type, should copy bits */
- int r;
- int src_rowsize = bits_to_bytes(sw * ebits);
- int src_pad = src_rowsize % 4;
- if ( src_pad ) {
- src_rowsize += (4 - src_pad);
- }
-
- for (r=0; r<sh; r++) {
- unsigned char dst_mask = 0x80 >> (sx % 8);
- unsigned char src_mask = 0x80;
- char *dst = buf + (sy-y+r)*rowsize + (sx-x)/8;
- char *src = be_buf + r*src_rowsize;
- int b;
-
- for (b=0; b<sw*ebits; b++) {
- if ( *src & src_mask ) {
- *dst |= dst_mask;
- }
- else {
- *dst &= ~dst_mask;
- }
-
- if (dst_mask > 1) dst_mask >>= 1;
- else {
- dst_mask = 0x80;
- dst++;
- }
-
- if (src_mask > 1) src_mask >>= 1;
- else {
- src_mask = 0x80;
- src++;
- }
- }
- }
-
- }
-
- free( be_buf );
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- free( buf );
- return BadAlloc;
- }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- } /* of npixels > 0 */
-
- } /* of for loop */
-
- } /* of if buf_size > 0 */
+ /*
+ * Get the current drawable this context is bound to
+ */
+ pDraw = __glXLookupDrawableByTag(cl, req->contextTag);
+ win_x1 = pDraw->x + x;
+ win_x2 = win_x1 + width - 1;
+ win_y1 = (dmxGlobalHeight - pDraw->y - pDraw->height) + y;
+ win_y2 = win_y1 + height - 1;
+ if (pDraw->type != DRAWABLE_WINDOW) {
+ from_screen = to_screen = 0;
+ }
+
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
+ int scr_x1 = dmxScreen->rootXOrigin;
+ int scr_x2 = dmxScreen->rootXOrigin + dmxScreen->scrnWidth - 1;
+ int scr_y1 = dmxScreen->rootYOrigin;
+ int scr_y2 = dmxScreen->rootYOrigin + dmxScreen->scrnHeight - 1;
+ int wx1, wx2, wy1, wy2;
+ int sx, sy, sw, sh;
+ int npixels;
+
+ /*
+ * find the window portion that is on the current screen
+ */
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ npixels = intersectRect(scr_x1, scr_x2, scr_y1, scr_y2,
+ win_x1, win_x2, win_y1, win_y2,
+ &wx1, &wx2, &wy1, &wy2);
+ }
+ else {
+ wx1 = win_x1;
+ wx2 = win_x2;
+ wy1 = win_y1;
+ wy2 = win_y2;
+ npixels = (wx2 - wx1 + 1) * (wy2 - wy1 + 1);
+ }
+
+ if (npixels > 0) {
+
+ /* send the request to the back-end server */
+ LockDisplay(dpy);
+ GetReqExtra(GLXSingle, __GLX_PAD(26), be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = X_GLsop_ReadPixels;
+ be_req->contextTag =
+ GetCurrentBackEndTag(cl, req->contextTag, s);
+ be_pc = ((GLbyte *) (be_req) + sz_xGLXSingleReq);
+
+ sx = wx1 - pDraw->x;
+ sy = wy1 - (dmxGlobalHeight - pDraw->y - pDraw->height);
+ sw = (wx2 - wx1 + 1);
+ sh = (wy2 - wy1 + 1);
+
+ *(GLint *) (be_pc + 0) = sx; /* x */
+ *(GLint *) (be_pc + 4) = sy; /* y */
+ *(GLsizei *) (be_pc + 8) = sw; /* width */
+ *(GLsizei *) (be_pc + 12) = sh; /* height */
+ *(GLenum *) (be_pc + 16) = format;
+ *(GLenum *) (be_pc + 20) = type;
+ *(GLboolean *) (be_pc + 24) = swapBytes;
+ *(GLboolean *) (be_pc + 25) = lsbFirst;
+
+ _XReply(dpy, (xReply *) & be_reply, 0, False);
+
+ if (be_reply.length > 0) {
+ char *be_buf;
+ int be_buf_size = be_reply.length << 2;
+
+ be_buf = (char *) malloc(be_buf_size);
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+
+ /* copy pixels data to the right location of the */
+ /* reply buffer */
+ if (type != GL_BITMAP) {
+ int pbytes = ebits / 8;
+ char *dst =
+ buf + (sy - y) * rowsize + (sx - x) * pbytes;
+ char *src = be_buf;
+ int pad = (pbytes * sw) % 4;
+ int r;
+
+ for (r = 0; r < sh; r++) {
+ memcpy(dst, src, pbytes * sw);
+ dst += rowsize;
+ src += (pbytes * sw + (pad ? 4 - pad : 0));
+ }
+ }
+ else {
+ /* this is a GL_BITMAP pixel type, should copy bits */
+ int r;
+ int src_rowsize = bits_to_bytes(sw * ebits);
+ int src_pad = src_rowsize % 4;
+
+ if (src_pad) {
+ src_rowsize += (4 - src_pad);
+ }
+
+ for (r = 0; r < sh; r++) {
+ unsigned char dst_mask = 0x80 >> (sx % 8);
+ unsigned char src_mask = 0x80;
+ char *dst =
+ buf + (sy - y + r) * rowsize + (sx - x) / 8;
+ char *src = be_buf + r * src_rowsize;
+ int b;
+
+ for (b = 0; b < sw * ebits; b++) {
+ if (*src & src_mask) {
+ *dst |= dst_mask;
+ }
+ else {
+ *dst &= ~dst_mask;
+ }
+
+ if (dst_mask > 1)
+ dst_mask >>= 1;
+ else {
+ dst_mask = 0x80;
+ dst++;
+ }
+
+ if (src_mask > 1)
+ src_mask >>= 1;
+ else {
+ src_mask = 0x80;
+ src++;
+ }
+ }
+ }
+
+ }
+
+ free(be_buf);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ free(buf);
+ return BadAlloc;
+ }
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ } /* of npixels > 0 */
+
+ } /* of for loop */
+
+ } /* of if buf_size > 0 */
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
reply.length = buf_size >> 2;
if (client->swapped) {
- __GLX_SWAP_SHORT(&reply.sequenceNumber);
- __GLX_SWAP_INT(&reply.length);
+ __GLX_SWAP_SHORT(&reply.sequenceNumber);
+ __GLX_SWAP_INT(&reply.length);
}
- WriteToClient(client, sizeof(xGLXReadPixelsReply),(char *)&reply);
+ WriteToClient(client, sizeof(xGLXReadPixelsReply), (char *) &reply);
if (buf_size > 0) {
- WriteToClient(client, buf_size, (char *)buf);
- free( buf );
+ WriteToClient(client, buf_size, (char *) buf);
+ free(buf);
}
return Success;
}
-int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc)
{
__GLX_DECLARE_SWAP_VARIABLES;
GLbyte *lpc = pc;
lpc += sz_xGLXSingleReq;
- __GLX_SWAP_INT(lpc+0);
- __GLX_SWAP_INT(lpc+4);
- __GLX_SWAP_INT(lpc+8);
- __GLX_SWAP_INT(lpc+12);
+ __GLX_SWAP_INT(lpc + 0);
+ __GLX_SWAP_INT(lpc + 4);
+ __GLX_SWAP_INT(lpc + 8);
+ __GLX_SWAP_INT(lpc + 12);
/* reverse swapBytes */
- *(GLboolean *)(lpc + 16) = ! *(GLboolean *)(lpc + 16);
+ *(GLboolean *) (lpc + 16) = !*(GLboolean *) (lpc + 16);
- return( __glXForwardPipe0WithReplySwap( cl, pc ) );
+ return (__glXForwardPipe0WithReplySwap(cl, pc));
}
-int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
+int
+__glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc)
{
__GLX_DECLARE_SWAP_VARIABLES;
GLbyte *lpc = pc;
lpc += sz_xGLXSingleReq;
- __GLX_SWAP_INT(lpc+0);
- __GLX_SWAP_INT(lpc+4);
- __GLX_SWAP_INT(lpc+8);
+ __GLX_SWAP_INT(lpc + 0);
+ __GLX_SWAP_INT(lpc + 4);
+ __GLX_SWAP_INT(lpc + 8);
/* reverse swapBytes */
- *(GLboolean *)(lpc + 12) = ! *(GLboolean *)(lpc + 12);
+ *(GLboolean *) (lpc + 12) = !*(GLboolean *) (lpc + 12);
- return( __glXForwardPipe0WithReplySwap( cl, pc ) );
+ return (__glXForwardPipe0WithReplySwap(cl, pc));
}
-
-
diff --git a/xorg-server/hw/dmx/glxProxy/glxswap.c b/xorg-server/hw/dmx/glxProxy/glxswap.c
index 1471d8b5f..87a748621 100644
--- a/xorg-server/hw/dmx/glxProxy/glxswap.c
+++ b/xorg-server/hw/dmx/glxProxy/glxswap.c
@@ -1,538 +1,562 @@
-/*
- * Copyright 2003 Red Hat Inc., Raleigh, North Carolina.
- *
- * All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining
- * a copy of this software and associated documentation files (the
- * "Software"), to deal in the Software without restriction, including
- * without limitation on the rights to use, copy, modify, merge,
- * publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so,
- * subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the
- * next paragraph) shall be included in all copies or substantial
- * portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- *
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "dmx.h"
-#include "dmxwindow.h"
-#include "glxserver.h"
-#include "glxswap.h"
-
-extern int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId,
- GLXContextTag tag);
-
-typedef struct _SwapGroup *SwapGroupPtr;
-
-static Bool SwapBarrierIsReadyToSwap(GLuint barrier);
-static void SwapSwapBarrier(GLuint barrier);
-static void UpdateSwapBarrierList(GLuint barrier,
- SwapGroupPtr pOldSwap,
- SwapGroupPtr pNewSwap);
-
-
-/************************************************************************
- *
- * Swap Groups
- *
- ************************************************************************/
-
-typedef struct _SwapGroup {
- WindowPtr pWin;
- SwapGroupPtr pNext;
-
- Bool swapping;
- Bool sleeping;
- GLuint barrier;
-
- XID drawable;
- GLXContextTag tag;
- __GLXclientState *clState;
-} SwapGroupRec;
-
-
-static void SwapSwapGroup(SwapGroupPtr pSwap)
-{
- SwapGroupPtr pCur;
-
- /* All drawables in swap group are ready to swap, so just swap all
- * drawables buffers and then wake up those clients that were
- * previously sleeping */
-
- for (pCur = pSwap; pCur; pCur = pCur->pNext) {
- if (pCur->swapping) {
- /* Swap pCur's buffers */
- __glXDoSwapBuffers(pCur->clState, pCur->drawable, pCur->tag);
- pCur->swapping = FALSE;
- }
-
- /* Wakeup client */
- if (pCur->sleeping) {
- ClientWakeup(pCur->clState->client);
- pCur->sleeping = FALSE;
- }
- }
-}
-
-static Bool SwapGroupIsReadyToSwap(SwapGroupPtr pSwap)
-{
- Bool isReady = TRUE;
-
- /* The swap group is ready to swap when all drawables are ready to
- * swap. NOTE: A drawable is also ready to swap if it is not
- * currently mapped */
- for (; pSwap; pSwap = pSwap->pNext) {
- isReady &= (pSwap->swapping || !pSwap->pWin->mapped);
- /* FIXME: Should we use pSwap->pWin->mapped or ...->realized ??? */
- }
-
- return isReady;
-}
-
-static Bool SGSwapCleanup(ClientPtr client, pointer closure)
-{
- /* SwapGroupPtr pSwap = (SwapGroupPtr)closure; */
-
- /* This should not be called unless the client has died in which
- * case we should remove the buffer from the swap list */
-
- return TRUE;
-}
-
-int SGSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag,
- DrawablePtr pDraw)
-{
- WindowPtr pWin = (WindowPtr)pDraw;
- dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
- SwapGroupPtr pSwap = pWinPriv->swapGroup;
- SwapGroupPtr pCur;
-
- for (pCur = pSwap; pCur && pCur->pWin != pWin; pCur = pCur->pNext);
- if (!pCur)
- return BadDrawable;
-
- pCur->clState = cl;
- pCur->drawable = drawId;
- pCur->tag = tag;
-
- /* We are now in the process of swapping */
- pCur->swapping = TRUE;
-
- if (pSwap->barrier && SwapBarrierIsReadyToSwap(pSwap->barrier)) {
- /* The swap group is bound to a barrier and the barrier is ready
- * to swap, so swap all the swap groups that are bound to this
- * group's swap barrier */
- SwapSwapBarrier(pSwap->barrier);
- } else if (!pSwap->barrier && SwapGroupIsReadyToSwap(pSwap)) {
- /* Do the swap if the entire swap group is ready to swap and the
- * group is not bound to a swap barrier */
- SwapSwapGroup(pSwap);
- } else {
- /* The swap group/barrier is not yet ready to swap, so put
- * client to sleep until the rest are ready to swap */
- ClientSleep(cl->client, SGSwapCleanup, (pointer)pWin);
- pCur->sleeping = TRUE;
- }
-
- return Success;
-}
-
-static void SGWindowUnmapped(WindowPtr pWin)
-{
- dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
- SwapGroupPtr pSwap = pWinPriv->swapGroup;
-
- /* Now that one of the windows in the swap group has been unmapped,
- * see if the entire swap group/barrier is ready to swap */
-
- if (pSwap->barrier && SwapBarrierIsReadyToSwap(pSwap->barrier)) {
- SwapSwapBarrier(pSwap->barrier);
- } else if (!pSwap->barrier && SwapGroupIsReadyToSwap(pSwap)) {
- SwapSwapGroup(pSwap);
- }
-}
-
-static void SGWindowDestroyed(WindowPtr pWin)
-{
- JoinSwapGroupSGIX((DrawablePtr)pWin, NULL);
-}
-
-static SwapGroupPtr CreateSwapEntry(WindowPtr pWin)
-{
- SwapGroupPtr pEntry;
-
- /* Allocate new swap group */
- pEntry = malloc(sizeof(*pEntry));
- if (!pEntry) return NULL;
-
- /* Initialize swap group */
- pEntry->pWin = pWin;
- pEntry->pNext = NULL;
- pEntry->swapping = FALSE;
- pEntry->sleeping = FALSE;
- pEntry->barrier = 0;
- /* The following are not initialized until SwapBuffers is called:
- * pEntry->drawable
- * pEntry->tag
- * pEntry->clState
- */
-
- return pEntry;
-}
-
-static void FreeSwapEntry(SwapGroupPtr pEntry)
-{
- /* Since we have removed the drawable from its previous swap group
- * and it won't be added to another swap group, the only thing that
- * we need to do is to make sure that the drawable's client is not
- * sleeping. This could happen if one thread is sleeping, while
- * another thread called glxJoinSwapGroup(). Note that all sleeping
- * threads should also be swapping, but there is a small window in
- * the SGSwapBuffer() logic, above, where swapping can be set but
- * sleeping is not. We check both independently here just to be
- * pedantic. */
-
- /* Handle swap buffer request */
- if (pEntry->swapping)
- __glXDoSwapBuffers(pEntry->clState, pEntry->drawable, pEntry->tag);
-
- /* Wake up client */
- if (pEntry->sleeping)
- ClientWakeup(pEntry->clState->client);
-
- /* We can free the pEntry entry since it has already been removed
- * from the swap group list and it won't be needed any longer */
- free(pEntry);
-}
-
-int JoinSwapGroupSGIX(DrawablePtr pDraw, DrawablePtr pMember)
-{
- if (pDraw->type == DRAWABLE_WINDOW) {
- WindowPtr pWin = (WindowPtr)pDraw;
- dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
- SwapGroupPtr pOldSwap = NULL;
- SwapGroupPtr pEntry;
-
- /* If pDraw and pMember are already members of the same swap
- * group, just return Success since there is nothing to do */
- for (pEntry = pWinPriv->swapGroup; pEntry; pEntry = pEntry->pNext)
- if (pEntry->pWin == (WindowPtr)pMember)
- return Success;
-
- /* Remove pDraw from its current swap group */
- if (pWinPriv->swapGroup) {
- SwapGroupPtr pSwapGroup = pWinPriv->swapGroup;
- SwapGroupPtr pPrev;
-
- /* Find old swap entry in swap group and save in pOldSwap
- * for later use */
- for (pOldSwap = pWinPriv->swapGroup, pPrev = NULL;
- pOldSwap && pOldSwap->pWin != pWin;
- pPrev = pOldSwap, pOldSwap = pOldSwap->pNext);
- if (!pOldSwap)
- return BadDrawable;
-
- /* Remove pDraw's swap group entry from swap group list */
- if (pPrev) {
- pPrev->pNext = pOldSwap->pNext;
- } else {
- /* pWin is at the head of the swap group list, so we
- * need to update all other members of this swap
- * group */
- for (pEntry = pOldSwap->pNext; pEntry; pEntry = pEntry->pNext)
- DMX_GET_WINDOW_PRIV(pEntry->pWin)->swapGroup
- = pOldSwap->pNext;
-
- /* Update the barrier list as well */
- if (pOldSwap->barrier)
- UpdateSwapBarrierList(pOldSwap->barrier,
- pOldSwap, pOldSwap->pNext);
-
- /* Set pSwapGroup to point to the swap group without
- * pOldSwap */
- pSwapGroup = pOldSwap->pNext;
- }
-
- /* Check to see if current swap group can now swap since we
- * know at this point that pDraw and pMember are guaranteed
- * to previously be in different swap groups */
- if (pSwapGroup && SwapGroupIsReadyToSwap(pSwapGroup)) {
- SwapSwapGroup(pSwapGroup);
- }
-
- /* Make the old swap entry a standalone group */
- pOldSwap->pNext = NULL;
- pOldSwap->barrier = 0;
-
- /* Reset pWin's swap group */
- pWinPriv->swapGroup = NULL;
- pWinPriv->windowDestroyed = NULL;
- pWinPriv->windowUnmapped = NULL;
- }
-
- if (!pMember || pMember->type != DRAWABLE_WINDOW) {
- /* Free old swap group since it is no longer needed */
- if (pOldSwap) FreeSwapEntry(pOldSwap);
- } else if (pDraw == pMember && pOldSwap) {
- /* Special case where pDraw was previously created and we
- * are now just putting it to its own swap group */
- pWinPriv->swapGroup = pOldSwap;
- pWinPriv->windowDestroyed = SGWindowDestroyed;
- pWinPriv->windowUnmapped = SGWindowUnmapped;
-
- /* Check to see if pDraw is ready to swap */
- if (SwapGroupIsReadyToSwap(pOldSwap))
- SwapSwapGroup(pOldSwap);
- } else if (pMember->type == DRAWABLE_WINDOW) {
- WindowPtr pMemberWin = (WindowPtr)pMember;
- dmxWinPrivPtr pMemberPriv = DMX_GET_WINDOW_PRIV(pMemberWin);
- SwapGroupPtr pMemberSwapGroup = pMemberPriv->swapGroup;
-
- /* Finally, how we can add pDraw to pMember's swap group */
-
- /* If pMember is not currently in a swap group, then create
- * one for it since we are just about to add pDraw to it. */
- if (!pMemberSwapGroup) {
- /* Create new swap group */
- pMemberSwapGroup = CreateSwapEntry(pMemberWin);
- if (!pMemberSwapGroup) {
- if (pOldSwap) FreeSwapEntry(pOldSwap);
- return BadAlloc;
- }
-
- /* Set pMember's swap group */
- pMemberPriv->swapGroup = pMemberSwapGroup;
- pMemberPriv->windowDestroyed = SGWindowDestroyed;
- pMemberPriv->windowUnmapped = SGWindowUnmapped;
- }
-
- /* If pDraw == pMember, that means pDraw was not a member of
- * a group previously (or it would have been handled by the
- * special case above), so no additional work is required
- * since we just created a new swap group for pMember (i.e.,
- * pDraw). */
-
- if (pDraw != pMember) {
- /* If pDraw was not previously in a swap group, then create
- * an entry for it */
- if (!pOldSwap) {
- /* Create new swap group */
- pOldSwap = CreateSwapEntry(pWin);
- if (!pOldSwap) {
- /* If we just created a swap group for pMember, we
- * need to free it here */
- if (pMemberSwapGroup->pNext == NULL) {
- FreeSwapEntry(pMemberSwapGroup);
- pMemberPriv->swapGroup = NULL;
- }
- return BadAlloc;
- }
- }
-
- /* Find last entry in pMember's swap group */
- for (pEntry = pMemberSwapGroup;
- pEntry->pNext;
- pEntry = pEntry->pNext);
-
- /* Add pDraw's swap group entry to pMember's swap group list */
- pEntry->pNext = pOldSwap;
-
- /* Add pDraw to pMember's swap barrier */
- pOldSwap->barrier = pEntry->barrier;
-
- /* Set pDraw's swap group */
- pWinPriv->swapGroup = pMemberSwapGroup;
- pWinPriv->windowDestroyed = SGWindowDestroyed;
- pWinPriv->windowUnmapped = SGWindowUnmapped;
- }
- }
- }
-
- return Success;
-}
-
-
-/************************************************************************
- *
- * Swap Barriers
- *
- ************************************************************************/
-
-#define GLX_MAX_SWAP_BARRIERS 10
-
-typedef struct _SwapBarrier *SwapBarrierPtr;
-typedef struct _SwapBarrier {
- SwapGroupPtr pSwap;
- SwapBarrierPtr pNext;
-} SwapBarrierRec;
-
-static SwapBarrierPtr SwapBarrierList[GLX_MAX_SWAP_BARRIERS+1];
-
-void SwapBarrierInit(void)
-{
- int i;
-
- for (i = 0; i <= GLX_MAX_SWAP_BARRIERS; i++)
- SwapBarrierList[i] = NULL;
-}
-
-void SwapBarrierReset(void)
-{
- int i;
-
- for (i = 0; i <= GLX_MAX_SWAP_BARRIERS; i++) {
- SwapBarrierPtr pBarrier, pNextBarrier;
- for (pBarrier = SwapBarrierList[i];
- pBarrier;
- pBarrier = pNextBarrier) {
- pNextBarrier = pBarrier->pNext;
- free(pBarrier);
- }
- SwapBarrierList[i] = NULL;
- }
-}
-
-int QueryMaxSwapBarriersSGIX(int screen)
-{
- return GLX_MAX_SWAP_BARRIERS;
-}
-
-static Bool BindSwapGroupToBarrier(GLuint barrier, SwapGroupPtr pSwapGroup)
-{
- SwapBarrierPtr pBarrier;
-
- pBarrier = malloc(sizeof(*pBarrier));
- if (!pBarrier) return FALSE;
-
- /* Add the swap group to barrier's list */
- pBarrier->pSwap = pSwapGroup;
- pBarrier->pNext = SwapBarrierList[barrier];
- SwapBarrierList[barrier] = pBarrier;
-
- return TRUE;
-}
-
-static Bool UnbindSwapGroupFromBarrier(GLuint barrier, SwapGroupPtr pSwapGroup)
-{
- SwapBarrierPtr pBarrier, pPrevBarrier;
-
- /* Find the swap group in barrier's list */
- for (pBarrier = SwapBarrierList[barrier], pPrevBarrier = NULL;
- pBarrier && pBarrier->pSwap != pSwapGroup;
- pPrevBarrier = pBarrier, pBarrier = pBarrier->pNext);
- if (!pBarrier) return FALSE;
-
- /* Remove the swap group from barrier's list */
- if (pPrevBarrier) pPrevBarrier->pNext = pBarrier->pNext;
- else SwapBarrierList[barrier] = pBarrier->pNext;
-
- /* Free memory */
- free(pBarrier);
-
- return TRUE;
-}
-
-static void UpdateSwapBarrierList(GLuint barrier,
- SwapGroupPtr pOldSwap,
- SwapGroupPtr pNewSwap)
-{
- SwapBarrierPtr pBarrier;
-
- /* If the old swap group is being destroyed, then we need to remove
- * the swap group from the list entirely */
- if (!pNewSwap) {
- UnbindSwapGroupFromBarrier(barrier, pOldSwap);
- return;
- }
-
- /* Otherwise, find the old swap group in the barrier list and change
- * it to the new swap group */
- for (pBarrier = SwapBarrierList[barrier];
- pBarrier;
- pBarrier = pBarrier->pNext) {
- if (pBarrier->pSwap == pOldSwap) {
- pBarrier->pSwap = pNewSwap;
- return;
- }
- }
-}
-
-static Bool SwapBarrierIsReadyToSwap(GLuint barrier)
-{
- SwapBarrierPtr pBarrier;
- Bool isReady = TRUE;
-
- /* The swap barier is ready to swap when swap groups that are bound
- * to barrier are ready to swap */
- for (pBarrier = SwapBarrierList[barrier];
- pBarrier;
- pBarrier = pBarrier->pNext)
- isReady &= SwapGroupIsReadyToSwap(pBarrier->pSwap);
-
- return isReady;
-}
-
-static void SwapSwapBarrier(GLuint barrier)
-{
- SwapBarrierPtr pBarrier;
-
- /* Swap each group that is a member of this barrier */
- for (pBarrier = SwapBarrierList[barrier];
- pBarrier;
- pBarrier = pBarrier->pNext)
- SwapSwapGroup(pBarrier->pSwap);
-}
-
-int BindSwapBarrierSGIX(DrawablePtr pDraw, int barrier)
-{
- /* FIXME: Check for errors when pDraw->type != DRAWABLE_WINDOW */
-
- if (barrier < 0 || barrier > GLX_MAX_SWAP_BARRIERS)
- return BadValue;
-
- if (pDraw->type == DRAWABLE_WINDOW) {
- WindowPtr pWin = (WindowPtr)pDraw;
- dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
- SwapGroupPtr pSwapGroup = pWinPriv->swapGroup;
- SwapGroupPtr pCur;
-
- if (!pSwapGroup) return BadDrawable;
- if (barrier && pSwapGroup->barrier) return BadValue;
-
- /* Update the swap barrier list */
- if (barrier) {
- if (!BindSwapGroupToBarrier(barrier, pSwapGroup))
- return BadAlloc;
- } else {
- if (!UnbindSwapGroupFromBarrier(pSwapGroup->barrier, pSwapGroup))
- return BadDrawable;
- }
-
- /* Set the barrier for each member of this swap group */
- for (pCur = pSwapGroup; pCur; pCur = pCur->pNext)
- pCur->barrier = barrier;
- }
-
- return Success;
-}
+/*
+ * Copyright 2003 Red Hat Inc., Raleigh, North Carolina.
+ *
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation on the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial
+ * portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ * Kevin E. Martin <kem@redhat.com>
+ *
+ */
+
+#ifdef HAVE_DMX_CONFIG_H
+#include <dmx-config.h>
+#endif
+
+#include "dmx.h"
+#include "dmxwindow.h"
+#include "glxserver.h"
+#include "glxswap.h"
+
+extern int __glXDoSwapBuffers(__GLXclientState * cl, XID drawId,
+ GLXContextTag tag);
+
+typedef struct _SwapGroup *SwapGroupPtr;
+
+static Bool SwapBarrierIsReadyToSwap(GLuint barrier);
+static void SwapSwapBarrier(GLuint barrier);
+static void UpdateSwapBarrierList(GLuint barrier,
+ SwapGroupPtr pOldSwap, SwapGroupPtr pNewSwap);
+
+/************************************************************************
+ *
+ * Swap Groups
+ *
+ ************************************************************************/
+
+typedef struct _SwapGroup {
+ WindowPtr pWin;
+ SwapGroupPtr pNext;
+
+ Bool swapping;
+ Bool sleeping;
+ GLuint barrier;
+
+ XID drawable;
+ GLXContextTag tag;
+ __GLXclientState *clState;
+} SwapGroupRec;
+
+static void
+SwapSwapGroup(SwapGroupPtr pSwap)
+{
+ SwapGroupPtr pCur;
+
+ /* All drawables in swap group are ready to swap, so just swap all
+ * drawables buffers and then wake up those clients that were
+ * previously sleeping */
+
+ for (pCur = pSwap; pCur; pCur = pCur->pNext) {
+ if (pCur->swapping) {
+ /* Swap pCur's buffers */
+ __glXDoSwapBuffers(pCur->clState, pCur->drawable, pCur->tag);
+ pCur->swapping = FALSE;
+ }
+
+ /* Wakeup client */
+ if (pCur->sleeping) {
+ ClientWakeup(pCur->clState->client);
+ pCur->sleeping = FALSE;
+ }
+ }
+}
+
+static Bool
+SwapGroupIsReadyToSwap(SwapGroupPtr pSwap)
+{
+ Bool isReady = TRUE;
+
+ /* The swap group is ready to swap when all drawables are ready to
+ * swap. NOTE: A drawable is also ready to swap if it is not
+ * currently mapped */
+ for (; pSwap; pSwap = pSwap->pNext) {
+ isReady &= (pSwap->swapping || !pSwap->pWin->mapped);
+ /* FIXME: Should we use pSwap->pWin->mapped or ...->realized ??? */
+ }
+
+ return isReady;
+}
+
+static Bool
+SGSwapCleanup(ClientPtr client, pointer closure)
+{
+ /* SwapGroupPtr pSwap = (SwapGroupPtr)closure; */
+
+ /* This should not be called unless the client has died in which
+ * case we should remove the buffer from the swap list */
+
+ return TRUE;
+}
+
+int
+SGSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag,
+ DrawablePtr pDraw)
+{
+ WindowPtr pWin = (WindowPtr) pDraw;
+ dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
+ SwapGroupPtr pSwap = pWinPriv->swapGroup;
+ SwapGroupPtr pCur;
+
+ for (pCur = pSwap; pCur && pCur->pWin != pWin; pCur = pCur->pNext);
+ if (!pCur)
+ return BadDrawable;
+
+ pCur->clState = cl;
+ pCur->drawable = drawId;
+ pCur->tag = tag;
+
+ /* We are now in the process of swapping */
+ pCur->swapping = TRUE;
+
+ if (pSwap->barrier && SwapBarrierIsReadyToSwap(pSwap->barrier)) {
+ /* The swap group is bound to a barrier and the barrier is ready
+ * to swap, so swap all the swap groups that are bound to this
+ * group's swap barrier */
+ SwapSwapBarrier(pSwap->barrier);
+ }
+ else if (!pSwap->barrier && SwapGroupIsReadyToSwap(pSwap)) {
+ /* Do the swap if the entire swap group is ready to swap and the
+ * group is not bound to a swap barrier */
+ SwapSwapGroup(pSwap);
+ }
+ else {
+ /* The swap group/barrier is not yet ready to swap, so put
+ * client to sleep until the rest are ready to swap */
+ ClientSleep(cl->client, SGSwapCleanup, (pointer) pWin);
+ pCur->sleeping = TRUE;
+ }
+
+ return Success;
+}
+
+static void
+SGWindowUnmapped(WindowPtr pWin)
+{
+ dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
+ SwapGroupPtr pSwap = pWinPriv->swapGroup;
+
+ /* Now that one of the windows in the swap group has been unmapped,
+ * see if the entire swap group/barrier is ready to swap */
+
+ if (pSwap->barrier && SwapBarrierIsReadyToSwap(pSwap->barrier)) {
+ SwapSwapBarrier(pSwap->barrier);
+ }
+ else if (!pSwap->barrier && SwapGroupIsReadyToSwap(pSwap)) {
+ SwapSwapGroup(pSwap);
+ }
+}
+
+static void
+SGWindowDestroyed(WindowPtr pWin)
+{
+ JoinSwapGroupSGIX((DrawablePtr) pWin, NULL);
+}
+
+static SwapGroupPtr
+CreateSwapEntry(WindowPtr pWin)
+{
+ SwapGroupPtr pEntry;
+
+ /* Allocate new swap group */
+ pEntry = malloc(sizeof(*pEntry));
+ if (!pEntry)
+ return NULL;
+
+ /* Initialize swap group */
+ pEntry->pWin = pWin;
+ pEntry->pNext = NULL;
+ pEntry->swapping = FALSE;
+ pEntry->sleeping = FALSE;
+ pEntry->barrier = 0;
+ /* The following are not initialized until SwapBuffers is called:
+ * pEntry->drawable
+ * pEntry->tag
+ * pEntry->clState
+ */
+
+ return pEntry;
+}
+
+static void
+FreeSwapEntry(SwapGroupPtr pEntry)
+{
+ /* Since we have removed the drawable from its previous swap group
+ * and it won't be added to another swap group, the only thing that
+ * we need to do is to make sure that the drawable's client is not
+ * sleeping. This could happen if one thread is sleeping, while
+ * another thread called glxJoinSwapGroup(). Note that all sleeping
+ * threads should also be swapping, but there is a small window in
+ * the SGSwapBuffer() logic, above, where swapping can be set but
+ * sleeping is not. We check both independently here just to be
+ * pedantic. */
+
+ /* Handle swap buffer request */
+ if (pEntry->swapping)
+ __glXDoSwapBuffers(pEntry->clState, pEntry->drawable, pEntry->tag);
+
+ /* Wake up client */
+ if (pEntry->sleeping)
+ ClientWakeup(pEntry->clState->client);
+
+ /* We can free the pEntry entry since it has already been removed
+ * from the swap group list and it won't be needed any longer */
+ free(pEntry);
+}
+
+int
+JoinSwapGroupSGIX(DrawablePtr pDraw, DrawablePtr pMember)
+{
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ WindowPtr pWin = (WindowPtr) pDraw;
+ dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
+ SwapGroupPtr pOldSwap = NULL;
+ SwapGroupPtr pEntry;
+
+ /* If pDraw and pMember are already members of the same swap
+ * group, just return Success since there is nothing to do */
+ for (pEntry = pWinPriv->swapGroup; pEntry; pEntry = pEntry->pNext)
+ if (pEntry->pWin == (WindowPtr) pMember)
+ return Success;
+
+ /* Remove pDraw from its current swap group */
+ if (pWinPriv->swapGroup) {
+ SwapGroupPtr pSwapGroup = pWinPriv->swapGroup;
+ SwapGroupPtr pPrev;
+
+ /* Find old swap entry in swap group and save in pOldSwap
+ * for later use */
+ for (pOldSwap = pWinPriv->swapGroup, pPrev = NULL;
+ pOldSwap && pOldSwap->pWin != pWin;
+ pPrev = pOldSwap, pOldSwap = pOldSwap->pNext);
+ if (!pOldSwap)
+ return BadDrawable;
+
+ /* Remove pDraw's swap group entry from swap group list */
+ if (pPrev) {
+ pPrev->pNext = pOldSwap->pNext;
+ }
+ else {
+ /* pWin is at the head of the swap group list, so we
+ * need to update all other members of this swap
+ * group */
+ for (pEntry = pOldSwap->pNext; pEntry; pEntry = pEntry->pNext)
+ DMX_GET_WINDOW_PRIV(pEntry->pWin)->swapGroup
+ = pOldSwap->pNext;
+
+ /* Update the barrier list as well */
+ if (pOldSwap->barrier)
+ UpdateSwapBarrierList(pOldSwap->barrier,
+ pOldSwap, pOldSwap->pNext);
+
+ /* Set pSwapGroup to point to the swap group without
+ * pOldSwap */
+ pSwapGroup = pOldSwap->pNext;
+ }
+
+ /* Check to see if current swap group can now swap since we
+ * know at this point that pDraw and pMember are guaranteed
+ * to previously be in different swap groups */
+ if (pSwapGroup && SwapGroupIsReadyToSwap(pSwapGroup)) {
+ SwapSwapGroup(pSwapGroup);
+ }
+
+ /* Make the old swap entry a standalone group */
+ pOldSwap->pNext = NULL;
+ pOldSwap->barrier = 0;
+
+ /* Reset pWin's swap group */
+ pWinPriv->swapGroup = NULL;
+ pWinPriv->windowDestroyed = NULL;
+ pWinPriv->windowUnmapped = NULL;
+ }
+
+ if (!pMember || pMember->type != DRAWABLE_WINDOW) {
+ /* Free old swap group since it is no longer needed */
+ if (pOldSwap)
+ FreeSwapEntry(pOldSwap);
+ }
+ else if (pDraw == pMember && pOldSwap) {
+ /* Special case where pDraw was previously created and we
+ * are now just putting it to its own swap group */
+ pWinPriv->swapGroup = pOldSwap;
+ pWinPriv->windowDestroyed = SGWindowDestroyed;
+ pWinPriv->windowUnmapped = SGWindowUnmapped;
+
+ /* Check to see if pDraw is ready to swap */
+ if (SwapGroupIsReadyToSwap(pOldSwap))
+ SwapSwapGroup(pOldSwap);
+ }
+ else if (pMember->type == DRAWABLE_WINDOW) {
+ WindowPtr pMemberWin = (WindowPtr) pMember;
+ dmxWinPrivPtr pMemberPriv = DMX_GET_WINDOW_PRIV(pMemberWin);
+ SwapGroupPtr pMemberSwapGroup = pMemberPriv->swapGroup;
+
+ /* Finally, how we can add pDraw to pMember's swap group */
+
+ /* If pMember is not currently in a swap group, then create
+ * one for it since we are just about to add pDraw to it. */
+ if (!pMemberSwapGroup) {
+ /* Create new swap group */
+ pMemberSwapGroup = CreateSwapEntry(pMemberWin);
+ if (!pMemberSwapGroup) {
+ if (pOldSwap)
+ FreeSwapEntry(pOldSwap);
+ return BadAlloc;
+ }
+
+ /* Set pMember's swap group */
+ pMemberPriv->swapGroup = pMemberSwapGroup;
+ pMemberPriv->windowDestroyed = SGWindowDestroyed;
+ pMemberPriv->windowUnmapped = SGWindowUnmapped;
+ }
+
+ /* If pDraw == pMember, that means pDraw was not a member of
+ * a group previously (or it would have been handled by the
+ * special case above), so no additional work is required
+ * since we just created a new swap group for pMember (i.e.,
+ * pDraw). */
+
+ if (pDraw != pMember) {
+ /* If pDraw was not previously in a swap group, then create
+ * an entry for it */
+ if (!pOldSwap) {
+ /* Create new swap group */
+ pOldSwap = CreateSwapEntry(pWin);
+ if (!pOldSwap) {
+ /* If we just created a swap group for pMember, we
+ * need to free it here */
+ if (pMemberSwapGroup->pNext == NULL) {
+ FreeSwapEntry(pMemberSwapGroup);
+ pMemberPriv->swapGroup = NULL;
+ }
+ return BadAlloc;
+ }
+ }
+
+ /* Find last entry in pMember's swap group */
+ for (pEntry = pMemberSwapGroup;
+ pEntry->pNext; pEntry = pEntry->pNext);
+
+ /* Add pDraw's swap group entry to pMember's swap group list */
+ pEntry->pNext = pOldSwap;
+
+ /* Add pDraw to pMember's swap barrier */
+ pOldSwap->barrier = pEntry->barrier;
+
+ /* Set pDraw's swap group */
+ pWinPriv->swapGroup = pMemberSwapGroup;
+ pWinPriv->windowDestroyed = SGWindowDestroyed;
+ pWinPriv->windowUnmapped = SGWindowUnmapped;
+ }
+ }
+ }
+
+ return Success;
+}
+
+/************************************************************************
+ *
+ * Swap Barriers
+ *
+ ************************************************************************/
+
+#define GLX_MAX_SWAP_BARRIERS 10
+
+typedef struct _SwapBarrier *SwapBarrierPtr;
+typedef struct _SwapBarrier {
+ SwapGroupPtr pSwap;
+ SwapBarrierPtr pNext;
+} SwapBarrierRec;
+
+static SwapBarrierPtr SwapBarrierList[GLX_MAX_SWAP_BARRIERS + 1];
+
+void
+SwapBarrierInit(void)
+{
+ int i;
+
+ for (i = 0; i <= GLX_MAX_SWAP_BARRIERS; i++)
+ SwapBarrierList[i] = NULL;
+}
+
+void
+SwapBarrierReset(void)
+{
+ int i;
+
+ for (i = 0; i <= GLX_MAX_SWAP_BARRIERS; i++) {
+ SwapBarrierPtr pBarrier, pNextBarrier;
+
+ for (pBarrier = SwapBarrierList[i]; pBarrier; pBarrier = pNextBarrier) {
+ pNextBarrier = pBarrier->pNext;
+ free(pBarrier);
+ }
+ SwapBarrierList[i] = NULL;
+ }
+}
+
+int
+QueryMaxSwapBarriersSGIX(int screen)
+{
+ return GLX_MAX_SWAP_BARRIERS;
+}
+
+static Bool
+BindSwapGroupToBarrier(GLuint barrier, SwapGroupPtr pSwapGroup)
+{
+ SwapBarrierPtr pBarrier;
+
+ pBarrier = malloc(sizeof(*pBarrier));
+ if (!pBarrier)
+ return FALSE;
+
+ /* Add the swap group to barrier's list */
+ pBarrier->pSwap = pSwapGroup;
+ pBarrier->pNext = SwapBarrierList[barrier];
+ SwapBarrierList[barrier] = pBarrier;
+
+ return TRUE;
+}
+
+static Bool
+UnbindSwapGroupFromBarrier(GLuint barrier, SwapGroupPtr pSwapGroup)
+{
+ SwapBarrierPtr pBarrier, pPrevBarrier;
+
+ /* Find the swap group in barrier's list */
+ for (pBarrier = SwapBarrierList[barrier], pPrevBarrier = NULL;
+ pBarrier && pBarrier->pSwap != pSwapGroup;
+ pPrevBarrier = pBarrier, pBarrier = pBarrier->pNext);
+ if (!pBarrier)
+ return FALSE;
+
+ /* Remove the swap group from barrier's list */
+ if (pPrevBarrier)
+ pPrevBarrier->pNext = pBarrier->pNext;
+ else
+ SwapBarrierList[barrier] = pBarrier->pNext;
+
+ /* Free memory */
+ free(pBarrier);
+
+ return TRUE;
+}
+
+static void
+UpdateSwapBarrierList(GLuint barrier,
+ SwapGroupPtr pOldSwap, SwapGroupPtr pNewSwap)
+{
+ SwapBarrierPtr pBarrier;
+
+ /* If the old swap group is being destroyed, then we need to remove
+ * the swap group from the list entirely */
+ if (!pNewSwap) {
+ UnbindSwapGroupFromBarrier(barrier, pOldSwap);
+ return;
+ }
+
+ /* Otherwise, find the old swap group in the barrier list and change
+ * it to the new swap group */
+ for (pBarrier = SwapBarrierList[barrier];
+ pBarrier; pBarrier = pBarrier->pNext) {
+ if (pBarrier->pSwap == pOldSwap) {
+ pBarrier->pSwap = pNewSwap;
+ return;
+ }
+ }
+}
+
+static Bool
+SwapBarrierIsReadyToSwap(GLuint barrier)
+{
+ SwapBarrierPtr pBarrier;
+ Bool isReady = TRUE;
+
+ /* The swap barier is ready to swap when swap groups that are bound
+ * to barrier are ready to swap */
+ for (pBarrier = SwapBarrierList[barrier];
+ pBarrier; pBarrier = pBarrier->pNext)
+ isReady &= SwapGroupIsReadyToSwap(pBarrier->pSwap);
+
+ return isReady;
+}
+
+static void
+SwapSwapBarrier(GLuint barrier)
+{
+ SwapBarrierPtr pBarrier;
+
+ /* Swap each group that is a member of this barrier */
+ for (pBarrier = SwapBarrierList[barrier];
+ pBarrier; pBarrier = pBarrier->pNext)
+ SwapSwapGroup(pBarrier->pSwap);
+}
+
+int
+BindSwapBarrierSGIX(DrawablePtr pDraw, int barrier)
+{
+ /* FIXME: Check for errors when pDraw->type != DRAWABLE_WINDOW */
+
+ if (barrier < 0 || barrier > GLX_MAX_SWAP_BARRIERS)
+ return BadValue;
+
+ if (pDraw->type == DRAWABLE_WINDOW) {
+ WindowPtr pWin = (WindowPtr) pDraw;
+ dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pWin);
+ SwapGroupPtr pSwapGroup = pWinPriv->swapGroup;
+ SwapGroupPtr pCur;
+
+ if (!pSwapGroup)
+ return BadDrawable;
+ if (barrier && pSwapGroup->barrier)
+ return BadValue;
+
+ /* Update the swap barrier list */
+ if (barrier) {
+ if (!BindSwapGroupToBarrier(barrier, pSwapGroup))
+ return BadAlloc;
+ }
+ else {
+ if (!UnbindSwapGroupFromBarrier(pSwapGroup->barrier, pSwapGroup))
+ return BadDrawable;
+ }
+
+ /* Set the barrier for each member of this swap group */
+ for (pCur = pSwapGroup; pCur; pCur = pCur->pNext)
+ pCur->barrier = barrier;
+ }
+
+ return Success;
+}
diff --git a/xorg-server/hw/dmx/glxProxy/glxutil.c b/xorg-server/hw/dmx/glxProxy/glxutil.c
index 1b9ad6962..f90dbf141 100644
--- a/xorg-server/hw/dmx/glxProxy/glxutil.c
+++ b/xorg-server/hw/dmx/glxProxy/glxutil.c
@@ -1,34 +1,37 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxserver.h"
-#include "glxutil.h"
-
-void __glXNop(void) {}
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#include "glxserver.h"
+#include "glxutil.h"
+
+void
+__glXNop(void)
+{
+}
diff --git a/xorg-server/hw/dmx/glxProxy/glxutil.h b/xorg-server/hw/dmx/glxProxy/glxutil.h
index 15237b258..d3c72862d 100644
--- a/xorg-server/hw/dmx/glxProxy/glxutil.h
+++ b/xorg-server/hw/dmx/glxProxy/glxutil.h
@@ -1,42 +1,41 @@
-#ifndef _glxcmds_h_
-#define _glxcmds_h_
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-extern void __glXNop(void);
-
-/* context helper routines */
-extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag);
-extern DrawablePtr __glXLookupDrawableByTag(__GLXclientState *cl, GLXContextTag tag);
-
-
-#endif /* _glxcmds_h_ */
-
+#ifndef _glxcmds_h_
+#define _glxcmds_h_
+
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+extern void __glXNop(void);
+
+/* context helper routines */
+extern __GLXcontext *__glXLookupContextByTag(__GLXclientState *, GLXContextTag);
+extern DrawablePtr __glXLookupDrawableByTag(__GLXclientState * cl,
+ GLXContextTag tag);
+
+#endif /* _glxcmds_h_ */
diff --git a/xorg-server/hw/dmx/glxProxy/glxvendor.c b/xorg-server/hw/dmx/glxProxy/glxvendor.c
index 0b6ba4134..963c92e87 100644
--- a/xorg-server/hw/dmx/glxProxy/glxvendor.c
+++ b/xorg-server/hw/dmx/glxProxy/glxvendor.c
@@ -67,7 +67,7 @@
dpy->bufptr += SIZEOF(x##name##Req);\
dpy->request++
-#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
+#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
#define GetReqVendorPrivate(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(x/**/name/**/Req)) > dpy->bufmax)\
@@ -78,92 +78,93 @@
dpy->request++
#endif
-extern Display *GetBackEndDisplay( __GLXclientState *cl, int s );
-extern int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s);
+extern Display *GetBackEndDisplay(__GLXclientState * cl, int s);
+extern int GetCurrentBackEndTag(__GLXclientState * cl, GLXContextTag tag,
+ int s);
static int swap_vec_element_size = 0;
-static void SendSwappedReply( ClientPtr client,
- xGLXVendorPrivReply *reply,
- char *buf,
- int buf_size )
+static void
+SendSwappedReply(ClientPtr client,
+ xGLXVendorPrivReply * reply, char *buf, int buf_size)
{
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_SWAP_SHORT(&reply->sequenceNumber);
- __GLX_SWAP_INT(&reply->length);
- __GLX_SWAP_INT(&reply->retval);
- __GLX_SWAP_INT(&reply->size);
-
- if ( (buf_size == 0) && (swap_vec_element_size > 0) ) {
- /*
- * the reply has single component - need to swap pad3
- */
- if (swap_vec_element_size == 2) {
- __GLX_SWAP_SHORT(&reply->pad3);
- }
- else if (swap_vec_element_size == 4) {
- __GLX_SWAP_INT(&reply->pad3);
- __GLX_SWAP_INT(&reply->pad4);
- }
- else if (swap_vec_element_size == 8) {
- __GLX_SWAP_DOUBLE(&reply->pad3);
- }
- }
- else if ( (buf_size > 0) && (swap_vec_element_size > 0) ) {
- /*
- * the reply has vector of elements which needs to be swapped
- */
- int vsize = buf_size / swap_vec_element_size;
- char *p = buf;
- int i;
-
- for (i=0; i<vsize; i++) {
- if (swap_vec_element_size == 2) {
- __GLX_SWAP_SHORT(p);
- }
- else if (swap_vec_element_size == 4) {
- __GLX_SWAP_INT(p);
- }
- else if (swap_vec_element_size == 8) {
- __GLX_SWAP_DOUBLE(p);
- }
-
- p += swap_vec_element_size;
- }
-
- __GLX_SWAP_INT(&reply->pad3);
- __GLX_SWAP_INT(&reply->pad4);
- __GLX_SWAP_INT(&reply->pad5);
- __GLX_SWAP_INT(&reply->pad6);
-
- }
-
- WriteToClient(client, sizeof(xGLXVendorPrivReply),(char *)reply);
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_SWAP_SHORT(&reply->sequenceNumber);
+ __GLX_SWAP_INT(&reply->length);
+ __GLX_SWAP_INT(&reply->retval);
+ __GLX_SWAP_INT(&reply->size);
+
+ if ((buf_size == 0) && (swap_vec_element_size > 0)) {
+ /*
+ * the reply has single component - need to swap pad3
+ */
+ if (swap_vec_element_size == 2) {
+ __GLX_SWAP_SHORT(&reply->pad3);
+ }
+ else if (swap_vec_element_size == 4) {
+ __GLX_SWAP_INT(&reply->pad3);
+ __GLX_SWAP_INT(&reply->pad4);
+ }
+ else if (swap_vec_element_size == 8) {
+ __GLX_SWAP_DOUBLE(&reply->pad3);
+ }
+ }
+ else if ((buf_size > 0) && (swap_vec_element_size > 0)) {
+ /*
+ * the reply has vector of elements which needs to be swapped
+ */
+ int vsize = buf_size / swap_vec_element_size;
+ char *p = buf;
+ int i;
+
+ for (i = 0; i < vsize; i++) {
+ if (swap_vec_element_size == 2) {
+ __GLX_SWAP_SHORT(p);
+ }
+ else if (swap_vec_element_size == 4) {
+ __GLX_SWAP_INT(p);
+ }
+ else if (swap_vec_element_size == 8) {
+ __GLX_SWAP_DOUBLE(p);
+ }
+
+ p += swap_vec_element_size;
+ }
+
+ __GLX_SWAP_INT(&reply->pad3);
+ __GLX_SWAP_INT(&reply->pad4);
+ __GLX_SWAP_INT(&reply->pad5);
+ __GLX_SWAP_INT(&reply->pad6);
+
+ }
+
+ WriteToClient(client, sizeof(xGLXVendorPrivReply), (char *) reply);
if (buf_size > 0)
- WriteToClient(client, buf_size, (char *)buf);
+ WriteToClient(client, buf_size, (char *) buf);
}
-int __glXVForwardSingleReq( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardSingleReq(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- xGLXVendorPrivateReq *be_req;
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *be_req;
__GLXcontext *glxc;
- int from_screen = 0;
- int to_screen = 0;
- int buf_size;
- int s;
+ int from_screen = 0;
+ int to_screen = 0;
+ int buf_size;
+ int s;
glxc = __glXLookupContextByTag(cl, req->contextTag);
if (!glxc) {
- return 0;
+ return 0;
}
from_screen = to_screen = glxc->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
@@ -173,43 +174,44 @@ int __glXVForwardSingleReq( __GLXclientState *cl, GLbyte *pc )
/*
* just forward the request to back-end server(s)
*/
- for (s=from_screen; s<=to_screen; s++) {
- DMXScreenInfo *dmxScreen = &dmxScreens[s];
- Display *dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReqVendorPrivate(GLXVendorPrivate,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->vendorCode = req->vendorCode;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
- UnlockDisplay(dpy);
- SyncHandle();
+ for (s = from_screen; s <= to_screen; s++) {
+ DMXScreenInfo *dmxScreen = &dmxScreens[s];
+ Display *dpy = GetBackEndDisplay(cl, s);
+
+ LockDisplay(dpy);
+ GetReqVendorPrivate(GLXVendorPrivate, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->vendorCode = req->vendorCode;
+ be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *) pc, buf_size);
+ UnlockDisplay(dpy);
+ SyncHandle();
}
return Success;
}
-int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc)
{
- ClientPtr client = cl->client;
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- xGLXVendorPrivateReq *be_req;
- xGLXVendorPrivReply reply;
- xGLXVendorPrivReply be_reply;
+ ClientPtr client = cl->client;
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *be_req;
+ xGLXVendorPrivReply reply;
+ xGLXVendorPrivReply be_reply;
__GLXcontext *glxc;
- int buf_size;
- char *be_buf = NULL;
- int be_buf_size;
- DMXScreenInfo *dmxScreen;
- Display *dpy;
+ int buf_size;
+ char *be_buf = NULL;
+ int be_buf_size;
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
glxc = __glXLookupContextByTag(cl, req->contextTag);
if (!glxc) {
- return __glXBadContext;
+ return __glXBadContext;
}
pc += sz_xGLXVendorPrivateReq;
@@ -222,30 +224,31 @@ int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
* send the request to the first back-end server
*/
LockDisplay(dpy);
- GetReqVendorPrivate(GLXVendorPrivate,be_req);
+ GetReqVendorPrivate(GLXVendorPrivate, be_req);
be_req->reqType = dmxScreen->glxMajorOpcode;
be_req->glxCode = req->glxCode;
be_req->length = req->length;
be_req->vendorCode = req->vendorCode;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag, glxc->pScreen->myNum);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
+ be_req->contextTag =
+ GetCurrentBackEndTag(cl, req->contextTag, glxc->pScreen->myNum);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *) pc, buf_size);
/*
* get the reply from the back-end server
*/
- _XReply(dpy, (xReply*) &be_reply, 0, False);
+ _XReply(dpy, (xReply *) & be_reply, 0, False);
be_buf_size = be_reply.length << 2;
if (be_buf_size > 0) {
- be_buf = (char *)malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- return BadAlloc;
- }
+ be_buf = (char *) malloc(be_buf_size);
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ return BadAlloc;
+ }
}
UnlockDisplay(dpy);
@@ -254,52 +257,54 @@ int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc )
/*
* send the reply to the client
*/
- memcpy( &reply, &be_reply, sz_xGLXVendorPrivReply );
+ memcpy(&reply, &be_reply, sz_xGLXVendorPrivReply);
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
if (client->swapped) {
- SendSwappedReply( client, &reply, be_buf, be_buf_size );
+ SendSwappedReply(client, &reply, be_buf, be_buf_size);
}
else {
- WriteToClient(client, sizeof(xGLXVendorPrivReply),(char *)&reply);
- if (be_buf_size > 0)
- WriteToClient(client, be_buf_size, (char *)be_buf);
+ WriteToClient(client, sizeof(xGLXVendorPrivReply), (char *) &reply);
+ if (be_buf_size > 0)
+ WriteToClient(client, be_buf_size, (char *) be_buf);
}
- if (be_buf_size > 0) free(be_buf);
+ if (be_buf_size > 0)
+ free(be_buf);
return Success;
}
-int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardAllWithReply(__GLXclientState * cl, GLbyte * pc)
{
- ClientPtr client = cl->client;
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- xGLXVendorPrivateReq *be_req;
- xGLXVendorPrivReply reply;
- xGLXVendorPrivReply be_reply;
+ ClientPtr client = cl->client;
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+ xGLXVendorPrivateReq *be_req;
+ xGLXVendorPrivReply reply;
+ xGLXVendorPrivReply be_reply;
__GLXcontext *glxc;
- int buf_size;
- char *be_buf = NULL;
- int be_buf_size = 0;
- int from_screen = 0;
- int to_screen = 0;
- int s;
+ int buf_size;
+ char *be_buf = NULL;
+ int be_buf_size = 0;
+ int from_screen = 0;
+ int to_screen = 0;
+ int s;
- DMXScreenInfo *dmxScreen;
- Display *dpy;
+ DMXScreenInfo *dmxScreen;
+ Display *dpy;
glxc = __glXLookupContextByTag(cl, req->contextTag);
if (!glxc) {
- return 0;
+ return 0;
}
from_screen = to_screen = glxc->pScreen->myNum;
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- from_screen = 0;
- to_screen = screenInfo.numScreens - 1;
+ from_screen = 0;
+ to_screen = screenInfo.numScreens - 1;
}
#endif
@@ -309,277 +314,303 @@ int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc )
/*
* send the request to the first back-end server(s)
*/
- for (s=to_screen; s>=from_screen; s--) {
- dmxScreen = &dmxScreens[s];
- dpy = GetBackEndDisplay(cl,s);
-
- LockDisplay(dpy);
- GetReqVendorPrivate(GLXVendorPrivate,be_req);
- be_req->reqType = dmxScreen->glxMajorOpcode;
- be_req->glxCode = req->glxCode;
- be_req->length = req->length;
- be_req->vendorCode = req->vendorCode;
- be_req->contextTag = GetCurrentBackEndTag(cl,req->contextTag,s);
- if (buf_size > 0)
- _XSend(dpy, (const char *)pc, buf_size);
-
- /*
- * get the reply from the back-end server
- */
- _XReply(dpy, (xReply*) &be_reply, 0, False);
- be_buf_size = be_reply.length << 2;
- if (be_buf_size > 0) {
- be_buf = (char *)malloc( be_buf_size );
- if (be_buf) {
- _XRead(dpy, be_buf, be_buf_size);
- }
- else {
- /* Throw data on the floor */
- _XEatData(dpy, be_buf_size);
- return BadAlloc;
- }
- }
-
- UnlockDisplay(dpy);
- SyncHandle();
-
- if (s > from_screen && be_buf_size > 0) {
- free(be_buf);
- }
+ for (s = to_screen; s >= from_screen; s--) {
+ dmxScreen = &dmxScreens[s];
+ dpy = GetBackEndDisplay(cl, s);
+
+ LockDisplay(dpy);
+ GetReqVendorPrivate(GLXVendorPrivate, be_req);
+ be_req->reqType = dmxScreen->glxMajorOpcode;
+ be_req->glxCode = req->glxCode;
+ be_req->length = req->length;
+ be_req->vendorCode = req->vendorCode;
+ be_req->contextTag = GetCurrentBackEndTag(cl, req->contextTag, s);
+ if (buf_size > 0)
+ _XSend(dpy, (const char *) pc, buf_size);
+
+ /*
+ * get the reply from the back-end server
+ */
+ _XReply(dpy, (xReply *) & be_reply, 0, False);
+ be_buf_size = be_reply.length << 2;
+ if (be_buf_size > 0) {
+ be_buf = (char *) malloc(be_buf_size);
+ if (be_buf) {
+ _XRead(dpy, be_buf, be_buf_size);
+ }
+ else {
+ /* Throw data on the floor */
+ _XEatData(dpy, be_buf_size);
+ return BadAlloc;
+ }
+ }
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+
+ if (s > from_screen && be_buf_size > 0) {
+ free(be_buf);
+ }
}
/*
* send the reply to the client
*/
- memcpy( &reply, &be_reply, sz_xGLXVendorPrivReply );
+ memcpy(&reply, &be_reply, sz_xGLXVendorPrivReply);
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
if (client->swapped) {
- SendSwappedReply( client, &reply, be_buf, be_buf_size );
+ SendSwappedReply(client, &reply, be_buf, be_buf_size);
}
else {
- WriteToClient(client, sizeof(xGLXVendorPrivReply),(char *)&reply);
- if (be_buf_size > 0)
- WriteToClient(client, be_buf_size, (char *)be_buf);
+ WriteToClient(client, sizeof(xGLXVendorPrivReply), (char *) &reply);
+ if (be_buf_size > 0)
+ WriteToClient(client, be_buf_size, (char *) be_buf);
}
- if (be_buf_size > 0) free(be_buf);
+ if (be_buf_size > 0)
+ free(be_buf);
return Success;
}
-int __glXVForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardSingleReqSwap(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
+ __GLX_DECLARE_SWAP_VARIABLES;
- swap_vec_element_size = 0;
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
- return( __glXVForwardSingleReq( cl, pc ) );
+ swap_vec_element_size = 0;
+
+ return (__glXVForwardSingleReq(cl, pc));
}
-int __glXVForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardPipe0WithReplySwap(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardPipe0WithReply( cl, pc ) );
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXVendorPrivateReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXVForwardPipe0WithReply(cl, pc));
}
-int __glXVForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardPipe0WithReplySwapsv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 2;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardPipe0WithReply( cl, pc ) );
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 2;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXVendorPrivateReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXVForwardPipe0WithReply(cl, pc));
}
-int __glXVForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardPipe0WithReplySwapiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 4;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardPipe0WithReply( cl, pc ) );
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 4;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXVendorPrivateReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXVForwardPipe0WithReply(cl, pc));
}
-int __glXVForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardPipe0WithReplySwapdv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 8;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardPipe0WithReply( cl, pc ) );
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 8;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXVendorPrivateReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXVForwardPipe0WithReply(cl, pc));
}
-int __glXVForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardAllWithReplySwap(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 0;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardAllWithReply( cl, pc ) );
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 0;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXVendorPrivateReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXVForwardAllWithReply(cl, pc));
}
-int __glXVForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 2;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardAllWithReply( cl, pc ) );
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 2;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXVendorPrivateReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXVForwardAllWithReply(cl, pc));
}
-int __glXVForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 4;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardAllWithReply( cl, pc ) );
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 4;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXVendorPrivateReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXVForwardAllWithReply(cl, pc));
}
-int __glXVForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc )
+int
+__glXVForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc)
{
- xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc;
- __GLX_DECLARE_SWAP_VARIABLES;
- __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
-
- __GLX_SWAP_SHORT(&req->length);
- __GLX_SWAP_INT(&req->vendorCode);
- __GLX_SWAP_INT(&req->contextTag);
-
- swap_vec_element_size = 8;
-
- /*
- * swap extra data in request - assuming all data
- * (if available) are arrays of 4 bytes components !
- */
- if (req->length > sz_xGLXVendorPrivateReq/4) {
- int *data = (int *)(req+1);
- int count = req->length - sz_xGLXVendorPrivateReq/4;
- __GLX_SWAP_INT_ARRAY(data, count );
- }
-
- return( __glXVForwardAllWithReply( cl, pc ) );
-}
+ xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+ __GLX_DECLARE_SWAP_ARRAY_VARIABLES;
+
+ __GLX_SWAP_SHORT(&req->length);
+ __GLX_SWAP_INT(&req->vendorCode);
+ __GLX_SWAP_INT(&req->contextTag);
+
+ swap_vec_element_size = 8;
+
+ /*
+ * swap extra data in request - assuming all data
+ * (if available) are arrays of 4 bytes components !
+ */
+ if (req->length > sz_xGLXVendorPrivateReq / 4) {
+ int *data = (int *) (req + 1);
+ int count = req->length - sz_xGLXVendorPrivateReq / 4;
+
+ __GLX_SWAP_INT_ARRAY(data, count);
+ }
+
+ return (__glXVForwardAllWithReply(cl, pc));
+}
diff --git a/xorg-server/hw/dmx/glxProxy/glxvendor.h b/xorg-server/hw/dmx/glxProxy/glxvendor.h
index fbc901cef..0d160ab9f 100644
--- a/xorg-server/hw/dmx/glxProxy/glxvendor.h
+++ b/xorg-server/hw/dmx/glxProxy/glxvendor.h
@@ -31,20 +31,23 @@
#ifndef __GLXVENDOR_H
#define __GLXVENDOR_H
-extern int __glXVForwardSingleReq( __GLXclientState *cl, GLbyte *pc );
-extern int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc );
-extern int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc );
+extern int __glXVForwardSingleReq(__GLXclientState * cl, GLbyte * pc);
+extern int __glXVForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc);
+extern int __glXVForwardAllWithReply(__GLXclientState * cl, GLbyte * pc);
-extern int __glXVForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc );
+extern int __glXVForwardSingleReqSwap(__GLXclientState * cl, GLbyte * pc);
-extern int __glXVForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc );
-extern int __glXVForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc );
-extern int __glXVForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc );
-extern int __glXVForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc );
+extern int __glXVForwardPipe0WithReplySwap(__GLXclientState * cl, GLbyte * pc);
+extern int __glXVForwardPipe0WithReplySwapsv(__GLXclientState * cl,
+ GLbyte * pc);
+extern int __glXVForwardPipe0WithReplySwapiv(__GLXclientState * cl,
+ GLbyte * pc);
+extern int __glXVForwardPipe0WithReplySwapdv(__GLXclientState * cl,
+ GLbyte * pc);
-extern int __glXVForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc );
-extern int __glXVForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc );
-extern int __glXVForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc );
-extern int __glXVForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc );
+extern int __glXVForwardAllWithReplySwap(__GLXclientState * cl, GLbyte * pc);
+extern int __glXVForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc);
+extern int __glXVForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc);
+extern int __glXVForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc);
#endif
diff --git a/xorg-server/hw/dmx/glxProxy/glxvisuals.c b/xorg-server/hw/dmx/glxProxy/glxvisuals.c
index ae5e86772..3fca04f0d 100644
--- a/xorg-server/hw/dmx/glxProxy/glxvisuals.c
+++ b/xorg-server/hw/dmx/glxProxy/glxvisuals.c
@@ -1,152 +1,158 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifdef HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "glxserver.h"
-#include "glxvisuals.h"
-
-int glxVisualsMatch( __GLXvisualConfig *v1, __GLXvisualConfig *v2 )
-{
- if ( (v1->class == v2->class) &&
- (v1->rgba == v2->rgba) &&
- (v1->redSize == v2->redSize) &&
- (v1->greenSize == v2->greenSize) &&
- (v1->blueSize == v2->blueSize) &&
- (v1->alphaSize == v2->alphaSize) &&
- (v1->redMask == v2->redMask) &&
- (v1->greenMask == v2->greenMask) &&
- (v1->blueMask == v2->blueMask) &&
- (v1->alphaMask == v2->alphaMask) &&
- (v1->accumRedSize == v2->accumRedSize) &&
- (v1->accumGreenSize == v2->accumGreenSize) &&
- (v1->accumBlueSize == v2->accumBlueSize) &&
- (v1->accumAlphaSize == v2->accumAlphaSize) &&
- (v1->doubleBuffer == v2->doubleBuffer) &&
- (v1->stereo == v2->stereo) &&
- (v1->bufferSize == v2->bufferSize) &&
- (v1->depthSize == v2->depthSize) &&
- (v1->stencilSize == v2->stencilSize) &&
- (v1->auxBuffers == v2->auxBuffers) &&
- (v1->level == v2->level) &&
- (v1->visualRating == v2->visualRating) &&
- (v1->transparentPixel == v2->transparentPixel) &&
- (v1->transparentRed == v2->transparentRed) &&
- (v1->transparentGreen == v2->transparentGreen) &&
- (v1->transparentBlue == v2->transparentBlue) &&
- (v1->transparentAlpha == v2->transparentAlpha) &&
- (v1->transparentIndex == v2->transparentIndex) &&
- (v1->multiSampleSize == v2->multiSampleSize) &&
- (v1->nMultiSampleBuffers == v2->nMultiSampleBuffers) &&
- (v1->visualSelectGroup == v2->visualSelectGroup) ) {
-
- return 1;
-
- }
-
- return 0;
-
-}
-
-VisualID glxMatchGLXVisualInConfigList( __GLXvisualConfig *pGlxVisual, __GLXvisualConfig *configs, int nconfigs )
-{
- int i;
-
- for (i=0; i<nconfigs; i++) {
-
- if (glxVisualsMatch( pGlxVisual, &configs[i] )) {
-
- return configs[i].vid;
-
- }
- }
-
- return 0;
-}
-
-VisualID glxMatchVisualInConfigList( ScreenPtr pScreen, VisualPtr pVisual, __GLXvisualConfig *configs, int nconfigs )
-{
- __GLXscreenInfo *pGlxScreen;
- __GLXvisualConfig *pGlxVisual;
- int i;
-
- /* check that the glx extension has been initialized */
- if ( !__glXActiveScreens )
- return 0;
-
- pGlxScreen = &__glXActiveScreens[pScreen->myNum];
- pGlxVisual = pGlxScreen->pGlxVisual;
-
- /* find the glx visual info for pVisual */
- for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
- if (pGlxVisual->vid == pVisual->vid) {
- break;
- }
- }
- if (i == pGlxScreen->numVisuals) {
- /*
- * the visual is not supported by glx
- */
- return 0;
- }
-
- return( glxMatchGLXVisualInConfigList(pGlxVisual, configs, nconfigs) );
-}
-
-VisualPtr glxMatchVisual( ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatchScreen )
-{
- __GLXscreenInfo *pGlxScreen2;
- int j;
- VisualID vid;
-
- /* check that the glx extension has been initialized */
- if ( !__glXActiveScreens )
- return NULL;
-
- pGlxScreen2 = &__glXActiveScreens[pMatchScreen->myNum];
-
- vid = glxMatchVisualInConfigList( pScreen, pVisual,
- pGlxScreen2->pGlxVisual,
- pGlxScreen2->numVisuals );
- if (vid) {
- /*
- * find the X visual of the matching glx visual
- */
- for (j=0; j<pMatchScreen->numVisuals; j++) {
- if (vid == pMatchScreen->visuals[j].vid) {
- return &pMatchScreen->visuals[j];
- }
- }
- }
-
- return 0;
-}
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#ifdef HAVE_DMX_CONFIG_H
+#include <dmx-config.h>
+#endif
+
+#include "glxserver.h"
+#include "glxvisuals.h"
+
+int
+glxVisualsMatch(__GLXvisualConfig * v1, __GLXvisualConfig * v2)
+{
+ if ((v1->class == v2->class) &&
+ (v1->rgba == v2->rgba) &&
+ (v1->redSize == v2->redSize) &&
+ (v1->greenSize == v2->greenSize) &&
+ (v1->blueSize == v2->blueSize) &&
+ (v1->alphaSize == v2->alphaSize) &&
+ (v1->redMask == v2->redMask) &&
+ (v1->greenMask == v2->greenMask) &&
+ (v1->blueMask == v2->blueMask) &&
+ (v1->alphaMask == v2->alphaMask) &&
+ (v1->accumRedSize == v2->accumRedSize) &&
+ (v1->accumGreenSize == v2->accumGreenSize) &&
+ (v1->accumBlueSize == v2->accumBlueSize) &&
+ (v1->accumAlphaSize == v2->accumAlphaSize) &&
+ (v1->doubleBuffer == v2->doubleBuffer) &&
+ (v1->stereo == v2->stereo) &&
+ (v1->bufferSize == v2->bufferSize) &&
+ (v1->depthSize == v2->depthSize) &&
+ (v1->stencilSize == v2->stencilSize) &&
+ (v1->auxBuffers == v2->auxBuffers) &&
+ (v1->level == v2->level) &&
+ (v1->visualRating == v2->visualRating) &&
+ (v1->transparentPixel == v2->transparentPixel) &&
+ (v1->transparentRed == v2->transparentRed) &&
+ (v1->transparentGreen == v2->transparentGreen) &&
+ (v1->transparentBlue == v2->transparentBlue) &&
+ (v1->transparentAlpha == v2->transparentAlpha) &&
+ (v1->transparentIndex == v2->transparentIndex) &&
+ (v1->multiSampleSize == v2->multiSampleSize) &&
+ (v1->nMultiSampleBuffers == v2->nMultiSampleBuffers) &&
+ (v1->visualSelectGroup == v2->visualSelectGroup)) {
+
+ return 1;
+
+ }
+
+ return 0;
+
+}
+
+VisualID
+glxMatchGLXVisualInConfigList(__GLXvisualConfig * pGlxVisual,
+ __GLXvisualConfig * configs, int nconfigs)
+{
+ int i;
+
+ for (i = 0; i < nconfigs; i++) {
+
+ if (glxVisualsMatch(pGlxVisual, &configs[i])) {
+
+ return configs[i].vid;
+
+ }
+ }
+
+ return 0;
+}
+
+VisualID
+glxMatchVisualInConfigList(ScreenPtr pScreen, VisualPtr pVisual,
+ __GLXvisualConfig * configs, int nconfigs)
+{
+ __GLXscreenInfo *pGlxScreen;
+ __GLXvisualConfig *pGlxVisual;
+ int i;
+
+ /* check that the glx extension has been initialized */
+ if (!__glXActiveScreens)
+ return 0;
+
+ pGlxScreen = &__glXActiveScreens[pScreen->myNum];
+ pGlxVisual = pGlxScreen->pGlxVisual;
+
+ /* find the glx visual info for pVisual */
+ for (i = 0; i < pGlxScreen->numVisuals; i++, pGlxVisual++) {
+ if (pGlxVisual->vid == pVisual->vid) {
+ break;
+ }
+ }
+ if (i == pGlxScreen->numVisuals) {
+ /*
+ * the visual is not supported by glx
+ */
+ return 0;
+ }
+
+ return (glxMatchGLXVisualInConfigList(pGlxVisual, configs, nconfigs));
+}
+
+VisualPtr
+glxMatchVisual(ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatchScreen)
+{
+ __GLXscreenInfo *pGlxScreen2;
+ int j;
+ VisualID vid;
+
+ /* check that the glx extension has been initialized */
+ if (!__glXActiveScreens)
+ return NULL;
+
+ pGlxScreen2 = &__glXActiveScreens[pMatchScreen->myNum];
+
+ vid = glxMatchVisualInConfigList(pScreen, pVisual,
+ pGlxScreen2->pGlxVisual,
+ pGlxScreen2->numVisuals);
+ if (vid) {
+ /*
+ * find the X visual of the matching glx visual
+ */
+ for (j = 0; j < pMatchScreen->numVisuals; j++) {
+ if (vid == pMatchScreen->visuals[j].vid) {
+ return &pMatchScreen->visuals[j];
+ }
+ }
+ }
+
+ return 0;
+}
diff --git a/xorg-server/hw/dmx/glxProxy/glxvisuals.h b/xorg-server/hw/dmx/glxProxy/glxvisuals.h
index 4245313ba..e1e023878 100644
--- a/xorg-server/hw/dmx/glxProxy/glxvisuals.h
+++ b/xorg-server/hw/dmx/glxProxy/glxvisuals.h
@@ -1,42 +1,46 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#ifndef _GLX_VISUALS_H
-#define _GLX_VISUALS_H
-
-int glxVisualsMatch( __GLXvisualConfig *v1, __GLXvisualConfig *v2 );
-
-VisualID glxMatchGLXVisualInConfigList( __GLXvisualConfig *pGlxVisual, __GLXvisualConfig *configs, int nconfigs );
-
-VisualID glxMatchVisualInConfigList( ScreenPtr pScreen, VisualPtr pVisual, __GLXvisualConfig *configs, int nconfigs );
-
-VisualPtr glxMatchVisual( ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatchScreen );
-
-#endif
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#ifndef _GLX_VISUALS_H
+#define _GLX_VISUALS_H
+
+int glxVisualsMatch(__GLXvisualConfig * v1, __GLXvisualConfig * v2);
+
+VisualID glxMatchGLXVisualInConfigList(__GLXvisualConfig * pGlxVisual,
+ __GLXvisualConfig * configs,
+ int nconfigs);
+
+VisualID glxMatchVisualInConfigList(ScreenPtr pScreen, VisualPtr pVisual,
+ __GLXvisualConfig * configs, int nconfigs);
+
+VisualPtr glxMatchVisual(ScreenPtr pScreen, VisualPtr pVisual,
+ ScreenPtr pMatchScreen);
+
+#endif
diff --git a/xorg-server/hw/dmx/glxProxy/render2swap.c b/xorg-server/hw/dmx/glxProxy/render2swap.c
index da9b565de..166ec8882 100644
--- a/xorg-server/hw/dmx/glxProxy/render2swap.c
+++ b/xorg-server/hw/dmx/glxProxy/render2swap.c
@@ -32,7 +32,8 @@
#include "unpack.h"
#include "g_disptab.h"
-static GLint __glEvalComputeK(GLenum target)
+static GLint
+__glEvalComputeK(GLenum target)
{
switch (target) {
case GL_MAP1_VERTEX_4:
@@ -41,33 +42,35 @@ static GLint __glEvalComputeK(GLenum target)
case GL_MAP2_VERTEX_4:
case GL_MAP2_COLOR_4:
case GL_MAP2_TEXTURE_COORD_4:
- return 4;
+ return 4;
case GL_MAP1_VERTEX_3:
case GL_MAP1_TEXTURE_COORD_3:
case GL_MAP1_NORMAL:
case GL_MAP2_VERTEX_3:
case GL_MAP2_TEXTURE_COORD_3:
case GL_MAP2_NORMAL:
- return 3;
+ return 3;
case GL_MAP1_TEXTURE_COORD_2:
case GL_MAP2_TEXTURE_COORD_2:
- return 2;
+ return 2;
case GL_MAP1_TEXTURE_COORD_1:
case GL_MAP2_TEXTURE_COORD_1:
case GL_MAP1_INDEX:
case GL_MAP2_INDEX:
- return 1;
+ return 1;
default:
- return 0;
+ return 0;
}
}
-void __glXDispSwap_Map1f(GLbyte *pc)
+void
+__glXDispSwap_Map1f(GLbyte * pc)
{
GLint order, k;
GLfloat u1, u2, *points;
GLenum target;
GLint compsize;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
@@ -75,30 +78,33 @@ void __glXDispSwap_Map1f(GLbyte *pc)
__GLX_SWAP_INT(pc + 12);
__GLX_SWAP_FLOAT(pc + 4);
__GLX_SWAP_FLOAT(pc + 8);
-
- target = *(GLenum *)(pc + 0);
- order = *(GLint *)(pc + 12);
- u1 = *(GLfloat *)(pc + 4);
- u2 = *(GLfloat *)(pc + 8);
- points = (GLfloat *)(pc + 16);
+
+ target = *(GLenum *) (pc + 0);
+ order = *(GLint *) (pc + 12);
+ u1 = *(GLfloat *) (pc + 4);
+ u2 = *(GLfloat *) (pc + 8);
+ points = (GLfloat *) (pc + 16);
k = __glEvalComputeK(target);
if (order <= 0 || k < 0) {
- /* Erroneous command. */
- compsize = 0;
- } else {
- compsize = order * k;
+ /* Erroneous command. */
+ compsize = 0;
+ }
+ else {
+ compsize = order * k;
}
__GLX_SWAP_FLOAT_ARRAY(points, compsize);
}
-void __glXDispSwap_Map2f(GLbyte *pc)
+void
+__glXDispSwap_Map2f(GLbyte * pc)
{
GLint uorder, vorder, ustride, vstride, k;
GLfloat u1, u2, v1, v2, *points;
GLenum target;
GLint compsize;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
@@ -109,35 +115,38 @@ void __glXDispSwap_Map2f(GLbyte *pc)
__GLX_SWAP_FLOAT(pc + 8);
__GLX_SWAP_FLOAT(pc + 16);
__GLX_SWAP_FLOAT(pc + 20);
-
- target = *(GLenum *)(pc + 0);
- uorder = *(GLint *)(pc + 12);
- vorder = *(GLint *)(pc + 24);
- u1 = *(GLfloat *)(pc + 4);
- u2 = *(GLfloat *)(pc + 8);
- v1 = *(GLfloat *)(pc + 16);
- v2 = *(GLfloat *)(pc + 20);
- points = (GLfloat *)(pc + 28);
+
+ target = *(GLenum *) (pc + 0);
+ uorder = *(GLint *) (pc + 12);
+ vorder = *(GLint *) (pc + 24);
+ u1 = *(GLfloat *) (pc + 4);
+ u2 = *(GLfloat *) (pc + 8);
+ v1 = *(GLfloat *) (pc + 16);
+ v2 = *(GLfloat *) (pc + 20);
+ points = (GLfloat *) (pc + 28);
k = __glEvalComputeK(target);
ustride = vorder * k;
vstride = k;
if (vorder <= 0 || uorder <= 0 || k < 0) {
- /* Erroneous command. */
- compsize = 0;
- } else {
- compsize = uorder * vorder * k;
+ /* Erroneous command. */
+ compsize = 0;
+ }
+ else {
+ compsize = uorder * vorder * k;
}
__GLX_SWAP_FLOAT_ARRAY(points, compsize);
}
-void __glXDispSwap_Map1d(GLbyte *pc)
+void
+__glXDispSwap_Map1d(GLbyte * pc)
{
GLint order, k, compsize;
GLenum target;
GLdouble u1, u2, *points;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
@@ -146,41 +155,45 @@ void __glXDispSwap_Map1d(GLbyte *pc)
__GLX_SWAP_INT(pc + 16);
__GLX_SWAP_INT(pc + 20);
- target = *(GLenum*) (pc + 16);
- order = *(GLint*) (pc + 20);
+ target = *(GLenum *) (pc + 16);
+ order = *(GLint *) (pc + 20);
k = __glEvalComputeK(target);
if (order <= 0 || k < 0) {
- /* Erroneous command. */
- compsize = 0;
- } else {
- compsize = order * k;
+ /* Erroneous command. */
+ compsize = 0;
}
- __GLX_GET_DOUBLE(u1,pc);
- __GLX_GET_DOUBLE(u2,pc+8);
- __GLX_SWAP_DOUBLE_ARRAY(pc+24, compsize);
+ else {
+ compsize = order * k;
+ }
+ __GLX_GET_DOUBLE(u1, pc);
+ __GLX_GET_DOUBLE(u2, pc + 8);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 24, compsize);
pc += 24;
#ifdef __GLX_ALIGN64
- if (((unsigned long)pc) & 7) {
- /*
- ** Copy the doubles up 4 bytes, trashing the command but aligning
- ** the data in the process
- */
- __GLX_MEM_COPY(pc-4, pc, compsize*8);
- points = (GLdouble*) (pc - 4);
- } else {
- points = (GLdouble*) pc;
+ if (((unsigned long) pc) & 7) {
+ /*
+ ** Copy the doubles up 4 bytes, trashing the command but aligning
+ ** the data in the process
+ */
+ __GLX_MEM_COPY(pc - 4, pc, compsize * 8);
+ points = (GLdouble *) (pc - 4);
+ }
+ else {
+ points = (GLdouble *) pc;
}
#else
- points = (GLdouble*) pc;
+ points = (GLdouble *) pc;
#endif
}
-void __glXDispSwap_Map2d(GLbyte *pc)
+void
+__glXDispSwap_Map2d(GLbyte * pc)
{
GLdouble u1, u2, v1, v2, *points;
GLint uorder, vorder, ustride, vstride, k, compsize;
GLenum target;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
@@ -192,80 +205,86 @@ void __glXDispSwap_Map2d(GLbyte *pc)
__GLX_SWAP_INT(pc + 36);
__GLX_SWAP_INT(pc + 40);
- target = *(GLenum *)(pc + 32);
- uorder = *(GLint *)(pc + 36);
- vorder = *(GLint *)(pc + 40);
+ target = *(GLenum *) (pc + 32);
+ uorder = *(GLint *) (pc + 36);
+ vorder = *(GLint *) (pc + 40);
k = __glEvalComputeK(target);
if (vorder <= 0 || uorder <= 0 || k < 0) {
- /* Erroneous command. */
- compsize = 0;
- } else {
- compsize = uorder * vorder * k;
+ /* Erroneous command. */
+ compsize = 0;
+ }
+ else {
+ compsize = uorder * vorder * k;
}
- __GLX_GET_DOUBLE(u1,pc);
- __GLX_GET_DOUBLE(u2,pc+8);
- __GLX_GET_DOUBLE(v1,pc+16);
- __GLX_GET_DOUBLE(v2,pc+24);
- __GLX_SWAP_DOUBLE_ARRAY(pc+44, compsize);
+ __GLX_GET_DOUBLE(u1, pc);
+ __GLX_GET_DOUBLE(u2, pc + 8);
+ __GLX_GET_DOUBLE(v1, pc + 16);
+ __GLX_GET_DOUBLE(v2, pc + 24);
+ __GLX_SWAP_DOUBLE_ARRAY(pc + 44, compsize);
pc += 44;
ustride = vorder * k;
vstride = k;
#ifdef __GLX_ALIGN64
- if (((unsigned long)pc) & 7) {
- /*
- ** Copy the doubles up 4 bytes, trashing the command but aligning
- ** the data in the process
- */
- __GLX_MEM_COPY(pc-4, pc, compsize*8);
- points = (GLdouble*) (pc - 4);
- } else {
- points = (GLdouble*) pc;
+ if (((unsigned long) pc) & 7) {
+ /*
+ ** Copy the doubles up 4 bytes, trashing the command but aligning
+ ** the data in the process
+ */
+ __GLX_MEM_COPY(pc - 4, pc, compsize * 8);
+ points = (GLdouble *) (pc - 4);
+ }
+ else {
+ points = (GLdouble *) pc;
}
#else
- points = (GLdouble*) pc;
+ points = (GLdouble *) pc;
#endif
}
-void __glXDispSwap_CallLists(GLbyte *pc)
+void
+__glXDispSwap_CallLists(GLbyte * pc)
{
GLenum type;
GLsizei n;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_DECLARE_SWAP_ARRAY_VARIABLES;
__GLX_SWAP_INT(pc + 4);
__GLX_SWAP_INT(pc + 0);
- type = *(GLenum *)(pc + 4);
- n = *(GLsizei *)(pc + 0);
+ type = *(GLenum *) (pc + 4);
+ n = *(GLsizei *) (pc + 0);
switch (type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- case GL_2_BYTES:
- case GL_3_BYTES:
- case GL_4_BYTES:
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- __GLX_SWAP_SHORT_ARRAY(pc+8, n);
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- __GLX_SWAP_INT_ARRAY(pc+8, n);
- break;
- case GL_FLOAT:
- __GLX_SWAP_FLOAT_ARRAY(pc+8, n);
- break;
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ case GL_2_BYTES:
+ case GL_3_BYTES:
+ case GL_4_BYTES:
+ break;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ __GLX_SWAP_SHORT_ARRAY(pc + 8, n);
+ break;
+ case GL_INT:
+ case GL_UNSIGNED_INT:
+ __GLX_SWAP_INT_ARRAY(pc + 8, n);
+ break;
+ case GL_FLOAT:
+ __GLX_SWAP_FLOAT_ARRAY(pc + 8, n);
+ break;
}
}
-void __glXDispSwap_DrawArrays(GLbyte *pc)
+void
+__glXDispSwap_DrawArrays(GLbyte * pc)
{
- __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *)pc;
+ __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc;
__GLXdispatchDrawArraysComponentHeader *compHeader;
int i;
+
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_INT(&hdr->numVertexes);
@@ -276,10 +295,10 @@ void __glXDispSwap_DrawArrays(GLbyte *pc)
compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc;
/* compute stride (same for all component arrays) */
- for (i=0; i<hdr->numComponents; i++) {
- __GLX_SWAP_INT(&compHeader[i].datatype);
- __GLX_SWAP_INT(&compHeader[i].numVals);
- __GLX_SWAP_INT(&compHeader[i].component);
+ for (i = 0; i < hdr->numComponents; i++) {
+ __GLX_SWAP_INT(&compHeader[i].datatype);
+ __GLX_SWAP_INT(&compHeader[i].numVals);
+ __GLX_SWAP_INT(&compHeader[i].component);
}
diff --git a/xorg-server/hw/dmx/glxProxy/renderpixswap.c b/xorg-server/hw/dmx/glxProxy/renderpixswap.c
index e0ed7e77d..3458e611c 100644
--- a/xorg-server/hw/dmx/glxProxy/renderpixswap.c
+++ b/xorg-server/hw/dmx/glxProxy/renderpixswap.c
@@ -1,383 +1,406 @@
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * shall be included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
- * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * Except as contained in this notice, the name of Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#include "glxserver.h"
-#include "unpack.h"
-#include "g_disptab.h"
-
-void __glXDispSwap_PolygonStipple(GLbyte *pc)
-{
- __GLXpixelHeader *hdr = (__GLXpixelHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_Bitmap(GLbyte *pc)
-{
- __GLXdispatchBitmapHeader *hdr = (__GLXdispatchBitmapHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->height);
- __GLX_SWAP_FLOAT((GLbyte *)&hdr->xorig);
- __GLX_SWAP_FLOAT((GLbyte *)&hdr->yorig);
- __GLX_SWAP_FLOAT((GLbyte *)&hdr->xmove);
- __GLX_SWAP_FLOAT((GLbyte *)&hdr->ymove);
-
- hdr->swapBytes = !hdr->swapBytes;
-
-}
-
-void __glXDispSwap_TexImage1D(GLbyte *pc)
-{
- __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->level);
- __GLX_SWAP_INT((GLbyte *)&hdr->components);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->height);
- __GLX_SWAP_INT((GLbyte *)&hdr->border);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_TexImage2D(GLbyte *pc)
-{
- __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->level);
- __GLX_SWAP_INT((GLbyte *)&hdr->components);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->height);
- __GLX_SWAP_INT((GLbyte *)&hdr->border);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_TexImage3D(GLbyte *pc)
-{
- __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->imageHeight);
- __GLX_SWAP_INT((GLbyte *)&hdr->imageDepth);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipImages);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipVolumes);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->level);
- __GLX_SWAP_INT((GLbyte *)&hdr->internalformat);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->height);
- __GLX_SWAP_INT((GLbyte *)&hdr->depth);
- __GLX_SWAP_INT((GLbyte *)&hdr->size4d);
- __GLX_SWAP_INT((GLbyte *)&hdr->border);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_DrawPixels(GLbyte *pc)
-{
- __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->height);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_TexSubImage1D(GLbyte *pc)
-{
- __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->level);
- __GLX_SWAP_INT((GLbyte *)&hdr->xoffset);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_TexSubImage2D(GLbyte *pc)
-{
- __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->level);
- __GLX_SWAP_INT((GLbyte *)&hdr->xoffset);
- __GLX_SWAP_INT((GLbyte *)&hdr->yoffset);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->height);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_TexSubImage3D(GLbyte *pc)
-{
- __GLXdispatchTexSubImage3DHeader *hdr =
- (__GLXdispatchTexSubImage3DHeader *) pc;
-
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->imageHeight);
- __GLX_SWAP_INT((GLbyte *)&hdr->imageDepth);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipImages);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipVolumes);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->level);
- __GLX_SWAP_INT((GLbyte *)&hdr->xoffset);
- __GLX_SWAP_INT((GLbyte *)&hdr->yoffset);
- __GLX_SWAP_INT((GLbyte *)&hdr->zoffset);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->height);
- __GLX_SWAP_INT((GLbyte *)&hdr->depth);
- __GLX_SWAP_INT((GLbyte *)&hdr->size4d);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_ColorTable(GLbyte *pc)
-{
- __GLXdispatchColorTableHeader *hdr =
- (__GLXdispatchColorTableHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->internalformat);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_ColorSubTable(GLbyte *pc)
-{
- __GLXdispatchColorSubTableHeader *hdr =
- (__GLXdispatchColorSubTableHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->start);
- __GLX_SWAP_INT((GLbyte *)&hdr->count);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_ConvolutionFilter1D(GLbyte *pc)
-{
- __GLXdispatchConvolutionFilterHeader *hdr =
- (__GLXdispatchConvolutionFilterHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->internalformat);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_ConvolutionFilter2D(GLbyte *pc)
-{
- __GLXdispatchConvolutionFilterHeader *hdr =
- (__GLXdispatchConvolutionFilterHeader *) pc;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->internalformat);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->height);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
-
-void __glXDispSwap_SeparableFilter2D(GLbyte *pc)
-{
- __GLXdispatchConvolutionFilterHeader *hdr =
- (__GLXdispatchConvolutionFilterHeader *) pc;
- GLint hdrlen;
- __GLX_DECLARE_SWAP_VARIABLES;
-
- hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->rowLength);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipRows);
- __GLX_SWAP_INT((GLbyte *)&hdr->skipPixels);
- __GLX_SWAP_INT((GLbyte *)&hdr->alignment);
-
- __GLX_SWAP_INT((GLbyte *)&hdr->target);
- __GLX_SWAP_INT((GLbyte *)&hdr->internalformat);
- __GLX_SWAP_INT((GLbyte *)&hdr->width);
- __GLX_SWAP_INT((GLbyte *)&hdr->height);
- __GLX_SWAP_INT((GLbyte *)&hdr->format);
- __GLX_SWAP_INT((GLbyte *)&hdr->type);
-
- /*
- ** Just invert swapBytes flag; the GL will figure out if it needs to swap
- ** the pixel data.
- */
- hdr->swapBytes = !hdr->swapBytes;
-}
+/*
+ * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+ * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice including the dates of first publication and
+ * either this permission notice or a reference to
+ * http://oss.sgi.com/projects/FreeB/
+ * shall be included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+ * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * Except as contained in this notice, the name of Silicon Graphics, Inc.
+ * shall not be used in advertising or otherwise to promote the sale, use or
+ * other dealings in this Software without prior written authorization from
+ * Silicon Graphics, Inc.
+ */
+
+#include "glxserver.h"
+#include "unpack.h"
+#include "g_disptab.h"
+
+void
+__glXDispSwap_PolygonStipple(GLbyte * pc)
+{
+ __GLXpixelHeader *hdr = (__GLXpixelHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_Bitmap(GLbyte * pc)
+{
+ __GLXdispatchBitmapHeader *hdr = (__GLXdispatchBitmapHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->height);
+ __GLX_SWAP_FLOAT((GLbyte *) & hdr->xorig);
+ __GLX_SWAP_FLOAT((GLbyte *) & hdr->yorig);
+ __GLX_SWAP_FLOAT((GLbyte *) & hdr->xmove);
+ __GLX_SWAP_FLOAT((GLbyte *) & hdr->ymove);
+
+ hdr->swapBytes = !hdr->swapBytes;
+
+}
+
+void
+__glXDispSwap_TexImage1D(GLbyte * pc)
+{
+ __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->level);
+ __GLX_SWAP_INT((GLbyte *) & hdr->components);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->height);
+ __GLX_SWAP_INT((GLbyte *) & hdr->border);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_TexImage2D(GLbyte * pc)
+{
+ __GLXdispatchTexImageHeader *hdr = (__GLXdispatchTexImageHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->level);
+ __GLX_SWAP_INT((GLbyte *) & hdr->components);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->height);
+ __GLX_SWAP_INT((GLbyte *) & hdr->border);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_TexImage3D(GLbyte * pc)
+{
+ __GLXdispatchTexImage3DHeader *hdr = (__GLXdispatchTexImage3DHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->imageHeight);
+ __GLX_SWAP_INT((GLbyte *) & hdr->imageDepth);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipImages);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipVolumes);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->level);
+ __GLX_SWAP_INT((GLbyte *) & hdr->internalformat);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->height);
+ __GLX_SWAP_INT((GLbyte *) & hdr->depth);
+ __GLX_SWAP_INT((GLbyte *) & hdr->size4d);
+ __GLX_SWAP_INT((GLbyte *) & hdr->border);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_DrawPixels(GLbyte * pc)
+{
+ __GLXdispatchDrawPixelsHeader *hdr = (__GLXdispatchDrawPixelsHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->height);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_TexSubImage1D(GLbyte * pc)
+{
+ __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->level);
+ __GLX_SWAP_INT((GLbyte *) & hdr->xoffset);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_TexSubImage2D(GLbyte * pc)
+{
+ __GLXdispatchTexSubImageHeader *hdr = (__GLXdispatchTexSubImageHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->level);
+ __GLX_SWAP_INT((GLbyte *) & hdr->xoffset);
+ __GLX_SWAP_INT((GLbyte *) & hdr->yoffset);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->height);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_TexSubImage3D(GLbyte * pc)
+{
+ __GLXdispatchTexSubImage3DHeader *hdr =
+ (__GLXdispatchTexSubImage3DHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->imageHeight);
+ __GLX_SWAP_INT((GLbyte *) & hdr->imageDepth);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipImages);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipVolumes);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->level);
+ __GLX_SWAP_INT((GLbyte *) & hdr->xoffset);
+ __GLX_SWAP_INT((GLbyte *) & hdr->yoffset);
+ __GLX_SWAP_INT((GLbyte *) & hdr->zoffset);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->height);
+ __GLX_SWAP_INT((GLbyte *) & hdr->depth);
+ __GLX_SWAP_INT((GLbyte *) & hdr->size4d);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_ColorTable(GLbyte * pc)
+{
+ __GLXdispatchColorTableHeader *hdr = (__GLXdispatchColorTableHeader *) pc;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->internalformat);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_ColorSubTable(GLbyte * pc)
+{
+ __GLXdispatchColorSubTableHeader *hdr =
+ (__GLXdispatchColorSubTableHeader *) pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->start);
+ __GLX_SWAP_INT((GLbyte *) & hdr->count);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
+{
+ __GLXdispatchConvolutionFilterHeader *hdr =
+ (__GLXdispatchConvolutionFilterHeader *) pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->internalformat);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_ConvolutionFilter2D(GLbyte * pc)
+{
+ __GLXdispatchConvolutionFilterHeader *hdr =
+ (__GLXdispatchConvolutionFilterHeader *) pc;
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->internalformat);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->height);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}
+
+void
+__glXDispSwap_SeparableFilter2D(GLbyte * pc)
+{
+ __GLXdispatchConvolutionFilterHeader *hdr =
+ (__GLXdispatchConvolutionFilterHeader *) pc;
+ GLint hdrlen;
+
+ __GLX_DECLARE_SWAP_VARIABLES;
+
+ hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->rowLength);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipRows);
+ __GLX_SWAP_INT((GLbyte *) & hdr->skipPixels);
+ __GLX_SWAP_INT((GLbyte *) & hdr->alignment);
+
+ __GLX_SWAP_INT((GLbyte *) & hdr->target);
+ __GLX_SWAP_INT((GLbyte *) & hdr->internalformat);
+ __GLX_SWAP_INT((GLbyte *) & hdr->width);
+ __GLX_SWAP_INT((GLbyte *) & hdr->height);
+ __GLX_SWAP_INT((GLbyte *) & hdr->format);
+ __GLX_SWAP_INT((GLbyte *) & hdr->type);
+
+ /*
+ ** Just invert swapBytes flag; the GL will figure out if it needs to swap
+ ** the pixel data.
+ */
+ hdr->swapBytes = !hdr->swapBytes;
+}