aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/glx/indirect_reqsize.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/glx/indirect_reqsize.c')
-rwxr-xr-x[-rw-r--r--]xorg-server/glx/indirect_reqsize.c509
1 files changed, 279 insertions, 230 deletions
diff --git a/xorg-server/glx/indirect_reqsize.c b/xorg-server/glx/indirect_reqsize.c
index 020aae2fe..d1af3c2a8 100644..100755
--- a/xorg-server/glx/indirect_reqsize.c
+++ b/xorg-server/glx/indirect_reqsize.c
@@ -3,18 +3,18 @@
/*
* (C) Copyright IBM Corporation 2005
* 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, sub license,
* 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
@@ -25,6 +25,15 @@
* SOFTWARE.
*/
+
+#ifdef HAVE_DIX_CONFIG_H
+#include <dix-config.h>
+#else
+
+#include "glheader.h"
+
+#endif
+
#include <GL/gl.h>
#include "glxserver.h"
#include "glxbyteorder.h"
@@ -32,24 +41,25 @@
#include "indirect_reqsize.h"
#if defined(__CYGWIN__) || defined(__MINGW32__)
-#undef HAVE_ALIAS
+# undef HAVE_ALIAS
#endif
#ifdef HAVE_ALIAS
-#define ALIAS2(from,to) \
+# define ALIAS2(from,to) \
GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \
__attribute__ ((alias( # to )));
-#define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
+# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
#else
-#define ALIAS(from,to) \
+# define ALIAS(from,to) \
GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \
{ return __glX ## to ## ReqSize( pc, swap, reqlen ); }
#endif
+
int
-__glXCallListsReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXCallListsReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei n = *(GLsizei *) (pc + 0);
- GLenum type = *(GLenum *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 0);
+GLenum type = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -58,19 +68,19 @@ __glXCallListsReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glCallLists_size(type);
- return safe_pad(safe_mul(compsize, n));
+ return safe_pad(safe_mul(compsize , n));
}
int
-__glXBitmapReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXBitmapReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLsizei width = *(GLsizei *) (pc + 20);
- GLsizei height = *(GLsizei *) (pc + 24);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLsizei width = *(GLsizei *)(pc + 20);
+GLsizei height = *(GLsizei *)(pc + 24);
if (swap) {
row_length = bswap_32(row_length);
@@ -86,9 +96,9 @@ __glXBitmapReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXFogfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXFogfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 0);
+GLenum pname = * (GLenum *)(pc + 0);
GLsizei compsize;
if (swap) {
@@ -96,13 +106,13 @@ __glXFogfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glFogfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXLightfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXLightfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -110,13 +120,13 @@ __glXLightfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glLightfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXLightModelfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXLightModelfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 0);
+GLenum pname = * (GLenum *)(pc + 0);
GLsizei compsize;
if (swap) {
@@ -124,13 +134,13 @@ __glXLightModelfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glLightModelfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXMaterialfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXMaterialfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -138,17 +148,17 @@ __glXMaterialfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glMaterialfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXPolygonStippleReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXPolygonStippleReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
if (swap) {
row_length = bswap_32(row_length);
@@ -162,9 +172,9 @@ __glXPolygonStippleReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXTexParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexParameterfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -172,21 +182,21 @@ __glXTexParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glTexParameterfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexImage1DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 32);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 32);
+GLenum format = * (GLenum *)(pc + 44);
+GLenum type = * (GLenum *)(pc + 48);
if (swap) {
row_length = bswap_32(row_length);
@@ -204,18 +214,18 @@ __glXTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexImage2DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 32);
- GLsizei height = *(GLsizei *) (pc + 36);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 32);
+GLsizei height = *(GLsizei *)(pc + 36);
+GLenum format = * (GLenum *)(pc + 44);
+GLenum type = * (GLenum *)(pc + 48);
if (swap) {
row_length = bswap_32(row_length);
@@ -234,9 +244,9 @@ __glXTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXTexEnvfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexEnvfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -244,13 +254,13 @@ __glXTexEnvfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glTexEnvfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXTexGendvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexGendvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -258,13 +268,13 @@ __glXTexGendvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glTexGendv_size(pname);
- return safe_pad(safe_mul(compsize, 8));
+ return safe_pad(safe_mul(compsize , 8));
}
int
-__glXTexGenfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexGenfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -272,45 +282,45 @@ __glXTexGenfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glTexGenfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXPixelMapfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXPixelMapfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei mapsize = *(GLsizei *) (pc + 4);
+GLsizei mapsize = *(GLsizei *)(pc + 4);
if (swap) {
mapsize = bswap_32(mapsize);
}
- return safe_pad(safe_mul(mapsize, 4));
+ return safe_pad(safe_mul(mapsize , 4));
}
int
-__glXPixelMapusvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXPixelMapusvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei mapsize = *(GLsizei *) (pc + 4);
+GLsizei mapsize = *(GLsizei *)(pc + 4);
if (swap) {
mapsize = bswap_32(mapsize);
}
- return safe_pad(safe_mul(mapsize, 2));
+ return safe_pad(safe_mul(mapsize , 2));
}
int
-__glXDrawPixelsReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXDrawPixelsReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLsizei width = *(GLsizei *) (pc + 20);
- GLsizei height = *(GLsizei *) (pc + 24);
- GLenum format = *(GLenum *) (pc + 28);
- GLenum type = *(GLenum *) (pc + 32);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLsizei width = *(GLsizei *)(pc + 20);
+GLsizei height = *(GLsizei *)(pc + 24);
+GLenum format = * (GLenum *)(pc + 28);
+GLenum type = * (GLenum *)(pc + 32);
if (swap) {
row_length = bswap_32(row_length);
@@ -328,29 +338,29 @@ __glXDrawPixelsReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXPrioritizeTexturesReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei n = *(GLsizei *) (pc + 0);
+GLsizei n = *(GLsizei *)(pc + 0);
if (swap) {
n = bswap_32(n);
}
- return safe_pad(safe_add(safe_mul(n, 4), safe_mul(n, 4)));
+ return safe_pad(safe_add(safe_mul(n , 4), safe_mul(n , 4)));
}
int
-__glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexSubImage1DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 36);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 36);
+GLenum format = * (GLenum *)(pc + 44);
+GLenum type = * (GLenum *)(pc + 48);
if (swap) {
row_length = bswap_32(row_length);
@@ -368,18 +378,18 @@ __glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexSubImage2DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 36);
- GLsizei height = *(GLsizei *) (pc + 40);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 36);
+GLsizei height = *(GLsizei *)(pc + 40);
+GLenum format = * (GLenum *)(pc + 44);
+GLenum type = * (GLenum *)(pc + 48);
if (swap) {
row_length = bswap_32(row_length);
@@ -398,17 +408,17 @@ __glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXColorTableReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXColorTableReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 28);
- GLenum format = *(GLenum *) (pc + 32);
- GLenum type = *(GLenum *) (pc + 36);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 28);
+GLenum format = * (GLenum *)(pc + 32);
+GLenum type = * (GLenum *)(pc + 36);
if (swap) {
row_length = bswap_32(row_length);
@@ -426,9 +436,9 @@ __glXColorTableReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXColorTableParameterfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -436,21 +446,21 @@ __glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glColorTableParameterfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXColorSubTableReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXColorSubTableReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei count = *(GLsizei *) (pc + 28);
- GLenum format = *(GLenum *) (pc + 32);
- GLenum type = *(GLenum *) (pc + 36);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei count = *(GLsizei *)(pc + 28);
+GLenum format = * (GLenum *)(pc + 32);
+GLenum type = * (GLenum *)(pc + 36);
if (swap) {
row_length = bswap_32(row_length);
@@ -468,17 +478,17 @@ __glXColorSubTableReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXConvolutionFilter1DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 28);
- GLenum format = *(GLenum *) (pc + 36);
- GLenum type = *(GLenum *) (pc + 40);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 28);
+GLenum format = * (GLenum *)(pc + 36);
+GLenum type = * (GLenum *)(pc + 40);
if (swap) {
row_length = bswap_32(row_length);
@@ -496,18 +506,18 @@ __glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXConvolutionFilter2DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
+ GLint row_length = * (GLint *)(pc + 4);
GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 28);
- GLsizei height = *(GLsizei *) (pc + 32);
- GLenum format = *(GLenum *) (pc + 36);
- GLenum type = *(GLenum *) (pc + 40);
+ GLint skip_images = 0;
+ GLint skip_rows = * (GLint *)(pc + 8);
+ GLint alignment = * (GLint *)(pc + 16);
+GLenum target = * (GLenum *)(pc + 20);
+GLsizei width = *(GLsizei *)(pc + 28);
+GLsizei height = *(GLsizei *)(pc + 32);
+GLenum format = * (GLenum *)(pc + 36);
+GLenum type = * (GLenum *)(pc + 40);
if (swap) {
row_length = bswap_32(row_length);
@@ -526,9 +536,9 @@ __glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXConvolutionParameterfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 4);
+GLenum pname = * (GLenum *)(pc + 4);
GLsizei compsize;
if (swap) {
@@ -536,23 +546,23 @@ __glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glConvolutionParameterfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexImage3DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = *(GLint *) (pc + 8);
- GLint skip_rows = *(GLint *) (pc + 16);
- GLint skip_images = *(GLint *) (pc + 20);
- GLint alignment = *(GLint *) (pc + 32);
- GLenum target = *(GLenum *) (pc + 36);
- GLsizei width = *(GLsizei *) (pc + 48);
- GLsizei height = *(GLsizei *) (pc + 52);
- GLsizei depth = *(GLsizei *) (pc + 56);
- GLenum format = *(GLenum *) (pc + 68);
- GLenum type = *(GLenum *) (pc + 72);
+ GLint row_length = * (GLint *)(pc + 4);
+ GLint image_height = * (GLint *)(pc + 8);
+ GLint skip_rows = * (GLint *)(pc + 16);
+ GLint skip_images = * (GLint *)(pc + 20);
+ GLint alignment = * (GLint *)(pc + 32);
+GLenum target = * (GLenum *)(pc + 36);
+GLsizei width = *(GLsizei *)(pc + 48);
+GLsizei height = *(GLsizei *)(pc + 52);
+GLsizei depth = *(GLsizei *)(pc + 56);
+GLenum format = * (GLenum *)(pc + 68);
+GLenum type = * (GLenum *)(pc + 72);
if (swap) {
row_length = bswap_32(row_length);
@@ -568,8 +578,8 @@ __glXTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
type = bswap_32(type);
}
- if (*(CARD32 *) (pc + 76))
- return 0;
+ if (*(CARD32 *) (pc + 76))
+ return 0;
return __glXImageSize(format, type, target, width, height, depth,
image_height, row_length, skip_images,
@@ -577,19 +587,19 @@ __glXTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXTexSubImage3DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = *(GLint *) (pc + 8);
- GLint skip_rows = *(GLint *) (pc + 16);
- GLint skip_images = *(GLint *) (pc + 20);
- GLint alignment = *(GLint *) (pc + 32);
- GLenum target = *(GLenum *) (pc + 36);
- GLsizei width = *(GLsizei *) (pc + 60);
- GLsizei height = *(GLsizei *) (pc + 64);
- GLsizei depth = *(GLsizei *) (pc + 68);
- GLenum format = *(GLenum *) (pc + 76);
- GLenum type = *(GLenum *) (pc + 80);
+ GLint row_length = * (GLint *)(pc + 4);
+ GLint image_height = * (GLint *)(pc + 8);
+ GLint skip_rows = * (GLint *)(pc + 16);
+ GLint skip_images = * (GLint *)(pc + 20);
+ GLint alignment = * (GLint *)(pc + 32);
+GLenum target = * (GLenum *)(pc + 36);
+GLsizei width = *(GLsizei *)(pc + 60);
+GLsizei height = *(GLsizei *)(pc + 64);
+GLsizei depth = *(GLsizei *)(pc + 68);
+GLenum format = * (GLenum *)(pc + 76);
+GLenum type = * (GLenum *)(pc + 80);
if (swap) {
row_length = bswap_32(row_length);
@@ -611,9 +621,9 @@ __glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXCompressedTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXCompressedTexImage1DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei imageSize = *(GLsizei *) (pc + 20);
+GLsizei imageSize = *(GLsizei *)(pc + 20);
if (swap) {
imageSize = bswap_32(imageSize);
@@ -623,9 +633,9 @@ __glXCompressedTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXCompressedTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXCompressedTexImage2DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei imageSize = *(GLsizei *) (pc + 24);
+GLsizei imageSize = *(GLsizei *)(pc + 24);
if (swap) {
imageSize = bswap_32(imageSize);
@@ -635,9 +645,9 @@ __glXCompressedTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXCompressedTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXCompressedTexImage3DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei imageSize = *(GLsizei *) (pc + 28);
+GLsizei imageSize = *(GLsizei *)(pc + 28);
if (swap) {
imageSize = bswap_32(imageSize);
@@ -647,9 +657,9 @@ __glXCompressedTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXCompressedTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXCompressedTexSubImage3DReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei imageSize = *(GLsizei *) (pc + 36);
+GLsizei imageSize = *(GLsizei *)(pc + 36);
if (swap) {
imageSize = bswap_32(imageSize);
@@ -659,9 +669,9 @@ __glXCompressedTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXPointParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXPointParameterfvReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLenum pname = *(GLenum *) (pc + 0);
+GLenum pname = * (GLenum *)(pc + 0);
GLsizei compsize;
if (swap) {
@@ -669,25 +679,25 @@ __glXPointParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
compsize = __glPointParameterfv_size(pname);
- return safe_pad(safe_mul(compsize, 4));
+ return safe_pad(safe_mul(compsize , 4));
}
int
-__glXDrawBuffersReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXDrawBuffersReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei n = *(GLsizei *) (pc + 0);
+GLsizei n = *(GLsizei *)(pc + 0);
if (swap) {
n = bswap_32(n);
}
- return safe_pad(safe_mul(n, 4));
+ return safe_pad(safe_mul(n , 4));
}
int
-__glXProgramStringARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXProgramStringARBReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei len = *(GLsizei *) (pc + 8);
+GLsizei len = *(GLsizei *)(pc + 8);
if (swap) {
len = bswap_32(len);
@@ -697,96 +707,135 @@ __glXProgramStringARBReqSize(const GLbyte * pc, Bool swap, int reqlen)
}
int
-__glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXProgramParameters4dvNVReqSize( const GLbyte * pc, Bool swap, int reqlen )
+{
+GLsizei num = *(GLsizei *)(pc + 8);
+
+ if (swap) {
+ num = bswap_32(num);
+ }
+
+ return safe_pad(safe_mul(num , 32));
+}
+
+int
+__glXProgramParameters4fvNVReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei num = *(GLsizei *)(pc + 8);
+
+ if (swap) {
+ num = bswap_32(num);
+ }
+
+ return safe_pad(safe_mul(num , 16));
+}
+
+int
+__glXVertexAttribs1dvNVReqSize( const GLbyte * pc, Bool swap, int reqlen )
+{
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
}
- return safe_pad(safe_mul(n, 8));
+ return safe_pad(safe_mul(n , 8));
}
int
-__glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXVertexAttribs2dvNVReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
}
- return safe_pad(safe_mul(n, 16));
+ return safe_pad(safe_mul(n , 16));
}
int
-__glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXVertexAttribs3dvNVReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
}
- return safe_pad(safe_mul(n, 24));
+ return safe_pad(safe_mul(n , 24));
}
int
-__glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXVertexAttribs3fvNVReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
}
- return safe_pad(safe_mul(n, 12));
+ return safe_pad(safe_mul(n , 12));
}
int
-__glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXVertexAttribs3svNVReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
}
- return safe_pad(safe_mul(n, 6));
+ return safe_pad(safe_mul(n , 6));
}
int
-__glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen)
+__glXVertexAttribs4dvNVReqSize( const GLbyte * pc, Bool swap, int reqlen )
{
- GLsizei n = *(GLsizei *) (pc + 4);
+GLsizei n = *(GLsizei *)(pc + 4);
if (swap) {
n = bswap_32(n);
}
- return safe_pad(safe_mul(n, 32));
-}
-
-ALIAS(Fogiv, Fogfv)
- ALIAS(Lightiv, Lightfv)
- ALIAS(LightModeliv, LightModelfv)
- ALIAS(Materialiv, Materialfv)
- ALIAS(TexParameteriv, TexParameterfv)
- ALIAS(TexEnviv, TexEnvfv)
- ALIAS(TexGeniv, TexGenfv)
- ALIAS(PixelMapuiv, PixelMapfv)
- ALIAS(ColorTableParameteriv, ColorTableParameterfv)
- ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
- ALIAS(CompressedTexSubImage1D, CompressedTexImage1D)
- ALIAS(CompressedTexSubImage2D, CompressedTexImage3D)
- ALIAS(PointParameteriv, PointParameterfv)
- ALIAS(DeleteFramebuffers, DrawBuffers)
- ALIAS(DeleteRenderbuffers, DrawBuffers)
- ALIAS(VertexAttribs1fvNV, PixelMapfv)
- ALIAS(VertexAttribs1svNV, PixelMapusv)
- ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV)
- ALIAS(VertexAttribs2svNV, PixelMapfv)
- ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV)
- ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV)
- ALIAS(VertexAttribs4ubvNV, PixelMapfv)
+ return safe_pad(safe_mul(n , 32));
+}
+
+int
+__glXProgramNamedParameter4fvNVReqSize( const GLbyte * pc, Bool swap, int reqlen )
+{
+GLsizei len = *(GLsizei *)(pc + 4);
+
+ if (swap) {
+ len = bswap_32(len);
+ }
+
+ return safe_pad(len);
+}
+
+ALIAS( Fogiv, Fogfv )
+ALIAS( Lightiv, Lightfv )
+ALIAS( LightModeliv, LightModelfv )
+ALIAS( Materialiv, Materialfv )
+ALIAS( TexParameteriv, TexParameterfv )
+ALIAS( TexEnviv, TexEnvfv )
+ALIAS( TexGeniv, TexGenfv )
+ALIAS( PixelMapuiv, PixelMapfv )
+ALIAS( ColorTableParameteriv, ColorTableParameterfv )
+ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
+ALIAS( CompressedTexSubImage1D, CompressedTexImage1D )
+ALIAS( CompressedTexSubImage2D, CompressedTexImage3D )
+ALIAS( PointParameteriv, PointParameterfv )
+ALIAS( DeleteFramebuffers, DrawBuffers )
+ALIAS( DeleteRenderbuffers, DrawBuffers )
+ALIAS( LoadProgramNV, ProgramStringARB )
+ALIAS( RequestResidentProgramsNV, DrawBuffers )
+ALIAS( VertexAttribs1fvNV, PixelMapfv )
+ALIAS( VertexAttribs1svNV, PixelMapusv )
+ALIAS( VertexAttribs2fvNV, VertexAttribs1dvNV )
+ALIAS( VertexAttribs2svNV, PixelMapfv )
+ALIAS( VertexAttribs4fvNV, VertexAttribs2dvNV )
+ALIAS( VertexAttribs4svNV, VertexAttribs1dvNV )
+ALIAS( VertexAttribs4ubvNV, PixelMapfv )
+ALIAS( ProgramNamedParameter4dvNV, CompressedTexSubImage3D )