~ubuntu-branches/ubuntu/edgy/xorg-server/edgy-updates

« back to all changes in this revision

Viewing changes to GL/glx/indirect_reqsize.c

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Parra Novo
  • Date: 2006-07-25 20:06:28 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060725200628-gjmmd9gxfxdc4ejs
Tags: 1:1.1.1-0ubuntu1
* New Upstream version
* Changed Build-Depends from mesa-swrast-source to mesa-swx11-source,
  following Debian package nomenclature
* Re-did 12_security_policy_in_etc.diff for 1.1.1
* Dropped 15_security_allocate_local.diff (applied upstream)
* Dropped 16_SECURITY_setuid.diff (applied upstream)
* Dropped 000_ubuntu_fix_read_kernel_mapping.patch (applied upstream)
* Dropped 002_ubuntu_fix_for_certain_intel_chipsets.patch (applied upstream)
* Updated versioned Build-Depends on mesa-swx11-source to version
  6.5.0.cvs.20060725-0ubuntu1
* Added arrayobj.c, arrayobj.h, bitset.h & rbadaptors.h to
  GL/symlink-mesa.sh (linked from mesa-swx11-source)
* Added arrayobj.c to default build target on GL/mesa/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
 
2
 
 
3
/*
 
4
 * (C) Copyright IBM Corporation 2005
 
5
 * All Rights Reserved.
 
6
 * 
 
7
 * Permission is hereby granted, free of charge, to any person obtaining a
 
8
 * copy of this software and associated documentation files (the "Software"),
 
9
 * to deal in the Software without restriction, including without limitation
 
10
 * the rights to use, copy, modify, merge, publish, distribute, sub license,
 
11
 * and/or sell copies of the Software, and to permit persons to whom the
 
12
 * Software is furnished to do so, subject to the following conditions:
 
13
 * 
 
14
 * The above copyright notice and this permission notice (including the next
 
15
 * paragraph) shall be included in all copies or substantial portions of the
 
16
 * Software.
 
17
 * 
 
18
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
19
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
20
 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
 
21
 * IBM,
 
22
 * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 
23
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
 
24
 * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 
25
 * SOFTWARE.
 
26
 */
 
27
 
 
28
 
 
29
#include <GL/gl.h>
 
30
#include "glxserver.h"
 
31
#include "indirect_size.h"
 
32
#include "indirect_reqsize.h"
 
33
 
 
34
#if defined(linux)
 
35
#  include <byteswap.h>
 
36
#  define SWAP_32(v)  do { (v) = bswap_32(v); } while(0)
 
37
#else
 
38
#  define SWAP_32(v)  do { char tmp; swapl(&v, tmp); } while(0)
 
39
#endif
 
40
 
 
41
#define __GLX_PAD(x)  (((x) + 3) & ~3)
 
42
 
 
43
#if defined(__CYGWIN__) || defined(__MINGW32__)
 
44
#  undef HAVE_ALIAS
 
45
#endif
 
46
#ifdef HAVE_ALIAS
 
47
#  define ALIAS2(from,to) \
 
48
    GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
 
