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