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