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