49
        __attribute__ ((alias( # to )));
 
50
#  define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
 
51
#else
 
52
#  define ALIAS(from,to) \
 
53
    GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
 
54
    { return __glX ## to ## ReqSize( pc, swap ); }
 
55
#endif
 
56
 
 
57
 
 
58
int
 
59
__glXCallListsReqSize( const GLbyte * pc, Bool swap )
 
60
{
 
61
    GLsizei n          = *(GLsizei *)(pc + 0);
 
62
    GLenum type        = * (GLenum *)(pc + 4);
 
63
    GLsizei compsize;
 
64
 
 
65
    if (swap) {
 
66
        SWAP_32( n );
 
67
        SWAP_32( type );
 
68
    }
 
69
 
 
70
    compsize = __glCallLists_size(type);
 
71
    return __GLX_PAD((compsize * n));
 
72
}
 
73
 
 
74
int
 
75
__glXBitmapReqSize( const GLbyte * pc, Bool swap )
 
76
{
 
77
    GLint row_length   = *  (GLint *)(pc +  4);
 
78
    GLint image_height = 0;
 
79
    GLint skip_images  = 0;
 
80
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
81
    GLint alignment    = *  (GLint *)(pc + 16);
 
82
    GLsizei width      = *(GLsizei *)(pc + 20);
 
83
    GLsizei height     = *(GLsizei *)(pc + 24);
 
84
 
 
85
    if (swap) {
 
86
        SWAP_32( row_length );
 
87
        SWAP_32( skip_rows );
 
88
        SWAP_32( alignment );
 
89
        SWAP_32( width );
 
90
        SWAP_32( height );
 
91
    }
 
92
 
 
93
    return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1,
 
94
                          image_height, row_length, skip_images,
 
95
                          skip_rows, alignment);
 
96
}
 
97
 
 
98
int
 
99
__glXFogfvReqSize( const GLbyte * pc, Bool swap )
 
100
{
 
101
    GLenum pname       = * (GLenum *)(pc + 0);
 
102
    GLsizei compsize;
 
103
 
 
104
    if (swap) {
 
105
        SWAP_32( pname );
 
106
    }
 
107
 
 
108
    compsize = __glFogfv_size(pname);
 
109
    return __GLX_PAD((compsize * 4));
 
110
}
 
111
 
 
112
int
 
113
__glXLightfvReqSize( const GLbyte * pc, Bool swap )
 
114
{
 
115
    GLenum pname       = * (GLenum *)(pc + 4);
 
116
    GLsizei compsize;
 
117
 
 
118
    if (swap) {
 
119
        SWAP_32( pname );
 
120
    }
 
121
 
 
122
    compsize = __glLightfv_size(pname);
 
123
    return __GLX_PAD((compsize * 4));
 
124
}
 
125
 
 
126
int
 
127
__glXLightModelfvReqSize( const GLbyte * pc, Bool swap )
 
128
{
 
129
    GLenum pname       = * (GLenum *)(pc + 0);
 
130
    GLsizei compsize;
 
131
 
 
132
    if (swap) {
 
133
        SWAP_32( pname );
 
134
    }
 
135
 
 
136
    compsize = __glLightModelfv_size(pname);
 
137
    return __GLX_PAD((compsize * 4));
 
138
}
 
139
 
 
140
int
 
141
__glXMaterialfvReqSize( const GLbyte * pc, Bool swap )
 
142
{
 
143
    GLenum pname       = * (GLenum *)(pc + 4);
 
144
    GLsizei compsize;
 
145
 
 
146
    if (swap) {
 
147
        SWAP_32( pname );
 
148
    }
 
149
 
 
150
    compsize = __glMaterialfv_size(pname);
 
151
    return __GLX_PAD((compsize * 4));
 
152
}
 
153
 
 
154
int
 
155
__glXPolygonStippleReqSize( const GLbyte * pc, Bool swap )
 
156
{
 
157
    GLint row_length   = *  (GLint *)(pc +  4);
 
158
    GLint image_height = 0;
 
159
    GLint skip_images  = 0;
 
160
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
161
    GLint alignment    = *  (GLint *)(pc + 16);
 
162
 
 
163
    if (swap) {
 
164
        SWAP_32( row_length );
 
165
        SWAP_32( skip_rows );
 
166
        SWAP_32( alignment );
 
167
    }
 
168
 
 
169
    return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1,
 
170
                          image_height, row_length, skip_images,
 
171
                          skip_rows, alignment);
 
172
}
 
173
 
 
174
int
 
175
__glXTexParameterfvReqSize( const GLbyte * pc, Bool swap )
 
176
{
 
177
    GLenum pname       = * (GLenum *)(pc + 4);
 
178
    GLsizei compsize;
 
179
 
 
180
    if (swap) {
 
181
        SWAP_32( pname );
 
182
    }
 
183
 
 
184
    compsize = __glTexParameterfv_size(pname);
 
185
    return __GLX_PAD((compsize * 4));
 
186
}
 
187
 
 
188
int
 
189
__glXTexImage1DReqSize( const GLbyte * pc, Bool swap )
 
190
{
 
191
    GLint row_length   = *  (GLint *)(pc +  4);
 
192
    GLint image_height = 0;
 
193
    GLint skip_images  = 0;
 
194
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
195
    GLint alignment    = *  (GLint *)(pc + 16);
 
196
    GLenum target      = * (GLenum *)(pc + 20);
 
197
    GLsizei width      = *(GLsizei *)(pc + 32);
 
198
    GLenum format      = * (GLenum *)(pc + 44);
 
199
    GLenum type        = * (GLenum *)(pc + 48);
 
200
 
 
201
    if (swap) {
 
202
        SWAP_32( row_length );
 
203
        SWAP_32( skip_rows );
 
204
        SWAP_32( alignment );
 
205
        SWAP_32( target );
 
206
        SWAP_32( width );
 
207
        SWAP_32( format );
 
208
        SWAP_32( type );
 
209
    }
 
210
 
 
211
    return __glXImageSize(format, type, target, width, 1, 1,
 
212
                          image_height, row_length, skip_images,
 
213
                          skip_rows, alignment);
 
214
}
 
215
 
 
216
int
 
217
__glXTexImage2DReqSize( const GLbyte * pc, Bool swap )
 
218
{
 
219
    GLint row_length   = *  (GLint *)(pc +  4);
 
220
    GLint image_height = 0;
 
221
    GLint skip_images  = 0;
 
222
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
223
    GLint alignment    = *  (GLint *)(pc + 16);
 
224
    GLenum target      = * (GLenum *)(pc + 20);
 
225
    GLsizei width      = *(GLsizei *)(pc + 32);
 
226
    GLsizei height     = *(GLsizei *)(pc + 36);
 
227
    GLenum format      = * (GLenum *)(pc + 44);
 
228
    GLenum type        = * (GLenum *)(pc + 48);
 
229
 
 
230
    if (swap) {
 
231
        SWAP_32( row_length );
 
232
        SWAP_32( skip_rows );
 
233
        SWAP_32( alignment );
 
234
        SWAP_32( target );
 
235
        SWAP_32( width );
 
236
        SWAP_32( height );
 
237
        SWAP_32( format );
 
238
        SWAP_32( type );
 
239
    }
 
240
 
 
241
    return __glXImageSize(format, type, target, width, height, 1,
 
242
                          image_height, row_length, skip_images,
 
243
                          skip_rows, alignment);
 
244
}
 
245
 
 
246
int
 
247
__glXTexEnvfvReqSize( const GLbyte * pc, Bool swap )
 
248
{
 
249
    GLenum pname       = * (GLenum *)(pc + 4);
 
250
    GLsizei compsize;
 
251
 
 
252
    if (swap) {
 
253
        SWAP_32( pname );
 
254
    }
 
255
 
 
256
    compsize = __glTexEnvfv_size(pname);
 
257
    return __GLX_PAD((compsize * 4));
 
258
}
 
259
 
 
260
int
 
261
__glXTexGendvReqSize( const GLbyte * pc, Bool swap )
 
262
{
 
263
    GLenum pname       = * (GLenum *)(pc + 4);
 
264
    GLsizei compsize;
 
265
 
 
266
    if (swap) {
 
267
        SWAP_32( pname );
 
268
    }
 
269
 
 
270
    compsize = __glTexGendv_size(pname);
 
271
    return __GLX_PAD((compsize * 8));
 
272
}
 
273
 
 
274
int
 
275
__glXTexGenfvReqSize( const GLbyte * pc, Bool swap )
 
276
{
 
277
    GLenum pname       = * (GLenum *)(pc + 4);
 
278
    GLsizei compsize;
 
279
 
 
280
    if (swap) {
 
281
        SWAP_32( pname );
 
282
    }
 
283
 
 
284
    compsize = __glTexGenfv_size(pname);
 
285
    return __GLX_PAD((compsize * 4));
 
286
}
 
287
 
 
288
int
 
289
__glXPixelMapfvReqSize( const GLbyte * pc, Bool swap )
 
290
{
 
291
    GLsizei mapsize    = *(GLsizei *)(pc + 4);
 
292
 
 
293
    if (swap) {
 
294
        SWAP_32( mapsize );
 
295
    }
 
296
 
 
297
    return __GLX_PAD((mapsize * 4));
 
298
}
 
299
 
 
300
int
 
301
__glXPixelMapusvReqSize( const GLbyte * pc, Bool swap )
 
302
{
 
303
    GLsizei mapsize    = *(GLsizei *)(pc + 4);
 
304
 
 
305
    if (swap) {
 
306
        SWAP_32( mapsize );
 
307
    }
 
308
 
 
309
    return __GLX_PAD((mapsize * 2));
 
310
}
 
311
 
 
312
int
 
313
__glXDrawPixelsReqSize( const GLbyte * pc, Bool swap )
 
314
{
 
315
    GLint row_length   = *  (GLint *)(pc +  4);
 
316
    GLint image_height = 0;
 
317
    GLint skip_images  = 0;
 
318
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
319
    GLint alignment    = *  (GLint *)(pc + 16);
 
320
    GLsizei width      = *(GLsizei *)(pc + 20);
 
321
    GLsizei height     = *(GLsizei *)(pc + 24);
 
322
    GLenum format      = * (GLenum *)(pc + 28);
 
323
    GLenum type        = * (GLenum *)(pc + 32);
 
324
 
 
325
    if (swap) {
 
326
        SWAP_32( row_length );
 
327
        SWAP_32( skip_rows );
 
328
        SWAP_32( alignment );
 
329
        SWAP_32( width );
 
330
        SWAP_32( height );
 
331
        SWAP_32( format );
 
332
        SWAP_32( type );
 
333
    }
 
334
 
 
335
    return __glXImageSize(format, type, 0, width, height, 1,
 
336
                          image_height, row_length, skip_images,
 
337
                          skip_rows, alignment);
 
338
}
 
339
 
 
340
int
 
341
__glXPrioritizeTexturesReqSize( const GLbyte * pc, Bool swap )
 
342
{
 
343
    GLsizei n          = *(GLsizei *)(pc + 0);
 
344
 
 
345
    if (swap) {
 
346
        SWAP_32( n );
 
347
    }
 
348
 
 
349
    return __GLX_PAD((n * 4) + (n * 4));
 
350
}
 
351
 
 
352
int
 
353
__glXTexSubImage1DReqSize( const GLbyte * pc, Bool swap )
 
354
{
 
355
    GLint row_length   = *  (GLint *)(pc +  4);
 
356
    GLint image_height = 0;
 
357
    GLint skip_images  = 0;
 
358
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
359
    GLint alignment    = *  (GLint *)(pc + 16);
 
360
    GLenum target      = * (GLenum *)(pc + 20);
 
361
    GLsizei width      = *(GLsizei *)(pc + 36);
 
362
    GLenum format      = * (GLenum *)(pc + 44);
 
363
    GLenum type        = * (GLenum *)(pc + 48);
 
364
 
 
365
    if (swap) {
 
366
        SWAP_32( row_length );
 
367
        SWAP_32( skip_rows );
 
368
        SWAP_32( alignment );
 
369
        SWAP_32( target );
 
370
        SWAP_32( width );
 
371
        SWAP_32( format );
 
372
        SWAP_32( type );
 
373
    }
 
374
 
 
375
    return __glXImageSize(format, type, target, width, 1, 1,
 
376
                          image_height, row_length, skip_images,
 
377
                          skip_rows, alignment);
 
378
}
 
379
 
 
380
int
 
381
__glXTexSubImage2DReqSize( const GLbyte * pc, Bool swap )
 
382
{
 
383
    GLint row_length   = *  (GLint *)(pc +  4);
 
384
    GLint image_height = 0;
 
385
    GLint skip_images  = 0;
 
386
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
387
    GLint alignment    = *  (GLint *)(pc + 16);
 
388
    GLenum target      = * (GLenum *)(pc + 20);
 
389
    GLsizei width      = *(GLsizei *)(pc + 36);
 
390
    GLsizei height     = *(GLsizei *)(pc + 40);
 
391
    GLenum format      = * (GLenum *)(pc + 44);
 
392
    GLenum type        = * (GLenum *)(pc + 48);
 
393
 
 
394
    if (swap) {
 
395
        SWAP_32( row_length );
 
396
        SWAP_32( skip_rows );
 
397
        SWAP_32( alignment );
 
398
        SWAP_32( target );
 
399
        SWAP_32( width );
 
400
        SWAP_32( height );
 
401
        SWAP_32( format );
 
402
        SWAP_32( type );
 
403
    }
 
404
 
 
405
    return __glXImageSize(format, type, target, width, height, 1,
 
406
                          image_height, row_length, skip_images,
 
407
                          skip_rows, alignment);
 
408
}
 
409
 
 
410
int
 
411
__glXColorTableReqSize( const GLbyte * pc, Bool swap )
 
412
{
 
413
    GLint row_length   = *  (GLint *)(pc +  4);
 
414
    GLint image_height = 0;
 
415
    GLint skip_images  = 0;
 
416
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
417
    GLint alignment    = *  (GLint *)(pc + 16);
 
418
    GLenum target      = * (GLenum *)(pc + 20);
 
419
    GLsizei width      = *(GLsizei *)(pc + 28);
 
420
    GLenum format      = * (GLenum *)(pc + 32);
 
421
    GLenum type        = * (GLenum *)(pc + 36);
 
422
 
 
423
    if (swap) {
 
424
        SWAP_32( row_length );
 
425
        SWAP_32( skip_rows );
 
426
        SWAP_32( alignment );
 
427
        SWAP_32( target );
 
428
        SWAP_32( width );
 
429
        SWAP_32( format );
 
430
        SWAP_32( type );
 
431
    }
 
432
 
 
433
    return __glXImageSize(format, type, target, width, 1, 1,
 
434
                          image_height, row_length, skip_images,
 
435
                          skip_rows, alignment);
 
436
}
 
437
 
 
438
int
 
439
__glXColorTableParameterfvReqSize( const GLbyte * pc, Bool swap )
 
440
{
 
441
    GLenum pname       = * (GLenum *)(pc + 4);
 
442
    GLsizei compsize;
 
443
 
 
444
    if (swap) {
 
445
        SWAP_32( pname );
 
446
    }
 
447
 
 
448
    compsize = __glColorTableParameterfv_size(pname);
 
449
    return __GLX_PAD((compsize * 4));
 
450
}
 
451
 
 
452
int
 
453
__glXColorSubTableReqSize( const GLbyte * pc, Bool swap )
 
454
{
 
455
    GLint row_length   = *  (GLint *)(pc +  4);
 
456
    GLint image_height = 0;
 
457
    GLint skip_images  = 0;
 
458
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
459
    GLint alignment    = *  (GLint *)(pc + 16);
 
460
    GLenum target      = * (GLenum *)(pc + 20);
 
461
    GLsizei count      = *(GLsizei *)(pc + 28);
 
462
    GLenum format      = * (GLenum *)(pc + 32);
 
463
    GLenum type        = * (GLenum *)(pc + 36);
 
464
 
 
465
    if (swap) {
 
466
        SWAP_32( row_length );
 
467
        SWAP_32( skip_rows );
 
468
        SWAP_32( alignment );
 
469
        SWAP_32( target );
 
470
        SWAP_32( count );
 
471
        SWAP_32( format );
 
472
        SWAP_32( type );
 
473
    }
 
474
 
 
475
    return __glXImageSize(format, type, target, count, 1, 1,
 
476
                          image_height, row_length, skip_images,
 
477
                          skip_rows, alignment);
 
478
}
 
479
 
 
480
int
 
481
__glXConvolutionFilter1DReqSize( const GLbyte * pc, Bool swap )
 
482
{
 
483
    GLint row_length   = *  (GLint *)(pc +  4);
 
484
    GLint image_height = 0;
 
485
    GLint skip_images  = 0;
 
486
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
487
    GLint alignment    = *  (GLint *)(pc + 16);
 
488
    GLenum target      = * (GLenum *)(pc + 20);
 
489
    GLsizei width      = *(GLsizei *)(pc + 28);
 
490
    GLenum format      = * (GLenum *)(pc + 36);
 
491
    GLenum type        = * (GLenum *)(pc + 40);
 
492
 
 
493
    if (swap) {
 
494
        SWAP_32( row_length );
 
495
        SWAP_32( skip_rows );
 
496
        SWAP_32( alignment );
 
497
        SWAP_32( target );
 
498
        SWAP_32( width );
 
499
        SWAP_32( format );
 
500
        SWAP_32( type );
 
501
    }
 
502
 
 
503
    return __glXImageSize(format, type, target, width, 1, 1,
 
504
                          image_height, row_length, skip_images,
 
505
                          skip_rows, alignment);
 
506
}
 
507
 
 
508
int
 
509
__glXConvolutionFilter2DReqSize( const GLbyte * pc, Bool swap )
 
510
{
 
511
    GLint row_length   = *  (GLint *)(pc +  4);
 
512
    GLint image_height = 0;
 
513
    GLint skip_images  = 0;
 
514
    GLint skip_rows    = *  (GLint *)(pc +  8);
 
515
    GLint alignment    = *  (GLint *)(pc + 16);
 
516
    GLenum target      = * (GLenum *)(pc + 20);
 
517
    GLsizei width      = *(GLsizei *)(pc + 28);
 
518
    GLsizei height     = *(GLsizei *)(pc + 32);
 
519
    GLenum format      = * (GLenum *)(pc + 36);
 
520
    GLenum type        = * (GLenum *)(pc + 40);
 
521
 
 
522
    if (swap) {
 
523
        SWAP_32( row_length );
 
524
        SWAP_32( skip_rows );
 
525
        SWAP_32( alignment );
 
526
        SWAP_32( target );
 
527
        SWAP_32( width );
 
528
        SWAP_32( height );
 
529
        SWAP_32( format );
 
530
        SWAP_32( type );
 
531
    }
 
532
 
 
533
    return __glXImageSize(format, type, target, width, height, 1,
 
534
                          image_height, row_length, skip_images,
 
535
                          skip_rows, alignment);
 
536
}
 
537
 
 
538
int
 
539
__glXConvolutionParameterfvReqSize( const GLbyte * pc, Bool swap )
 
540
{
 
541
    GLenum pname       = * (GLenum *)(pc + 4);
 
542
    GLsizei compsize;
 
543
 
 
544
    if (swap) {
 
545
        SWAP_32( pname );
 
546
    }
 
547
 
 
548
    compsize = __glConvolutionParameterfv_size(pname);
 
549
    return __GLX_PAD((compsize * 4));
 
550
}
 
551
 
 
552
int
 
553
__glXTexImage3DReqSize( const GLbyte * pc, Bool swap )
 
554
{
 
555
    GLint row_length   = *  (GLint *)(pc +  4);
 
556
    GLint image_height = *  (GLint *)(pc +  8);
 
557
    GLint skip_rows    = *  (GLint *)(pc + 16);
 
558
    GLint skip_images  = *  (GLint *)(pc + 20);
 
559
    GLint alignment    = *  (GLint *)(pc + 32);
 
560
    GLenum target      = * (GLenum *)(pc + 36);
 
561
    GLsizei width      = *(GLsizei *)(pc + 48);
 
562
    GLsizei height     = *(GLsizei *)(pc + 52);
 
563
    GLsizei depth      = *(GLsizei *)(pc + 56);
 
564
    GLenum format      = * (GLenum *)(pc + 68);
 
565
    GLenum type        = * (GLenum *)(pc + 72);
 
566
 
 
567
    if (swap) {
 
568
        SWAP_32( row_length );
 
569
        SWAP_32( image_height );
 
570
        SWAP_32( skip_rows );
 
571
        SWAP_32( skip_images );
 
572
        SWAP_32( alignment );
 
573
        SWAP_32( target );
 
574
        SWAP_32( width );
 
575
        SWAP_32( height );
 
576
        SWAP_32( depth );
 
577
        SWAP_32( format );
 
578
        SWAP_32( type );
 
579
    }
 
580
 
 
581
    return __glXImageSize(format, type, target, width, height, depth,
 
582
                          image_height, row_length, skip_images,
 
583
                          skip_rows, alignment);
 
584
}
 
585
 
 
586
int
 
587
__glXTexSubImage3DReqSize( const GLbyte * pc, Bool swap )
 
588
{
 
589
    GLint row_length   = *  (GLint *)(pc +  4);
 
590
    GLint image_height = *  (GLint *)(pc +  8);
 
591
    GLint skip_rows    = *  (GLint *)(pc + 16);
 
592
    GLint skip_images  = *  (GLint *)(pc + 20);
 
593
    GLint alignment    = *  (GLint *)(pc + 32);
 
594
    GLenum target      = * (GLenum *)(pc + 36);
 
595
    GLsizei width      = *(GLsizei *)(pc + 60);
 
596
    GLsizei height     = *(GLsizei *)(pc + 64);
 
597
    GLsizei depth      = *(GLsizei *)(pc + 68);
 
598
    GLenum format      = * (GLenum *)(pc + 76);
 
599
    GLenum type        = * (GLenum *)(pc + 80);
 
600
 
 
601
    if (swap) {
 
602
        SWAP_32( row_length );
 
603
        SWAP_32( image_height );
 
604
        SWAP_32( skip_rows );
 
605
        SWAP_32( skip_images );
 
606
        SWAP_32( alignment );
 
607
        SWAP_32( target );
 
608
        SWAP_32( width );
 
609
        SWAP_32( height );
 
610
        SWAP_32( depth );
 
611
        SWAP_32( format );
 
612
        SWAP_32( type );
 
613
    }
 
614
 
 
615
    return __glXImageSize(format, type, target, width, height, depth,
 
616
                          image_height, row_length, skip_images,
 
617
                          skip_rows, alignment);
 
618
}
 
619
 
 
620
int
 
621
__glXDrawBuffersARBReqSize( const GLbyte * pc, Bool swap )
 
622
{
 
623
    GLsizei n          = *(GLsizei *)(pc + 0);
 
624
 
 
625
    if (swap) {
 
626
        SWAP_32( n );
 
627
    }
 
628
 
 
629
    return __GLX_PAD((n * 4));
 
630
}
 
631
 
 
632
int
 
633
__glXPointParameterfvEXTReqSize( const GLbyte * pc, Bool swap )
 
634
{
 
635
    GLenum pname       = * (GLenum *)(pc + 0);
 
636
    GLsizei compsize;
 
637
 
 
638
    if (swap) {
 
639
        SWAP_32( pname );
 
640
    }
 
641
 
 
642
    compsize = __glPointParameterfvEXT_size(pname);
 
643
    return __GLX_PAD((compsize * 4));
 
644
}
 
645
 
 
646
int
 
647
__glXCompressedTexImage3DARBReqSize( const GLbyte * pc, Bool swap )
 
648
{
 
649
    GLsizei imageSize  = *(GLsizei *)(pc + 28);
 
650
 
 
651
    if (swap) {
 
652
        SWAP_32( imageSize );
 
653
    }
 
654
 
 
655
    return __GLX_PAD(imageSize);
 
656
}
 
657
 
 
658
int
 
659
__glXCompressedTexImage2DARBReqSize( const GLbyte * pc, Bool swap )
 
660
{
 
661
    GLsizei imageSize  = *(GLsizei *)(pc + 24);
 
662
 
 
663
    if (swap) {
 
664
        SWAP_32( imageSize );
 
665
    }
 
666
 
 
667
    return __GLX_PAD(imageSize);
 
668
}
 
669
 
 
670
int
 
671
__glXCompressedTexImage1DARBReqSize( const GLbyte * pc, Bool swap )
 
672
{
 
673
    GLsizei imageSize  = *(GLsizei *)(pc + 20);
 
674
 
 
675
    if (swap) {
 
676
        SWAP_32( imageSize );
 
677
    }
 
678
 
 
679
    return __GLX_PAD(imageSize);
 
680
}
 
681
 
 
682
int
 
683
__glXCompressedTexSubImage3DARBReqSize( const GLbyte * pc, Bool swap )
 
684
{
 
685
    GLsizei imageSize  = *(GLsizei *)(pc + 36);
 
686
 
 
687
    if (swap) {
 
688
        SWAP_32( imageSize );
 
689
    }
 
690
 
 
691
    return __GLX_PAD(imageSize);
 
692
}
 
693
 
 
694
int
 
695
__glXLoadProgramNVReqSize( const GLbyte * pc, Bool swap )
 
696
{
 
697
    GLsizei len        = *(GLsizei *)(pc + 8);
 
698
 
 
699
    if (swap) {
 
700
        SWAP_32( len );
 
701
    }
 
702
 
 
703
    return __GLX_PAD(len);
 
704
}
 
705
 
 
706
int
 
707
__glXProgramParameters4dvNVReqSize( const GLbyte * pc, Bool swap )
 
708
{
 
709
    GLuint num         = * (GLuint *)(pc + 8);
 
710
 
 
711
    if (swap) {
 
712
        SWAP_32( num );
 
713
    }
 
714
 
 
715
    return __GLX_PAD((num * 32));
 
716
}
 
717
 
 
718
int
 
719
__glXProgramParameters4fvNVReqSize( const GLbyte * pc, Bool swap )
 
720
{
 
721
    GLuint num         = * (GLuint *)(pc + 8);
 
722
 
 
723
    if (swap) {
 
724
        SWAP_32( num );
 
725
    }
 
726
 
 
727
    return __GLX_PAD((num * 16));
 
728
}
 
729
 
 
730
int
 
731
__glXVertexAttribs1dvNVReqSize( const GLbyte * pc, Bool swap )
 
732
{
 
733
    GLsizei n          = *(GLsizei *)(pc + 4);
 
734
 
 
735
    if (swap) {
 
736
        SWAP_32( n );
 
737
    }
 
738
 
 
739
    return __GLX_PAD((n * 8));
 
740
}
 
741
 
 
742
int
 
743
__glXVertexAttribs2dvNVReqSize( const GLbyte * pc, Bool swap )
 
744
{
 
745
    GLsizei n          = *(GLsizei *)(pc + 4);
 
746
 
 
747
    if (swap) {
 
748
        SWAP_32( n );
 
749
    }
 
750
 
 
751
    return __GLX_PAD((n * 16));
 
752
}
 
753
 
 
754
int
 
755
__glXVertexAttribs3dvNVReqSize( const GLbyte * pc, Bool swap )
 
756
{
 
757
    GLsizei n          = *(GLsizei *)(pc + 4);
 
758
 
 
759
    if (swap) {
 
760
        SWAP_32( n );
 
761
    }
 
762
 
 
763
    return __GLX_PAD((n * 24));
 
764
}
 
765
 
 
766
int
 
767
__glXVertexAttribs3fvNVReqSize( const GLbyte * pc, Bool swap )
 
768
{
 
769
    GLsizei n          = *(GLsizei *)(pc + 4);
 
770
 
 
771
    if (swap) {
 
772
        SWAP_32( n );
 
773
    }
 
774
 
 
775
    return __GLX_PAD((n * 12));
 
776
}
 
777
 
 
778
int
 
779
__glXVertexAttribs3svNVReqSize( const GLbyte * pc, Bool swap )
 
780
{
 
781
    GLsizei n          = *(GLsizei *)(pc + 4);
 
782
 
 
783
    if (swap) {
 
784
        SWAP_32( n );
 
785
    }
 
786
 
 
787
    return __GLX_PAD((n * 6));
 
788
}
 
789
 
 
790
int
 
791
__glXVertexAttribs4dvNVReqSize( const GLbyte * pc, Bool swap )
 
792
{
 
793
    GLsizei n          = *(GLsizei *)(pc + 4);
 
794
 
 
795
    if (swap) {
 
796
        SWAP_32( n );
 
797
    }
 
798
 
 
799
    return __GLX_PAD((n * 32));
 
800
}
 
801
 
 
802
int
 
803
__glXProgramNamedParameter4fvNVReqSize( const GLbyte * pc, Bool swap )
 
804
{
 
805
    GLsizei len        = *(GLsizei *)(pc + 4);
 
806
 
 
807
    if (swap) {
 
808
        SWAP_32( len );
 
809
    }
 
810
 
 
811
    return __GLX_PAD(len);
 
812
}
 
813
 
 
814
ALIAS( Fogiv, Fogfv )
 
815
ALIAS( Lightiv, Lightfv )
 
816
ALIAS( LightModeliv, LightModelfv )
 
817
ALIAS( Materialiv, Materialfv )
 
818
ALIAS( TexParameteriv, TexParameterfv )
 
819
ALIAS( TexEnviv, TexEnvfv )
 
820
ALIAS( TexGeniv, TexGenfv )
 
821
ALIAS( PixelMapuiv, PixelMapfv )
 
822
ALIAS( ColorTableParameteriv, ColorTableParameterfv )
 
823
ALIAS( ConvolutionParameteriv, ConvolutionParameterfv )
 
824
ALIAS( CompressedTexSubImage2DARB, CompressedTexImage3DARB )
 
825
ALIAS( CompressedTexSubImage1DARB, CompressedTexImage1DARB )
 
826
ALIAS( RequestResidentProgramsNV, DrawBuffersARB )
 
827
ALIAS( VertexAttribs1fvNV, PixelMapfv )
 
828
ALIAS( VertexAttribs1svNV, PixelMapusv )
 
829
ALIAS( VertexAttribs2fvNV, VertexAttribs1dvNV )
 
830
ALIAS( VertexAttribs2svNV, PixelMapfv )
 
831
ALIAS( VertexAttribs4fvNV, VertexAttribs2dvNV )
 
832
ALIAS( VertexAttribs4svNV, VertexAttribs1dvNV )
 
833
ALIAS( VertexAttribs4ubvNV, PixelMapfv )
 
834
ALIAS( PointParameterivNV, PointParameterfvEXT )
 
835
ALIAS( ProgramStringARB, LoadProgramNV )
 
836
ALIAS( ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB )
 
837
ALIAS( DeleteRenderbuffersEXT, DrawBuffersARB )
 
838
ALIAS( DeleteFramebuffersEXT, DrawBuffersARB )