1/* DO NOT EDIT - This file generated automatically by glX_proto_send.py (from Mesa) script */ 2 3/* 4 * (C) Copyright IBM Corporation 2004, 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 "indirect.h" 31#include "glxclient.h" 32#include "indirect_size.h" 33#include "glapi.h" 34#include "glthread.h" 35#include <GL/glxproto.h> 36#ifdef USE_XCB 37#include <X11/Xlib-xcb.h> 38#include <xcb/xcb.h> 39#include <xcb/glx.h> 40#endif /* USE_XCB */ 41 42#define __GLX_PAD(n) (((n) + 3) & ~3) 43 44# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) 45# define FASTCALL __attribute__((fastcall)) 46# else 47# define FASTCALL 48# endif 49# if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) 50# define NOINLINE __attribute__((noinline)) 51# else 52# define NOINLINE 53# endif 54 55#ifndef __GNUC__ 56# define __builtin_expect(x, y) x 57#endif 58 59/* If the size and opcode values are known at compile-time, this will, on 60 * x86 at least, emit them with a single instruction. 61 */ 62#define emit_header(dest, op, size) \ 63 do { union { short s[2]; int i; } temp; \ 64 temp.s[0] = (size); temp.s[1] = (op); \ 65 *((int *)(dest)) = temp.i; } while(0) 66 67NOINLINE CARD32 68__glXReadReply( Display *dpy, size_t size, void * dest, GLboolean reply_is_always_array ) 69{ 70 xGLXSingleReply reply; 71 72 (void) _XReply(dpy, (xReply *) & reply, 0, False); 73 if (size != 0) { 74 if ((reply.length > 0) || reply_is_always_array) { 75 const GLint bytes = (reply_is_always_array) 76 ? (4 * reply.length) : (reply.size * size); 77 const GLint extra = 4 - (bytes & 3); 78 79 _XRead(dpy, dest, bytes); 80 if ( extra < 4 ) { 81 _XEatData(dpy, extra); 82 } 83 } 84 else { 85 (void) memcpy( dest, &(reply.pad3), size); 86 } 87 } 88 89 return reply.retval; 90} 91 92NOINLINE void 93__glXReadPixelReply( Display *dpy, struct glx_context * gc, unsigned max_dim, 94 GLint width, GLint height, GLint depth, GLenum format, GLenum type, 95 void * dest, GLboolean dimensions_in_reply ) 96{ 97 xGLXSingleReply reply; 98 GLint size; 99 100 (void) _XReply(dpy, (xReply *) & reply, 0, False); 101 102 if ( dimensions_in_reply ) { 103 width = reply.pad3; 104 height = reply.pad4; 105 depth = reply.pad5; 106 107 if ((height == 0) || (max_dim < 2)) { height = 1; } 108 if ((depth == 0) || (max_dim < 3)) { depth = 1; } 109 } 110 111 size = reply.length * 4; 112 if (size != 0) { 113 void * buf = Xmalloc( size ); 114 115 if ( buf == NULL ) { 116 _XEatData(dpy, size); 117 __glXSetError(gc, GL_OUT_OF_MEMORY); 118 } 119 else { 120 const GLint extra = 4 - (size & 3); 121 122 _XRead(dpy, buf, size); 123 if ( extra < 4 ) { 124 _XEatData(dpy, extra); 125 } 126 127 __glEmptyImage(gc, 3, width, height, depth, format, type, 128 buf, dest); 129 Xfree(buf); 130 } 131 } 132} 133 134#define X_GLXSingle 0 135 136NOINLINE FASTCALL GLubyte * 137__glXSetupSingleRequest( struct glx_context * gc, GLint sop, GLint cmdlen ) 138{ 139 xGLXSingleReq * req; 140 Display * const dpy = gc->currentDpy; 141 142 (void) __glXFlushRenderBuffer(gc, gc->pc); 143 LockDisplay(dpy); 144 GetReqExtra(GLXSingle, cmdlen, req); 145 req->reqType = gc->majorOpcode; 146 req->contextTag = gc->currentContextTag; 147 req->glxCode = sop; 148 return (GLubyte *)(req) + sz_xGLXSingleReq; 149} 150 151NOINLINE FASTCALL GLubyte * 152__glXSetupVendorRequest( struct glx_context * gc, GLint code, GLint vop, GLint cmdlen ) 153{ 154 xGLXVendorPrivateReq * req; 155 Display * const dpy = gc->currentDpy; 156 157 (void) __glXFlushRenderBuffer(gc, gc->pc); 158 LockDisplay(dpy); 159 GetReqExtra(GLXVendorPrivate, cmdlen, req); 160 req->reqType = gc->majorOpcode; 161 req->glxCode = code; 162 req->vendorCode = vop; 163 req->contextTag = gc->currentContextTag; 164 return (GLubyte *)(req) + sz_xGLXVendorPrivateReq; 165} 166 167const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 }; 168 169#define zero (__glXDefaultPixelStore+0) 170#define one (__glXDefaultPixelStore+8) 171#define default_pixel_store_1D (__glXDefaultPixelStore+4) 172#define default_pixel_store_1D_size 20 173#define default_pixel_store_2D (__glXDefaultPixelStore+4) 174#define default_pixel_store_2D_size 20 175#define default_pixel_store_3D (__glXDefaultPixelStore+0) 176#define default_pixel_store_3D_size 36 177#define default_pixel_store_4D (__glXDefaultPixelStore+0) 178#define default_pixel_store_4D_size 36 179 180static FASTCALL NOINLINE void 181generic_3_byte( GLint rop, const void * ptr ) 182{ 183 struct glx_context * const gc = __glXGetCurrentContext(); 184 const GLuint cmdlen = 8; 185 186 emit_header(gc->pc, rop, cmdlen); 187 (void) memcpy((void *)(gc->pc + 4), ptr, 4); 188 gc->pc += cmdlen; 189 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 190} 191 192static FASTCALL NOINLINE void 193generic_4_byte( GLint rop, const void * ptr ) 194{ 195 struct glx_context * const gc = __glXGetCurrentContext(); 196 const GLuint cmdlen = 8; 197 198 emit_header(gc->pc, rop, cmdlen); 199 (void) memcpy((void *)(gc->pc + 4), ptr, 4); 200 gc->pc += cmdlen; 201 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 202} 203 204static FASTCALL NOINLINE void 205generic_6_byte( GLint rop, const void * ptr ) 206{ 207 struct glx_context * const gc = __glXGetCurrentContext(); 208 const GLuint cmdlen = 12; 209 210 emit_header(gc->pc, rop, cmdlen); 211 (void) memcpy((void *)(gc->pc + 4), ptr, 8); 212 gc->pc += cmdlen; 213 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 214} 215 216static FASTCALL NOINLINE void 217generic_8_byte( GLint rop, const void * ptr ) 218{ 219 struct glx_context * const gc = __glXGetCurrentContext(); 220 const GLuint cmdlen = 12; 221 222 emit_header(gc->pc, rop, cmdlen); 223 (void) memcpy((void *)(gc->pc + 4), ptr, 8); 224 gc->pc += cmdlen; 225 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 226} 227 228static FASTCALL NOINLINE void 229generic_12_byte( GLint rop, const void * ptr ) 230{ 231 struct glx_context * const gc = __glXGetCurrentContext(); 232 const GLuint cmdlen = 16; 233 234 emit_header(gc->pc, rop, cmdlen); 235 (void) memcpy((void *)(gc->pc + 4), ptr, 12); 236 gc->pc += cmdlen; 237 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 238} 239 240static FASTCALL NOINLINE void 241generic_16_byte( GLint rop, const void * ptr ) 242{ 243 struct glx_context * const gc = __glXGetCurrentContext(); 244 const GLuint cmdlen = 20; 245 246 emit_header(gc->pc, rop, cmdlen); 247 (void) memcpy((void *)(gc->pc + 4), ptr, 16); 248 gc->pc += cmdlen; 249 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 250} 251 252static FASTCALL NOINLINE void 253generic_24_byte( GLint rop, const void * ptr ) 254{ 255 struct glx_context * const gc = __glXGetCurrentContext(); 256 const GLuint cmdlen = 28; 257 258 emit_header(gc->pc, rop, cmdlen); 259 (void) memcpy((void *)(gc->pc + 4), ptr, 24); 260 gc->pc += cmdlen; 261 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 262} 263 264static FASTCALL NOINLINE void 265generic_32_byte( GLint rop, const void * ptr ) 266{ 267 struct glx_context * const gc = __glXGetCurrentContext(); 268 const GLuint cmdlen = 36; 269 270 emit_header(gc->pc, rop, cmdlen); 271 (void) memcpy((void *)(gc->pc + 4), ptr, 32); 272 gc->pc += cmdlen; 273 if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 274} 275 276#define X_GLsop_NewList 101 277void __indirect_glNewList(GLuint list, GLenum mode) 278{ 279 struct glx_context * const gc = __glXGetCurrentContext(); 280 Display * const dpy = gc->currentDpy; 281#ifndef USE_XCB 282 const GLuint cmdlen = 8; 283#endif 284 if (__builtin_expect(dpy != NULL, 1)) { 285#ifdef USE_XCB 286 xcb_connection_t *c = XGetXCBConnection(dpy); 287 (void) __glXFlushRenderBuffer(gc, gc->pc); 288 xcb_glx_new_list(c, gc->currentContextTag, list, mode); 289#else 290 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_NewList, cmdlen); 291(void) memcpy((void *)(pc + 0), (void *)(&list), 4); 292(void) memcpy((void *)(pc + 4), (void *)(&mode), 4); 293 UnlockDisplay(dpy); SyncHandle(); 294#endif /* USE_XCB */ 295 } 296 return; 297} 298 299#define X_GLsop_EndList 102 300void __indirect_glEndList(void) 301{ 302 struct glx_context * const gc = __glXGetCurrentContext(); 303 Display * const dpy = gc->currentDpy; 304#ifndef USE_XCB 305 const GLuint cmdlen = 0; 306#endif 307 if (__builtin_expect(dpy != NULL, 1)) { 308#ifdef USE_XCB 309 xcb_connection_t *c = XGetXCBConnection(dpy); 310 (void) __glXFlushRenderBuffer(gc, gc->pc); 311 xcb_glx_end_list(c, gc->currentContextTag); 312#else 313 (void) __glXSetupSingleRequest(gc, X_GLsop_EndList, cmdlen); 314 UnlockDisplay(dpy); SyncHandle(); 315#endif /* USE_XCB */ 316 } 317 return; 318} 319 320#define X_GLrop_CallList 1 321void __indirect_glCallList(GLuint list) 322{ 323 struct glx_context * const gc = __glXGetCurrentContext(); 324 const GLuint cmdlen = 8; 325emit_header(gc->pc, X_GLrop_CallList, cmdlen); 326(void) memcpy((void *)(gc->pc + 4), (void *)(&list), 4); 327gc->pc += cmdlen; 328if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 329} 330 331#define X_GLrop_CallLists 2 332void __indirect_glCallLists(GLsizei n, GLenum type, const GLvoid * lists) 333{ 334 struct glx_context * const gc = __glXGetCurrentContext(); 335 const GLuint compsize = __glCallLists_size(type); 336 const GLuint cmdlen = 12 + __GLX_PAD((compsize * n)); 337 if (n < 0) { 338 __glXSetError(gc, GL_INVALID_VALUE); 339 return; 340 } 341 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) { 342if (cmdlen <= gc->maxSmallRenderCommandSize) { 343 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 344 (void) __glXFlushRenderBuffer(gc, gc->pc); 345 } 346emit_header(gc->pc, X_GLrop_CallLists, cmdlen); 347(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); 348(void) memcpy((void *)(gc->pc + 8), (void *)(&type), 4); 349(void) memcpy((void *)(gc->pc + 12), (void *)(lists), (compsize * n)); 350gc->pc += cmdlen; 351if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 352} 353else { 354const GLint op = X_GLrop_CallLists; 355const GLuint cmdlenLarge = cmdlen + 4; 356GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 357(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 358(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 359(void) memcpy((void *)(pc + 8), (void *)(&n), 4); 360(void) memcpy((void *)(pc + 12), (void *)(&type), 4); 361 __glXSendLargeCommand(gc, pc, 16, lists, (compsize * n)); 362} 363 } 364} 365 366#define X_GLsop_DeleteLists 103 367void __indirect_glDeleteLists(GLuint list, GLsizei range) 368{ 369 struct glx_context * const gc = __glXGetCurrentContext(); 370 Display * const dpy = gc->currentDpy; 371#ifndef USE_XCB 372 const GLuint cmdlen = 8; 373#endif 374 if (__builtin_expect(dpy != NULL, 1)) { 375#ifdef USE_XCB 376 xcb_connection_t *c = XGetXCBConnection(dpy); 377 (void) __glXFlushRenderBuffer(gc, gc->pc); 378 xcb_glx_delete_lists(c, gc->currentContextTag, list, range); 379#else 380 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteLists, cmdlen); 381(void) memcpy((void *)(pc + 0), (void *)(&list), 4); 382(void) memcpy((void *)(pc + 4), (void *)(&range), 4); 383 UnlockDisplay(dpy); SyncHandle(); 384#endif /* USE_XCB */ 385 } 386 return; 387} 388 389#define X_GLsop_GenLists 104 390GLuint __indirect_glGenLists(GLsizei range) 391{ 392 struct glx_context * const gc = __glXGetCurrentContext(); 393 Display * const dpy = gc->currentDpy; 394 GLuint retval = (GLuint) 0; 395#ifndef USE_XCB 396 const GLuint cmdlen = 4; 397#endif 398 if (__builtin_expect(dpy != NULL, 1)) { 399#ifdef USE_XCB 400 xcb_connection_t *c = XGetXCBConnection(dpy); 401 (void) __glXFlushRenderBuffer(gc, gc->pc); 402 xcb_glx_gen_lists_reply_t *reply = xcb_glx_gen_lists_reply(c, xcb_glx_gen_lists(c, gc->currentContextTag, range), NULL); 403 retval = reply->ret_val; 404 free(reply); 405#else 406 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenLists, cmdlen); 407(void) memcpy((void *)(pc + 0), (void *)(&range), 4); 408 retval = (GLuint) __glXReadReply(dpy, 0, NULL, GL_FALSE); 409 UnlockDisplay(dpy); SyncHandle(); 410#endif /* USE_XCB */ 411 } 412 return retval; 413} 414 415#define X_GLrop_ListBase 3 416void __indirect_glListBase(GLuint base) 417{ 418 struct glx_context * const gc = __glXGetCurrentContext(); 419 const GLuint cmdlen = 8; 420emit_header(gc->pc, X_GLrop_ListBase, cmdlen); 421(void) memcpy((void *)(gc->pc + 4), (void *)(&base), 4); 422gc->pc += cmdlen; 423if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 424} 425 426#define X_GLrop_Begin 4 427void __indirect_glBegin(GLenum mode) 428{ 429 struct glx_context * const gc = __glXGetCurrentContext(); 430 const GLuint cmdlen = 8; 431emit_header(gc->pc, X_GLrop_Begin, cmdlen); 432(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 433gc->pc += cmdlen; 434if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 435} 436 437#define X_GLrop_Bitmap 5 438void __indirect_glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap) 439{ 440 struct glx_context * const gc = __glXGetCurrentContext(); 441 const GLuint compsize = (bitmap != NULL) ? __glImageSize(width, height, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0; 442 const GLuint cmdlen = 48 + __GLX_PAD(compsize); 443 if (__builtin_expect(gc->currentDpy != NULL, 1)) { 444if (cmdlen <= gc->maxSmallRenderCommandSize) { 445 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 446 (void) __glXFlushRenderBuffer(gc, gc->pc); 447 } 448emit_header(gc->pc, X_GLrop_Bitmap, cmdlen); 449(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); 450(void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4); 451(void) memcpy((void *)(gc->pc + 32), (void *)(&xorig), 4); 452(void) memcpy((void *)(gc->pc + 36), (void *)(&yorig), 4); 453(void) memcpy((void *)(gc->pc + 40), (void *)(&xmove), 4); 454(void) memcpy((void *)(gc->pc + 44), (void *)(&ymove), 4); 455if (compsize > 0) { 456 (*gc->fillImage)(gc, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, gc->pc + 48, gc->pc + 4); 457} else { 458 (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); 459} 460gc->pc += cmdlen; 461if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 462} 463else { 464const GLint op = X_GLrop_Bitmap; 465const GLuint cmdlenLarge = cmdlen + 4; 466GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 467(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 468(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 469(void) memcpy((void *)(pc + 28), (void *)(&width), 4); 470(void) memcpy((void *)(pc + 32), (void *)(&height), 4); 471(void) memcpy((void *)(pc + 36), (void *)(&xorig), 4); 472(void) memcpy((void *)(pc + 40), (void *)(&yorig), 4); 473(void) memcpy((void *)(pc + 44), (void *)(&xmove), 4); 474(void) memcpy((void *)(pc + 48), (void *)(&ymove), 4); 475__glXSendLargeImage(gc, compsize, 2, width, height, 1, GL_COLOR_INDEX, GL_BITMAP, bitmap, pc + 52, pc + 8); 476} 477 } 478} 479 480#define X_GLrop_Color3bv 6 481void __indirect_glColor3b(GLbyte red, GLbyte green, GLbyte blue) 482{ 483 struct glx_context * const gc = __glXGetCurrentContext(); 484 const GLuint cmdlen = 8; 485emit_header(gc->pc, X_GLrop_Color3bv, cmdlen); 486(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); 487(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); 488(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); 489gc->pc += cmdlen; 490if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 491} 492 493#define X_GLrop_Color3bv 6 494void __indirect_glColor3bv(const GLbyte * v) 495{ 496 generic_3_byte( X_GLrop_Color3bv, v ); 497} 498 499#define X_GLrop_Color3dv 7 500void __indirect_glColor3d(GLdouble red, GLdouble green, GLdouble blue) 501{ 502 struct glx_context * const gc = __glXGetCurrentContext(); 503 const GLuint cmdlen = 28; 504emit_header(gc->pc, X_GLrop_Color3dv, cmdlen); 505(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8); 506(void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8); 507(void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8); 508gc->pc += cmdlen; 509if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 510} 511 512#define X_GLrop_Color3dv 7 513void __indirect_glColor3dv(const GLdouble * v) 514{ 515 generic_24_byte( X_GLrop_Color3dv, v ); 516} 517 518#define X_GLrop_Color3fv 8 519void __indirect_glColor3f(GLfloat red, GLfloat green, GLfloat blue) 520{ 521 struct glx_context * const gc = __glXGetCurrentContext(); 522 const GLuint cmdlen = 16; 523emit_header(gc->pc, X_GLrop_Color3fv, cmdlen); 524(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 525(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 526(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 527gc->pc += cmdlen; 528if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 529} 530 531#define X_GLrop_Color3fv 8 532void __indirect_glColor3fv(const GLfloat * v) 533{ 534 generic_12_byte( X_GLrop_Color3fv, v ); 535} 536 537#define X_GLrop_Color3iv 9 538void __indirect_glColor3i(GLint red, GLint green, GLint blue) 539{ 540 struct glx_context * const gc = __glXGetCurrentContext(); 541 const GLuint cmdlen = 16; 542emit_header(gc->pc, X_GLrop_Color3iv, cmdlen); 543(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 544(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 545(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 546gc->pc += cmdlen; 547if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 548} 549 550#define X_GLrop_Color3iv 9 551void __indirect_glColor3iv(const GLint * v) 552{ 553 generic_12_byte( X_GLrop_Color3iv, v ); 554} 555 556#define X_GLrop_Color3sv 10 557void __indirect_glColor3s(GLshort red, GLshort green, GLshort blue) 558{ 559 struct glx_context * const gc = __glXGetCurrentContext(); 560 const GLuint cmdlen = 12; 561emit_header(gc->pc, X_GLrop_Color3sv, cmdlen); 562(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); 563(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); 564(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); 565gc->pc += cmdlen; 566if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 567} 568 569#define X_GLrop_Color3sv 10 570void __indirect_glColor3sv(const GLshort * v) 571{ 572 generic_6_byte( X_GLrop_Color3sv, v ); 573} 574 575#define X_GLrop_Color3ubv 11 576void __indirect_glColor3ub(GLubyte red, GLubyte green, GLubyte blue) 577{ 578 struct glx_context * const gc = __glXGetCurrentContext(); 579 const GLuint cmdlen = 8; 580emit_header(gc->pc, X_GLrop_Color3ubv, cmdlen); 581(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); 582(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); 583(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); 584gc->pc += cmdlen; 585if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 586} 587 588#define X_GLrop_Color3ubv 11 589void __indirect_glColor3ubv(const GLubyte * v) 590{ 591 generic_3_byte( X_GLrop_Color3ubv, v ); 592} 593 594#define X_GLrop_Color3uiv 12 595void __indirect_glColor3ui(GLuint red, GLuint green, GLuint blue) 596{ 597 struct glx_context * const gc = __glXGetCurrentContext(); 598 const GLuint cmdlen = 16; 599emit_header(gc->pc, X_GLrop_Color3uiv, cmdlen); 600(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 601(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 602(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 603gc->pc += cmdlen; 604if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 605} 606 607#define X_GLrop_Color3uiv 12 608void __indirect_glColor3uiv(const GLuint * v) 609{ 610 generic_12_byte( X_GLrop_Color3uiv, v ); 611} 612 613#define X_GLrop_Color3usv 13 614void __indirect_glColor3us(GLushort red, GLushort green, GLushort blue) 615{ 616 struct glx_context * const gc = __glXGetCurrentContext(); 617 const GLuint cmdlen = 12; 618emit_header(gc->pc, X_GLrop_Color3usv, cmdlen); 619(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); 620(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); 621(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); 622gc->pc += cmdlen; 623if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 624} 625 626#define X_GLrop_Color3usv 13 627void __indirect_glColor3usv(const GLushort * v) 628{ 629 generic_6_byte( X_GLrop_Color3usv, v ); 630} 631 632#define X_GLrop_Color4bv 14 633void __indirect_glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) 634{ 635 struct glx_context * const gc = __glXGetCurrentContext(); 636 const GLuint cmdlen = 8; 637emit_header(gc->pc, X_GLrop_Color4bv, cmdlen); 638(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); 639(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); 640(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); 641(void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1); 642gc->pc += cmdlen; 643if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 644} 645 646#define X_GLrop_Color4bv 14 647void __indirect_glColor4bv(const GLbyte * v) 648{ 649 generic_4_byte( X_GLrop_Color4bv, v ); 650} 651 652#define X_GLrop_Color4dv 15 653void __indirect_glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) 654{ 655 struct glx_context * const gc = __glXGetCurrentContext(); 656 const GLuint cmdlen = 36; 657emit_header(gc->pc, X_GLrop_Color4dv, cmdlen); 658(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8); 659(void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8); 660(void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8); 661(void) memcpy((void *)(gc->pc + 28), (void *)(&alpha), 8); 662gc->pc += cmdlen; 663if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 664} 665 666#define X_GLrop_Color4dv 15 667void __indirect_glColor4dv(const GLdouble * v) 668{ 669 generic_32_byte( X_GLrop_Color4dv, v ); 670} 671 672#define X_GLrop_Color4fv 16 673void __indirect_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) 674{ 675 struct glx_context * const gc = __glXGetCurrentContext(); 676 const GLuint cmdlen = 20; 677emit_header(gc->pc, X_GLrop_Color4fv, cmdlen); 678(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 679(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 680(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 681(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); 682gc->pc += cmdlen; 683if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 684} 685 686#define X_GLrop_Color4fv 16 687void __indirect_glColor4fv(const GLfloat * v) 688{ 689 generic_16_byte( X_GLrop_Color4fv, v ); 690} 691 692#define X_GLrop_Color4iv 17 693void __indirect_glColor4i(GLint red, GLint green, GLint blue, GLint alpha) 694{ 695 struct glx_context * const gc = __glXGetCurrentContext(); 696 const GLuint cmdlen = 20; 697emit_header(gc->pc, X_GLrop_Color4iv, cmdlen); 698(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 699(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 700(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 701(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); 702gc->pc += cmdlen; 703if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 704} 705 706#define X_GLrop_Color4iv 17 707void __indirect_glColor4iv(const GLint * v) 708{ 709 generic_16_byte( X_GLrop_Color4iv, v ); 710} 711 712#define X_GLrop_Color4sv 18 713void __indirect_glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha) 714{ 715 struct glx_context * const gc = __glXGetCurrentContext(); 716 const GLuint cmdlen = 12; 717emit_header(gc->pc, X_GLrop_Color4sv, cmdlen); 718(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); 719(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); 720(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); 721(void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2); 722gc->pc += cmdlen; 723if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 724} 725 726#define X_GLrop_Color4sv 18 727void __indirect_glColor4sv(const GLshort * v) 728{ 729 generic_8_byte( X_GLrop_Color4sv, v ); 730} 731 732#define X_GLrop_Color4ubv 19 733void __indirect_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) 734{ 735 struct glx_context * const gc = __glXGetCurrentContext(); 736 const GLuint cmdlen = 8; 737emit_header(gc->pc, X_GLrop_Color4ubv, cmdlen); 738(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); 739(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); 740(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); 741(void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1); 742gc->pc += cmdlen; 743if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 744} 745 746#define X_GLrop_Color4ubv 19 747void __indirect_glColor4ubv(const GLubyte * v) 748{ 749 generic_4_byte( X_GLrop_Color4ubv, v ); 750} 751 752#define X_GLrop_Color4uiv 20 753void __indirect_glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha) 754{ 755 struct glx_context * const gc = __glXGetCurrentContext(); 756 const GLuint cmdlen = 20; 757emit_header(gc->pc, X_GLrop_Color4uiv, cmdlen); 758(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 759(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 760(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 761(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); 762gc->pc += cmdlen; 763if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 764} 765 766#define X_GLrop_Color4uiv 20 767void __indirect_glColor4uiv(const GLuint * v) 768{ 769 generic_16_byte( X_GLrop_Color4uiv, v ); 770} 771 772#define X_GLrop_Color4usv 21 773void __indirect_glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha) 774{ 775 struct glx_context * const gc = __glXGetCurrentContext(); 776 const GLuint cmdlen = 12; 777emit_header(gc->pc, X_GLrop_Color4usv, cmdlen); 778(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); 779(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); 780(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); 781(void) memcpy((void *)(gc->pc + 10), (void *)(&alpha), 2); 782gc->pc += cmdlen; 783if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 784} 785 786#define X_GLrop_Color4usv 21 787void __indirect_glColor4usv(const GLushort * v) 788{ 789 generic_8_byte( X_GLrop_Color4usv, v ); 790} 791 792#define X_GLrop_EdgeFlagv 22 793void __indirect_glEdgeFlag(GLboolean flag) 794{ 795 struct glx_context * const gc = __glXGetCurrentContext(); 796 const GLuint cmdlen = 8; 797emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen); 798(void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1); 799gc->pc += cmdlen; 800if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 801} 802 803#define X_GLrop_EdgeFlagv 22 804void __indirect_glEdgeFlagv(const GLboolean * flag) 805{ 806 struct glx_context * const gc = __glXGetCurrentContext(); 807 const GLuint cmdlen = 8; 808emit_header(gc->pc, X_GLrop_EdgeFlagv, cmdlen); 809(void) memcpy((void *)(gc->pc + 4), (void *)(flag), 1); 810gc->pc += cmdlen; 811if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 812} 813 814#define X_GLrop_End 23 815void __indirect_glEnd(void) 816{ 817 struct glx_context * const gc = __glXGetCurrentContext(); 818 const GLuint cmdlen = 4; 819emit_header(gc->pc, X_GLrop_End, cmdlen); 820gc->pc += cmdlen; 821if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 822} 823 824#define X_GLrop_Indexdv 24 825void __indirect_glIndexd(GLdouble c) 826{ 827 struct glx_context * const gc = __glXGetCurrentContext(); 828 const GLuint cmdlen = 12; 829emit_header(gc->pc, X_GLrop_Indexdv, cmdlen); 830(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 8); 831gc->pc += cmdlen; 832if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 833} 834 835#define X_GLrop_Indexdv 24 836void __indirect_glIndexdv(const GLdouble * c) 837{ 838 generic_8_byte( X_GLrop_Indexdv, c ); 839} 840 841#define X_GLrop_Indexfv 25 842void __indirect_glIndexf(GLfloat c) 843{ 844 struct glx_context * const gc = __glXGetCurrentContext(); 845 const GLuint cmdlen = 8; 846emit_header(gc->pc, X_GLrop_Indexfv, cmdlen); 847(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4); 848gc->pc += cmdlen; 849if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 850} 851 852#define X_GLrop_Indexfv 25 853void __indirect_glIndexfv(const GLfloat * c) 854{ 855 generic_4_byte( X_GLrop_Indexfv, c ); 856} 857 858#define X_GLrop_Indexiv 26 859void __indirect_glIndexi(GLint c) 860{ 861 struct glx_context * const gc = __glXGetCurrentContext(); 862 const GLuint cmdlen = 8; 863emit_header(gc->pc, X_GLrop_Indexiv, cmdlen); 864(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4); 865gc->pc += cmdlen; 866if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 867} 868 869#define X_GLrop_Indexiv 26 870void __indirect_glIndexiv(const GLint * c) 871{ 872 generic_4_byte( X_GLrop_Indexiv, c ); 873} 874 875#define X_GLrop_Indexsv 27 876void __indirect_glIndexs(GLshort c) 877{ 878 struct glx_context * const gc = __glXGetCurrentContext(); 879 const GLuint cmdlen = 8; 880emit_header(gc->pc, X_GLrop_Indexsv, cmdlen); 881(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 2); 882gc->pc += cmdlen; 883if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 884} 885 886#define X_GLrop_Indexsv 27 887void __indirect_glIndexsv(const GLshort * c) 888{ 889 struct glx_context * const gc = __glXGetCurrentContext(); 890 const GLuint cmdlen = 8; 891emit_header(gc->pc, X_GLrop_Indexsv, cmdlen); 892(void) memcpy((void *)(gc->pc + 4), (void *)(c), 2); 893gc->pc += cmdlen; 894if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 895} 896 897#define X_GLrop_Normal3bv 28 898void __indirect_glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz) 899{ 900 struct glx_context * const gc = __glXGetCurrentContext(); 901 const GLuint cmdlen = 8; 902emit_header(gc->pc, X_GLrop_Normal3bv, cmdlen); 903(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 1); 904(void) memcpy((void *)(gc->pc + 5), (void *)(&ny), 1); 905(void) memcpy((void *)(gc->pc + 6), (void *)(&nz), 1); 906gc->pc += cmdlen; 907if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 908} 909 910#define X_GLrop_Normal3bv 28 911void __indirect_glNormal3bv(const GLbyte * v) 912{ 913 generic_3_byte( X_GLrop_Normal3bv, v ); 914} 915 916#define X_GLrop_Normal3dv 29 917void __indirect_glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz) 918{ 919 struct glx_context * const gc = __glXGetCurrentContext(); 920 const GLuint cmdlen = 28; 921emit_header(gc->pc, X_GLrop_Normal3dv, cmdlen); 922(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 8); 923(void) memcpy((void *)(gc->pc + 12), (void *)(&ny), 8); 924(void) memcpy((void *)(gc->pc + 20), (void *)(&nz), 8); 925gc->pc += cmdlen; 926if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 927} 928 929#define X_GLrop_Normal3dv 29 930void __indirect_glNormal3dv(const GLdouble * v) 931{ 932 generic_24_byte( X_GLrop_Normal3dv, v ); 933} 934 935#define X_GLrop_Normal3fv 30 936void __indirect_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) 937{ 938 struct glx_context * const gc = __glXGetCurrentContext(); 939 const GLuint cmdlen = 16; 940emit_header(gc->pc, X_GLrop_Normal3fv, cmdlen); 941(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4); 942(void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4); 943(void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4); 944gc->pc += cmdlen; 945if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 946} 947 948#define X_GLrop_Normal3fv 30 949void __indirect_glNormal3fv(const GLfloat * v) 950{ 951 generic_12_byte( X_GLrop_Normal3fv, v ); 952} 953 954#define X_GLrop_Normal3iv 31 955void __indirect_glNormal3i(GLint nx, GLint ny, GLint nz) 956{ 957 struct glx_context * const gc = __glXGetCurrentContext(); 958 const GLuint cmdlen = 16; 959emit_header(gc->pc, X_GLrop_Normal3iv, cmdlen); 960(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 4); 961(void) memcpy((void *)(gc->pc + 8), (void *)(&ny), 4); 962(void) memcpy((void *)(gc->pc + 12), (void *)(&nz), 4); 963gc->pc += cmdlen; 964if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 965} 966 967#define X_GLrop_Normal3iv 31 968void __indirect_glNormal3iv(const GLint * v) 969{ 970 generic_12_byte( X_GLrop_Normal3iv, v ); 971} 972 973#define X_GLrop_Normal3sv 32 974void __indirect_glNormal3s(GLshort nx, GLshort ny, GLshort nz) 975{ 976 struct glx_context * const gc = __glXGetCurrentContext(); 977 const GLuint cmdlen = 12; 978emit_header(gc->pc, X_GLrop_Normal3sv, cmdlen); 979(void) memcpy((void *)(gc->pc + 4), (void *)(&nx), 2); 980(void) memcpy((void *)(gc->pc + 6), (void *)(&ny), 2); 981(void) memcpy((void *)(gc->pc + 8), (void *)(&nz), 2); 982gc->pc += cmdlen; 983if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 984} 985 986#define X_GLrop_Normal3sv 32 987void __indirect_glNormal3sv(const GLshort * v) 988{ 989 generic_6_byte( X_GLrop_Normal3sv, v ); 990} 991 992#define X_GLrop_RasterPos2dv 33 993void __indirect_glRasterPos2d(GLdouble x, GLdouble y) 994{ 995 struct glx_context * const gc = __glXGetCurrentContext(); 996 const GLuint cmdlen = 20; 997emit_header(gc->pc, X_GLrop_RasterPos2dv, cmdlen); 998(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); 999(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); 1000gc->pc += cmdlen; 1001if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1002} 1003 1004#define X_GLrop_RasterPos2dv 33 1005void __indirect_glRasterPos2dv(const GLdouble * v) 1006{ 1007 generic_16_byte( X_GLrop_RasterPos2dv, v ); 1008} 1009 1010#define X_GLrop_RasterPos2fv 34 1011void __indirect_glRasterPos2f(GLfloat x, GLfloat y) 1012{ 1013 struct glx_context * const gc = __glXGetCurrentContext(); 1014 const GLuint cmdlen = 12; 1015emit_header(gc->pc, X_GLrop_RasterPos2fv, cmdlen); 1016(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1017(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1018gc->pc += cmdlen; 1019if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1020} 1021 1022#define X_GLrop_RasterPos2fv 34 1023void __indirect_glRasterPos2fv(const GLfloat * v) 1024{ 1025 generic_8_byte( X_GLrop_RasterPos2fv, v ); 1026} 1027 1028#define X_GLrop_RasterPos2iv 35 1029void __indirect_glRasterPos2i(GLint x, GLint y) 1030{ 1031 struct glx_context * const gc = __glXGetCurrentContext(); 1032 const GLuint cmdlen = 12; 1033emit_header(gc->pc, X_GLrop_RasterPos2iv, cmdlen); 1034(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1035(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1036gc->pc += cmdlen; 1037if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1038} 1039 1040#define X_GLrop_RasterPos2iv 35 1041void __indirect_glRasterPos2iv(const GLint * v) 1042{ 1043 generic_8_byte( X_GLrop_RasterPos2iv, v ); 1044} 1045 1046#define X_GLrop_RasterPos2sv 36 1047void __indirect_glRasterPos2s(GLshort x, GLshort y) 1048{ 1049 struct glx_context * const gc = __glXGetCurrentContext(); 1050 const GLuint cmdlen = 8; 1051emit_header(gc->pc, X_GLrop_RasterPos2sv, cmdlen); 1052(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); 1053(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); 1054gc->pc += cmdlen; 1055if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1056} 1057 1058#define X_GLrop_RasterPos2sv 36 1059void __indirect_glRasterPos2sv(const GLshort * v) 1060{ 1061 generic_4_byte( X_GLrop_RasterPos2sv, v ); 1062} 1063 1064#define X_GLrop_RasterPos3dv 37 1065void __indirect_glRasterPos3d(GLdouble x, GLdouble y, GLdouble z) 1066{ 1067 struct glx_context * const gc = __glXGetCurrentContext(); 1068 const GLuint cmdlen = 28; 1069emit_header(gc->pc, X_GLrop_RasterPos3dv, cmdlen); 1070(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); 1071(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); 1072(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); 1073gc->pc += cmdlen; 1074if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1075} 1076 1077#define X_GLrop_RasterPos3dv 37 1078void __indirect_glRasterPos3dv(const GLdouble * v) 1079{ 1080 generic_24_byte( X_GLrop_RasterPos3dv, v ); 1081} 1082 1083#define X_GLrop_RasterPos3fv 38 1084void __indirect_glRasterPos3f(GLfloat x, GLfloat y, GLfloat z) 1085{ 1086 struct glx_context * const gc = __glXGetCurrentContext(); 1087 const GLuint cmdlen = 16; 1088emit_header(gc->pc, X_GLrop_RasterPos3fv, cmdlen); 1089(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1090(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1091(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 1092gc->pc += cmdlen; 1093if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1094} 1095 1096#define X_GLrop_RasterPos3fv 38 1097void __indirect_glRasterPos3fv(const GLfloat * v) 1098{ 1099 generic_12_byte( X_GLrop_RasterPos3fv, v ); 1100} 1101 1102#define X_GLrop_RasterPos3iv 39 1103void __indirect_glRasterPos3i(GLint x, GLint y, GLint z) 1104{ 1105 struct glx_context * const gc = __glXGetCurrentContext(); 1106 const GLuint cmdlen = 16; 1107emit_header(gc->pc, X_GLrop_RasterPos3iv, cmdlen); 1108(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1109(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1110(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 1111gc->pc += cmdlen; 1112if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1113} 1114 1115#define X_GLrop_RasterPos3iv 39 1116void __indirect_glRasterPos3iv(const GLint * v) 1117{ 1118 generic_12_byte( X_GLrop_RasterPos3iv, v ); 1119} 1120 1121#define X_GLrop_RasterPos3sv 40 1122void __indirect_glRasterPos3s(GLshort x, GLshort y, GLshort z) 1123{ 1124 struct glx_context * const gc = __glXGetCurrentContext(); 1125 const GLuint cmdlen = 12; 1126emit_header(gc->pc, X_GLrop_RasterPos3sv, cmdlen); 1127(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); 1128(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); 1129(void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2); 1130gc->pc += cmdlen; 1131if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1132} 1133 1134#define X_GLrop_RasterPos3sv 40 1135void __indirect_glRasterPos3sv(const GLshort * v) 1136{ 1137 generic_6_byte( X_GLrop_RasterPos3sv, v ); 1138} 1139 1140#define X_GLrop_RasterPos4dv 41 1141void __indirect_glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) 1142{ 1143 struct glx_context * const gc = __glXGetCurrentContext(); 1144 const GLuint cmdlen = 36; 1145emit_header(gc->pc, X_GLrop_RasterPos4dv, cmdlen); 1146(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); 1147(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); 1148(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); 1149(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); 1150gc->pc += cmdlen; 1151if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1152} 1153 1154#define X_GLrop_RasterPos4dv 41 1155void __indirect_glRasterPos4dv(const GLdouble * v) 1156{ 1157 generic_32_byte( X_GLrop_RasterPos4dv, v ); 1158} 1159 1160#define X_GLrop_RasterPos4fv 42 1161void __indirect_glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) 1162{ 1163 struct glx_context * const gc = __glXGetCurrentContext(); 1164 const GLuint cmdlen = 20; 1165emit_header(gc->pc, X_GLrop_RasterPos4fv, cmdlen); 1166(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1167(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1168(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 1169(void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4); 1170gc->pc += cmdlen; 1171if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1172} 1173 1174#define X_GLrop_RasterPos4fv 42 1175void __indirect_glRasterPos4fv(const GLfloat * v) 1176{ 1177 generic_16_byte( X_GLrop_RasterPos4fv, v ); 1178} 1179 1180#define X_GLrop_RasterPos4iv 43 1181void __indirect_glRasterPos4i(GLint x, GLint y, GLint z, GLint w) 1182{ 1183 struct glx_context * const gc = __glXGetCurrentContext(); 1184 const GLuint cmdlen = 20; 1185emit_header(gc->pc, X_GLrop_RasterPos4iv, cmdlen); 1186(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1187(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1188(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 1189(void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4); 1190gc->pc += cmdlen; 1191if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1192} 1193 1194#define X_GLrop_RasterPos4iv 43 1195void __indirect_glRasterPos4iv(const GLint * v) 1196{ 1197 generic_16_byte( X_GLrop_RasterPos4iv, v ); 1198} 1199 1200#define X_GLrop_RasterPos4sv 44 1201void __indirect_glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w) 1202{ 1203 struct glx_context * const gc = __glXGetCurrentContext(); 1204 const GLuint cmdlen = 12; 1205emit_header(gc->pc, X_GLrop_RasterPos4sv, cmdlen); 1206(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); 1207(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); 1208(void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2); 1209(void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2); 1210gc->pc += cmdlen; 1211if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1212} 1213 1214#define X_GLrop_RasterPos4sv 44 1215void __indirect_glRasterPos4sv(const GLshort * v) 1216{ 1217 generic_8_byte( X_GLrop_RasterPos4sv, v ); 1218} 1219 1220#define X_GLrop_Rectdv 45 1221void __indirect_glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) 1222{ 1223 struct glx_context * const gc = __glXGetCurrentContext(); 1224 const GLuint cmdlen = 36; 1225emit_header(gc->pc, X_GLrop_Rectdv, cmdlen); 1226(void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 8); 1227(void) memcpy((void *)(gc->pc + 12), (void *)(&y1), 8); 1228(void) memcpy((void *)(gc->pc + 20), (void *)(&x2), 8); 1229(void) memcpy((void *)(gc->pc + 28), (void *)(&y2), 8); 1230gc->pc += cmdlen; 1231if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1232} 1233 1234#define X_GLrop_Rectdv 45 1235void __indirect_glRectdv(const GLdouble * v1, const GLdouble * v2) 1236{ 1237 struct glx_context * const gc = __glXGetCurrentContext(); 1238 const GLuint cmdlen = 36; 1239emit_header(gc->pc, X_GLrop_Rectdv, cmdlen); 1240(void) memcpy((void *)(gc->pc + 4), (void *)(v1), 16); 1241(void) memcpy((void *)(gc->pc + 20), (void *)(v2), 16); 1242gc->pc += cmdlen; 1243if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1244} 1245 1246#define X_GLrop_Rectfv 46 1247void __indirect_glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) 1248{ 1249 struct glx_context * const gc = __glXGetCurrentContext(); 1250 const GLuint cmdlen = 20; 1251emit_header(gc->pc, X_GLrop_Rectfv, cmdlen); 1252(void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4); 1253(void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4); 1254(void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4); 1255(void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4); 1256gc->pc += cmdlen; 1257if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1258} 1259 1260#define X_GLrop_Rectfv 46 1261void __indirect_glRectfv(const GLfloat * v1, const GLfloat * v2) 1262{ 1263 struct glx_context * const gc = __glXGetCurrentContext(); 1264 const GLuint cmdlen = 20; 1265emit_header(gc->pc, X_GLrop_Rectfv, cmdlen); 1266(void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8); 1267(void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8); 1268gc->pc += cmdlen; 1269if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1270} 1271 1272#define X_GLrop_Rectiv 47 1273void __indirect_glRecti(GLint x1, GLint y1, GLint x2, GLint y2) 1274{ 1275 struct glx_context * const gc = __glXGetCurrentContext(); 1276 const GLuint cmdlen = 20; 1277emit_header(gc->pc, X_GLrop_Rectiv, cmdlen); 1278(void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 4); 1279(void) memcpy((void *)(gc->pc + 8), (void *)(&y1), 4); 1280(void) memcpy((void *)(gc->pc + 12), (void *)(&x2), 4); 1281(void) memcpy((void *)(gc->pc + 16), (void *)(&y2), 4); 1282gc->pc += cmdlen; 1283if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1284} 1285 1286#define X_GLrop_Rectiv 47 1287void __indirect_glRectiv(const GLint * v1, const GLint * v2) 1288{ 1289 struct glx_context * const gc = __glXGetCurrentContext(); 1290 const GLuint cmdlen = 20; 1291emit_header(gc->pc, X_GLrop_Rectiv, cmdlen); 1292(void) memcpy((void *)(gc->pc + 4), (void *)(v1), 8); 1293(void) memcpy((void *)(gc->pc + 12), (void *)(v2), 8); 1294gc->pc += cmdlen; 1295if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1296} 1297 1298#define X_GLrop_Rectsv 48 1299void __indirect_glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2) 1300{ 1301 struct glx_context * const gc = __glXGetCurrentContext(); 1302 const GLuint cmdlen = 12; 1303emit_header(gc->pc, X_GLrop_Rectsv, cmdlen); 1304(void) memcpy((void *)(gc->pc + 4), (void *)(&x1), 2); 1305(void) memcpy((void *)(gc->pc + 6), (void *)(&y1), 2); 1306(void) memcpy((void *)(gc->pc + 8), (void *)(&x2), 2); 1307(void) memcpy((void *)(gc->pc + 10), (void *)(&y2), 2); 1308gc->pc += cmdlen; 1309if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1310} 1311 1312#define X_GLrop_Rectsv 48 1313void __indirect_glRectsv(const GLshort * v1, const GLshort * v2) 1314{ 1315 struct glx_context * const gc = __glXGetCurrentContext(); 1316 const GLuint cmdlen = 12; 1317emit_header(gc->pc, X_GLrop_Rectsv, cmdlen); 1318(void) memcpy((void *)(gc->pc + 4), (void *)(v1), 4); 1319(void) memcpy((void *)(gc->pc + 8), (void *)(v2), 4); 1320gc->pc += cmdlen; 1321if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1322} 1323 1324#define X_GLrop_TexCoord1dv 49 1325void __indirect_glTexCoord1d(GLdouble s) 1326{ 1327 struct glx_context * const gc = __glXGetCurrentContext(); 1328 const GLuint cmdlen = 12; 1329emit_header(gc->pc, X_GLrop_TexCoord1dv, cmdlen); 1330(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); 1331gc->pc += cmdlen; 1332if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1333} 1334 1335#define X_GLrop_TexCoord1dv 49 1336void __indirect_glTexCoord1dv(const GLdouble * v) 1337{ 1338 generic_8_byte( X_GLrop_TexCoord1dv, v ); 1339} 1340 1341#define X_GLrop_TexCoord1fv 50 1342void __indirect_glTexCoord1f(GLfloat s) 1343{ 1344 struct glx_context * const gc = __glXGetCurrentContext(); 1345 const GLuint cmdlen = 8; 1346emit_header(gc->pc, X_GLrop_TexCoord1fv, cmdlen); 1347(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); 1348gc->pc += cmdlen; 1349if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1350} 1351 1352#define X_GLrop_TexCoord1fv 50 1353void __indirect_glTexCoord1fv(const GLfloat * v) 1354{ 1355 generic_4_byte( X_GLrop_TexCoord1fv, v ); 1356} 1357 1358#define X_GLrop_TexCoord1iv 51 1359void __indirect_glTexCoord1i(GLint s) 1360{ 1361 struct glx_context * const gc = __glXGetCurrentContext(); 1362 const GLuint cmdlen = 8; 1363emit_header(gc->pc, X_GLrop_TexCoord1iv, cmdlen); 1364(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); 1365gc->pc += cmdlen; 1366if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1367} 1368 1369#define X_GLrop_TexCoord1iv 51 1370void __indirect_glTexCoord1iv(const GLint * v) 1371{ 1372 generic_4_byte( X_GLrop_TexCoord1iv, v ); 1373} 1374 1375#define X_GLrop_TexCoord1sv 52 1376void __indirect_glTexCoord1s(GLshort s) 1377{ 1378 struct glx_context * const gc = __glXGetCurrentContext(); 1379 const GLuint cmdlen = 8; 1380emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen); 1381(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2); 1382gc->pc += cmdlen; 1383if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1384} 1385 1386#define X_GLrop_TexCoord1sv 52 1387void __indirect_glTexCoord1sv(const GLshort * v) 1388{ 1389 struct glx_context * const gc = __glXGetCurrentContext(); 1390 const GLuint cmdlen = 8; 1391emit_header(gc->pc, X_GLrop_TexCoord1sv, cmdlen); 1392(void) memcpy((void *)(gc->pc + 4), (void *)(v), 2); 1393gc->pc += cmdlen; 1394if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1395} 1396 1397#define X_GLrop_TexCoord2dv 53 1398void __indirect_glTexCoord2d(GLdouble s, GLdouble t) 1399{ 1400 struct glx_context * const gc = __glXGetCurrentContext(); 1401 const GLuint cmdlen = 20; 1402emit_header(gc->pc, X_GLrop_TexCoord2dv, cmdlen); 1403(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); 1404(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); 1405gc->pc += cmdlen; 1406if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1407} 1408 1409#define X_GLrop_TexCoord2dv 53 1410void __indirect_glTexCoord2dv(const GLdouble * v) 1411{ 1412 generic_16_byte( X_GLrop_TexCoord2dv, v ); 1413} 1414 1415#define X_GLrop_TexCoord2fv 54 1416void __indirect_glTexCoord2f(GLfloat s, GLfloat t) 1417{ 1418 struct glx_context * const gc = __glXGetCurrentContext(); 1419 const GLuint cmdlen = 12; 1420emit_header(gc->pc, X_GLrop_TexCoord2fv, cmdlen); 1421(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); 1422(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); 1423gc->pc += cmdlen; 1424if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1425} 1426 1427#define X_GLrop_TexCoord2fv 54 1428void __indirect_glTexCoord2fv(const GLfloat * v) 1429{ 1430 generic_8_byte( X_GLrop_TexCoord2fv, v ); 1431} 1432 1433#define X_GLrop_TexCoord2iv 55 1434void __indirect_glTexCoord2i(GLint s, GLint t) 1435{ 1436 struct glx_context * const gc = __glXGetCurrentContext(); 1437 const GLuint cmdlen = 12; 1438emit_header(gc->pc, X_GLrop_TexCoord2iv, cmdlen); 1439(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); 1440(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); 1441gc->pc += cmdlen; 1442if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1443} 1444 1445#define X_GLrop_TexCoord2iv 55 1446void __indirect_glTexCoord2iv(const GLint * v) 1447{ 1448 generic_8_byte( X_GLrop_TexCoord2iv, v ); 1449} 1450 1451#define X_GLrop_TexCoord2sv 56 1452void __indirect_glTexCoord2s(GLshort s, GLshort t) 1453{ 1454 struct glx_context * const gc = __glXGetCurrentContext(); 1455 const GLuint cmdlen = 8; 1456emit_header(gc->pc, X_GLrop_TexCoord2sv, cmdlen); 1457(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2); 1458(void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2); 1459gc->pc += cmdlen; 1460if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1461} 1462 1463#define X_GLrop_TexCoord2sv 56 1464void __indirect_glTexCoord2sv(const GLshort * v) 1465{ 1466 generic_4_byte( X_GLrop_TexCoord2sv, v ); 1467} 1468 1469#define X_GLrop_TexCoord3dv 57 1470void __indirect_glTexCoord3d(GLdouble s, GLdouble t, GLdouble r) 1471{ 1472 struct glx_context * const gc = __glXGetCurrentContext(); 1473 const GLuint cmdlen = 28; 1474emit_header(gc->pc, X_GLrop_TexCoord3dv, cmdlen); 1475(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); 1476(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); 1477(void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8); 1478gc->pc += cmdlen; 1479if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1480} 1481 1482#define X_GLrop_TexCoord3dv 57 1483void __indirect_glTexCoord3dv(const GLdouble * v) 1484{ 1485 generic_24_byte( X_GLrop_TexCoord3dv, v ); 1486} 1487 1488#define X_GLrop_TexCoord3fv 58 1489void __indirect_glTexCoord3f(GLfloat s, GLfloat t, GLfloat r) 1490{ 1491 struct glx_context * const gc = __glXGetCurrentContext(); 1492 const GLuint cmdlen = 16; 1493emit_header(gc->pc, X_GLrop_TexCoord3fv, cmdlen); 1494(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); 1495(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); 1496(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4); 1497gc->pc += cmdlen; 1498if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1499} 1500 1501#define X_GLrop_TexCoord3fv 58 1502void __indirect_glTexCoord3fv(const GLfloat * v) 1503{ 1504 generic_12_byte( X_GLrop_TexCoord3fv, v ); 1505} 1506 1507#define X_GLrop_TexCoord3iv 59 1508void __indirect_glTexCoord3i(GLint s, GLint t, GLint r) 1509{ 1510 struct glx_context * const gc = __glXGetCurrentContext(); 1511 const GLuint cmdlen = 16; 1512emit_header(gc->pc, X_GLrop_TexCoord3iv, cmdlen); 1513(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); 1514(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); 1515(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4); 1516gc->pc += cmdlen; 1517if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1518} 1519 1520#define X_GLrop_TexCoord3iv 59 1521void __indirect_glTexCoord3iv(const GLint * v) 1522{ 1523 generic_12_byte( X_GLrop_TexCoord3iv, v ); 1524} 1525 1526#define X_GLrop_TexCoord3sv 60 1527void __indirect_glTexCoord3s(GLshort s, GLshort t, GLshort r) 1528{ 1529 struct glx_context * const gc = __glXGetCurrentContext(); 1530 const GLuint cmdlen = 12; 1531emit_header(gc->pc, X_GLrop_TexCoord3sv, cmdlen); 1532(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2); 1533(void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2); 1534(void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2); 1535gc->pc += cmdlen; 1536if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1537} 1538 1539#define X_GLrop_TexCoord3sv 60 1540void __indirect_glTexCoord3sv(const GLshort * v) 1541{ 1542 generic_6_byte( X_GLrop_TexCoord3sv, v ); 1543} 1544 1545#define X_GLrop_TexCoord4dv 61 1546void __indirect_glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q) 1547{ 1548 struct glx_context * const gc = __glXGetCurrentContext(); 1549 const GLuint cmdlen = 36; 1550emit_header(gc->pc, X_GLrop_TexCoord4dv, cmdlen); 1551(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); 1552(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); 1553(void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8); 1554(void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8); 1555gc->pc += cmdlen; 1556if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1557} 1558 1559#define X_GLrop_TexCoord4dv 61 1560void __indirect_glTexCoord4dv(const GLdouble * v) 1561{ 1562 generic_32_byte( X_GLrop_TexCoord4dv, v ); 1563} 1564 1565#define X_GLrop_TexCoord4fv 62 1566void __indirect_glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q) 1567{ 1568 struct glx_context * const gc = __glXGetCurrentContext(); 1569 const GLuint cmdlen = 20; 1570emit_header(gc->pc, X_GLrop_TexCoord4fv, cmdlen); 1571(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); 1572(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); 1573(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4); 1574(void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4); 1575gc->pc += cmdlen; 1576if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1577} 1578 1579#define X_GLrop_TexCoord4fv 62 1580void __indirect_glTexCoord4fv(const GLfloat * v) 1581{ 1582 generic_16_byte( X_GLrop_TexCoord4fv, v ); 1583} 1584 1585#define X_GLrop_TexCoord4iv 63 1586void __indirect_glTexCoord4i(GLint s, GLint t, GLint r, GLint q) 1587{ 1588 struct glx_context * const gc = __glXGetCurrentContext(); 1589 const GLuint cmdlen = 20; 1590emit_header(gc->pc, X_GLrop_TexCoord4iv, cmdlen); 1591(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); 1592(void) memcpy((void *)(gc->pc + 8), (void *)(&t), 4); 1593(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 4); 1594(void) memcpy((void *)(gc->pc + 16), (void *)(&q), 4); 1595gc->pc += cmdlen; 1596if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1597} 1598 1599#define X_GLrop_TexCoord4iv 63 1600void __indirect_glTexCoord4iv(const GLint * v) 1601{ 1602 generic_16_byte( X_GLrop_TexCoord4iv, v ); 1603} 1604 1605#define X_GLrop_TexCoord4sv 64 1606void __indirect_glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q) 1607{ 1608 struct glx_context * const gc = __glXGetCurrentContext(); 1609 const GLuint cmdlen = 12; 1610emit_header(gc->pc, X_GLrop_TexCoord4sv, cmdlen); 1611(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 2); 1612(void) memcpy((void *)(gc->pc + 6), (void *)(&t), 2); 1613(void) memcpy((void *)(gc->pc + 8), (void *)(&r), 2); 1614(void) memcpy((void *)(gc->pc + 10), (void *)(&q), 2); 1615gc->pc += cmdlen; 1616if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1617} 1618 1619#define X_GLrop_TexCoord4sv 64 1620void __indirect_glTexCoord4sv(const GLshort * v) 1621{ 1622 generic_8_byte( X_GLrop_TexCoord4sv, v ); 1623} 1624 1625#define X_GLrop_Vertex2dv 65 1626void __indirect_glVertex2d(GLdouble x, GLdouble y) 1627{ 1628 struct glx_context * const gc = __glXGetCurrentContext(); 1629 const GLuint cmdlen = 20; 1630emit_header(gc->pc, X_GLrop_Vertex2dv, cmdlen); 1631(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); 1632(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); 1633gc->pc += cmdlen; 1634if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1635} 1636 1637#define X_GLrop_Vertex2dv 65 1638void __indirect_glVertex2dv(const GLdouble * v) 1639{ 1640 generic_16_byte( X_GLrop_Vertex2dv, v ); 1641} 1642 1643#define X_GLrop_Vertex2fv 66 1644void __indirect_glVertex2f(GLfloat x, GLfloat y) 1645{ 1646 struct glx_context * const gc = __glXGetCurrentContext(); 1647 const GLuint cmdlen = 12; 1648emit_header(gc->pc, X_GLrop_Vertex2fv, cmdlen); 1649(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1650(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1651gc->pc += cmdlen; 1652if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1653} 1654 1655#define X_GLrop_Vertex2fv 66 1656void __indirect_glVertex2fv(const GLfloat * v) 1657{ 1658 generic_8_byte( X_GLrop_Vertex2fv, v ); 1659} 1660 1661#define X_GLrop_Vertex2iv 67 1662void __indirect_glVertex2i(GLint x, GLint y) 1663{ 1664 struct glx_context * const gc = __glXGetCurrentContext(); 1665 const GLuint cmdlen = 12; 1666emit_header(gc->pc, X_GLrop_Vertex2iv, cmdlen); 1667(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1668(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1669gc->pc += cmdlen; 1670if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1671} 1672 1673#define X_GLrop_Vertex2iv 67 1674void __indirect_glVertex2iv(const GLint * v) 1675{ 1676 generic_8_byte( X_GLrop_Vertex2iv, v ); 1677} 1678 1679#define X_GLrop_Vertex2sv 68 1680void __indirect_glVertex2s(GLshort x, GLshort y) 1681{ 1682 struct glx_context * const gc = __glXGetCurrentContext(); 1683 const GLuint cmdlen = 8; 1684emit_header(gc->pc, X_GLrop_Vertex2sv, cmdlen); 1685(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); 1686(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); 1687gc->pc += cmdlen; 1688if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1689} 1690 1691#define X_GLrop_Vertex2sv 68 1692void __indirect_glVertex2sv(const GLshort * v) 1693{ 1694 generic_4_byte( X_GLrop_Vertex2sv, v ); 1695} 1696 1697#define X_GLrop_Vertex3dv 69 1698void __indirect_glVertex3d(GLdouble x, GLdouble y, GLdouble z) 1699{ 1700 struct glx_context * const gc = __glXGetCurrentContext(); 1701 const GLuint cmdlen = 28; 1702emit_header(gc->pc, X_GLrop_Vertex3dv, cmdlen); 1703(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); 1704(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); 1705(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); 1706gc->pc += cmdlen; 1707if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1708} 1709 1710#define X_GLrop_Vertex3dv 69 1711void __indirect_glVertex3dv(const GLdouble * v) 1712{ 1713 generic_24_byte( X_GLrop_Vertex3dv, v ); 1714} 1715 1716#define X_GLrop_Vertex3fv 70 1717void __indirect_glVertex3f(GLfloat x, GLfloat y, GLfloat z) 1718{ 1719 struct glx_context * const gc = __glXGetCurrentContext(); 1720 const GLuint cmdlen = 16; 1721emit_header(gc->pc, X_GLrop_Vertex3fv, cmdlen); 1722(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1723(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1724(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 1725gc->pc += cmdlen; 1726if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1727} 1728 1729#define X_GLrop_Vertex3fv 70 1730void __indirect_glVertex3fv(const GLfloat * v) 1731{ 1732 generic_12_byte( X_GLrop_Vertex3fv, v ); 1733} 1734 1735#define X_GLrop_Vertex3iv 71 1736void __indirect_glVertex3i(GLint x, GLint y, GLint z) 1737{ 1738 struct glx_context * const gc = __glXGetCurrentContext(); 1739 const GLuint cmdlen = 16; 1740emit_header(gc->pc, X_GLrop_Vertex3iv, cmdlen); 1741(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1742(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1743(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 1744gc->pc += cmdlen; 1745if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1746} 1747 1748#define X_GLrop_Vertex3iv 71 1749void __indirect_glVertex3iv(const GLint * v) 1750{ 1751 generic_12_byte( X_GLrop_Vertex3iv, v ); 1752} 1753 1754#define X_GLrop_Vertex3sv 72 1755void __indirect_glVertex3s(GLshort x, GLshort y, GLshort z) 1756{ 1757 struct glx_context * const gc = __glXGetCurrentContext(); 1758 const GLuint cmdlen = 12; 1759emit_header(gc->pc, X_GLrop_Vertex3sv, cmdlen); 1760(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); 1761(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); 1762(void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2); 1763gc->pc += cmdlen; 1764if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1765} 1766 1767#define X_GLrop_Vertex3sv 72 1768void __indirect_glVertex3sv(const GLshort * v) 1769{ 1770 generic_6_byte( X_GLrop_Vertex3sv, v ); 1771} 1772 1773#define X_GLrop_Vertex4dv 73 1774void __indirect_glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w) 1775{ 1776 struct glx_context * const gc = __glXGetCurrentContext(); 1777 const GLuint cmdlen = 36; 1778emit_header(gc->pc, X_GLrop_Vertex4dv, cmdlen); 1779(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); 1780(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); 1781(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); 1782(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); 1783gc->pc += cmdlen; 1784if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1785} 1786 1787#define X_GLrop_Vertex4dv 73 1788void __indirect_glVertex4dv(const GLdouble * v) 1789{ 1790 generic_32_byte( X_GLrop_Vertex4dv, v ); 1791} 1792 1793#define X_GLrop_Vertex4fv 74 1794void __indirect_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) 1795{ 1796 struct glx_context * const gc = __glXGetCurrentContext(); 1797 const GLuint cmdlen = 20; 1798emit_header(gc->pc, X_GLrop_Vertex4fv, cmdlen); 1799(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1800(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1801(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 1802(void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4); 1803gc->pc += cmdlen; 1804if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1805} 1806 1807#define X_GLrop_Vertex4fv 74 1808void __indirect_glVertex4fv(const GLfloat * v) 1809{ 1810 generic_16_byte( X_GLrop_Vertex4fv, v ); 1811} 1812 1813#define X_GLrop_Vertex4iv 75 1814void __indirect_glVertex4i(GLint x, GLint y, GLint z, GLint w) 1815{ 1816 struct glx_context * const gc = __glXGetCurrentContext(); 1817 const GLuint cmdlen = 20; 1818emit_header(gc->pc, X_GLrop_Vertex4iv, cmdlen); 1819(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 1820(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 1821(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 1822(void) memcpy((void *)(gc->pc + 16), (void *)(&w), 4); 1823gc->pc += cmdlen; 1824if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1825} 1826 1827#define X_GLrop_Vertex4iv 75 1828void __indirect_glVertex4iv(const GLint * v) 1829{ 1830 generic_16_byte( X_GLrop_Vertex4iv, v ); 1831} 1832 1833#define X_GLrop_Vertex4sv 76 1834void __indirect_glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w) 1835{ 1836 struct glx_context * const gc = __glXGetCurrentContext(); 1837 const GLuint cmdlen = 12; 1838emit_header(gc->pc, X_GLrop_Vertex4sv, cmdlen); 1839(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 2); 1840(void) memcpy((void *)(gc->pc + 6), (void *)(&y), 2); 1841(void) memcpy((void *)(gc->pc + 8), (void *)(&z), 2); 1842(void) memcpy((void *)(gc->pc + 10), (void *)(&w), 2); 1843gc->pc += cmdlen; 1844if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1845} 1846 1847#define X_GLrop_Vertex4sv 76 1848void __indirect_glVertex4sv(const GLshort * v) 1849{ 1850 generic_8_byte( X_GLrop_Vertex4sv, v ); 1851} 1852 1853#define X_GLrop_ClipPlane 77 1854void __indirect_glClipPlane(GLenum plane, const GLdouble * equation) 1855{ 1856 struct glx_context * const gc = __glXGetCurrentContext(); 1857 const GLuint cmdlen = 40; 1858emit_header(gc->pc, X_GLrop_ClipPlane, cmdlen); 1859(void) memcpy((void *)(gc->pc + 4), (void *)(equation), 32); 1860(void) memcpy((void *)(gc->pc + 36), (void *)(&plane), 4); 1861gc->pc += cmdlen; 1862if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1863} 1864 1865#define X_GLrop_ColorMaterial 78 1866void __indirect_glColorMaterial(GLenum face, GLenum mode) 1867{ 1868 struct glx_context * const gc = __glXGetCurrentContext(); 1869 const GLuint cmdlen = 12; 1870emit_header(gc->pc, X_GLrop_ColorMaterial, cmdlen); 1871(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); 1872(void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4); 1873gc->pc += cmdlen; 1874if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1875} 1876 1877#define X_GLrop_CullFace 79 1878void __indirect_glCullFace(GLenum mode) 1879{ 1880 struct glx_context * const gc = __glXGetCurrentContext(); 1881 const GLuint cmdlen = 8; 1882emit_header(gc->pc, X_GLrop_CullFace, cmdlen); 1883(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 1884gc->pc += cmdlen; 1885if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1886} 1887 1888#define X_GLrop_Fogf 80 1889void __indirect_glFogf(GLenum pname, GLfloat param) 1890{ 1891 struct glx_context * const gc = __glXGetCurrentContext(); 1892 const GLuint cmdlen = 12; 1893emit_header(gc->pc, X_GLrop_Fogf, cmdlen); 1894(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 1895(void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); 1896gc->pc += cmdlen; 1897if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1898} 1899 1900#define X_GLrop_Fogfv 81 1901void __indirect_glFogfv(GLenum pname, const GLfloat * params) 1902{ 1903 struct glx_context * const gc = __glXGetCurrentContext(); 1904 const GLuint compsize = __glFogfv_size(pname); 1905 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); 1906emit_header(gc->pc, X_GLrop_Fogfv, cmdlen); 1907(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 1908(void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); 1909gc->pc += cmdlen; 1910if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1911} 1912 1913#define X_GLrop_Fogi 82 1914void __indirect_glFogi(GLenum pname, GLint param) 1915{ 1916 struct glx_context * const gc = __glXGetCurrentContext(); 1917 const GLuint cmdlen = 12; 1918emit_header(gc->pc, X_GLrop_Fogi, cmdlen); 1919(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 1920(void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); 1921gc->pc += cmdlen; 1922if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1923} 1924 1925#define X_GLrop_Fogiv 83 1926void __indirect_glFogiv(GLenum pname, const GLint * params) 1927{ 1928 struct glx_context * const gc = __glXGetCurrentContext(); 1929 const GLuint compsize = __glFogiv_size(pname); 1930 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); 1931emit_header(gc->pc, X_GLrop_Fogiv, cmdlen); 1932(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 1933(void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); 1934gc->pc += cmdlen; 1935if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1936} 1937 1938#define X_GLrop_FrontFace 84 1939void __indirect_glFrontFace(GLenum mode) 1940{ 1941 struct glx_context * const gc = __glXGetCurrentContext(); 1942 const GLuint cmdlen = 8; 1943emit_header(gc->pc, X_GLrop_FrontFace, cmdlen); 1944(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 1945gc->pc += cmdlen; 1946if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1947} 1948 1949#define X_GLrop_Hint 85 1950void __indirect_glHint(GLenum target, GLenum mode) 1951{ 1952 struct glx_context * const gc = __glXGetCurrentContext(); 1953 const GLuint cmdlen = 12; 1954emit_header(gc->pc, X_GLrop_Hint, cmdlen); 1955(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 1956(void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4); 1957gc->pc += cmdlen; 1958if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1959} 1960 1961#define X_GLrop_Lightf 86 1962void __indirect_glLightf(GLenum light, GLenum pname, GLfloat param) 1963{ 1964 struct glx_context * const gc = __glXGetCurrentContext(); 1965 const GLuint cmdlen = 16; 1966emit_header(gc->pc, X_GLrop_Lightf, cmdlen); 1967(void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4); 1968(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 1969(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 1970gc->pc += cmdlen; 1971if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1972} 1973 1974#define X_GLrop_Lightfv 87 1975void __indirect_glLightfv(GLenum light, GLenum pname, const GLfloat * params) 1976{ 1977 struct glx_context * const gc = __glXGetCurrentContext(); 1978 const GLuint compsize = __glLightfv_size(pname); 1979 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 1980emit_header(gc->pc, X_GLrop_Lightfv, cmdlen); 1981(void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4); 1982(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 1983(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 1984gc->pc += cmdlen; 1985if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1986} 1987 1988#define X_GLrop_Lighti 88 1989void __indirect_glLighti(GLenum light, GLenum pname, GLint param) 1990{ 1991 struct glx_context * const gc = __glXGetCurrentContext(); 1992 const GLuint cmdlen = 16; 1993emit_header(gc->pc, X_GLrop_Lighti, cmdlen); 1994(void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4); 1995(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 1996(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 1997gc->pc += cmdlen; 1998if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 1999} 2000 2001#define X_GLrop_Lightiv 89 2002void __indirect_glLightiv(GLenum light, GLenum pname, const GLint * params) 2003{ 2004 struct glx_context * const gc = __glXGetCurrentContext(); 2005 const GLuint compsize = __glLightiv_size(pname); 2006 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 2007emit_header(gc->pc, X_GLrop_Lightiv, cmdlen); 2008(void) memcpy((void *)(gc->pc + 4), (void *)(&light), 4); 2009(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2010(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 2011gc->pc += cmdlen; 2012if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2013} 2014 2015#define X_GLrop_LightModelf 90 2016void __indirect_glLightModelf(GLenum pname, GLfloat param) 2017{ 2018 struct glx_context * const gc = __glXGetCurrentContext(); 2019 const GLuint cmdlen = 12; 2020emit_header(gc->pc, X_GLrop_LightModelf, cmdlen); 2021(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 2022(void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); 2023gc->pc += cmdlen; 2024if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2025} 2026 2027#define X_GLrop_LightModelfv 91 2028void __indirect_glLightModelfv(GLenum pname, const GLfloat * params) 2029{ 2030 struct glx_context * const gc = __glXGetCurrentContext(); 2031 const GLuint compsize = __glLightModelfv_size(pname); 2032 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); 2033emit_header(gc->pc, X_GLrop_LightModelfv, cmdlen); 2034(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 2035(void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); 2036gc->pc += cmdlen; 2037if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2038} 2039 2040#define X_GLrop_LightModeli 92 2041void __indirect_glLightModeli(GLenum pname, GLint param) 2042{ 2043 struct glx_context * const gc = __glXGetCurrentContext(); 2044 const GLuint cmdlen = 12; 2045emit_header(gc->pc, X_GLrop_LightModeli, cmdlen); 2046(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 2047(void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); 2048gc->pc += cmdlen; 2049if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2050} 2051 2052#define X_GLrop_LightModeliv 93 2053void __indirect_glLightModeliv(GLenum pname, const GLint * params) 2054{ 2055 struct glx_context * const gc = __glXGetCurrentContext(); 2056 const GLuint compsize = __glLightModeliv_size(pname); 2057 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); 2058emit_header(gc->pc, X_GLrop_LightModeliv, cmdlen); 2059(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 2060(void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); 2061gc->pc += cmdlen; 2062if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2063} 2064 2065#define X_GLrop_LineStipple 94 2066void __indirect_glLineStipple(GLint factor, GLushort pattern) 2067{ 2068 struct glx_context * const gc = __glXGetCurrentContext(); 2069 const GLuint cmdlen = 12; 2070emit_header(gc->pc, X_GLrop_LineStipple, cmdlen); 2071(void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4); 2072(void) memcpy((void *)(gc->pc + 8), (void *)(&pattern), 2); 2073gc->pc += cmdlen; 2074if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2075} 2076 2077#define X_GLrop_LineWidth 95 2078void __indirect_glLineWidth(GLfloat width) 2079{ 2080 struct glx_context * const gc = __glXGetCurrentContext(); 2081 const GLuint cmdlen = 8; 2082emit_header(gc->pc, X_GLrop_LineWidth, cmdlen); 2083(void) memcpy((void *)(gc->pc + 4), (void *)(&width), 4); 2084gc->pc += cmdlen; 2085if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2086} 2087 2088#define X_GLrop_Materialf 96 2089void __indirect_glMaterialf(GLenum face, GLenum pname, GLfloat param) 2090{ 2091 struct glx_context * const gc = __glXGetCurrentContext(); 2092 const GLuint cmdlen = 16; 2093emit_header(gc->pc, X_GLrop_Materialf, cmdlen); 2094(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); 2095(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2096(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 2097gc->pc += cmdlen; 2098if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2099} 2100 2101#define X_GLrop_Materialfv 97 2102void __indirect_glMaterialfv(GLenum face, GLenum pname, const GLfloat * params) 2103{ 2104 struct glx_context * const gc = __glXGetCurrentContext(); 2105 const GLuint compsize = __glMaterialfv_size(pname); 2106 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 2107emit_header(gc->pc, X_GLrop_Materialfv, cmdlen); 2108(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); 2109(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2110(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 2111gc->pc += cmdlen; 2112if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2113} 2114 2115#define X_GLrop_Materiali 98 2116void __indirect_glMateriali(GLenum face, GLenum pname, GLint param) 2117{ 2118 struct glx_context * const gc = __glXGetCurrentContext(); 2119 const GLuint cmdlen = 16; 2120emit_header(gc->pc, X_GLrop_Materiali, cmdlen); 2121(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); 2122(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2123(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 2124gc->pc += cmdlen; 2125if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2126} 2127 2128#define X_GLrop_Materialiv 99 2129void __indirect_glMaterialiv(GLenum face, GLenum pname, const GLint * params) 2130{ 2131 struct glx_context * const gc = __glXGetCurrentContext(); 2132 const GLuint compsize = __glMaterialiv_size(pname); 2133 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 2134emit_header(gc->pc, X_GLrop_Materialiv, cmdlen); 2135(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); 2136(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2137(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 2138gc->pc += cmdlen; 2139if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2140} 2141 2142#define X_GLrop_PointSize 100 2143void __indirect_glPointSize(GLfloat size) 2144{ 2145 struct glx_context * const gc = __glXGetCurrentContext(); 2146 const GLuint cmdlen = 8; 2147emit_header(gc->pc, X_GLrop_PointSize, cmdlen); 2148(void) memcpy((void *)(gc->pc + 4), (void *)(&size), 4); 2149gc->pc += cmdlen; 2150if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2151} 2152 2153#define X_GLrop_PolygonMode 101 2154void __indirect_glPolygonMode(GLenum face, GLenum mode) 2155{ 2156 struct glx_context * const gc = __glXGetCurrentContext(); 2157 const GLuint cmdlen = 12; 2158emit_header(gc->pc, X_GLrop_PolygonMode, cmdlen); 2159(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); 2160(void) memcpy((void *)(gc->pc + 8), (void *)(&mode), 4); 2161gc->pc += cmdlen; 2162if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2163} 2164 2165#define X_GLrop_PolygonStipple 102 2166void __indirect_glPolygonStipple(const GLubyte * mask) 2167{ 2168 struct glx_context * const gc = __glXGetCurrentContext(); 2169 const GLuint compsize = (mask != NULL) ? __glImageSize(32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, 0) : 0; 2170 const GLuint cmdlen = 24 + __GLX_PAD(compsize); 2171emit_header(gc->pc, X_GLrop_PolygonStipple, cmdlen); 2172if (compsize > 0) { 2173 (*gc->fillImage)(gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, gc->pc + 24, gc->pc + 4); 2174} else { 2175 (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); 2176} 2177gc->pc += cmdlen; 2178if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2179} 2180 2181#define X_GLrop_Scissor 103 2182void __indirect_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) 2183{ 2184 struct glx_context * const gc = __glXGetCurrentContext(); 2185 const GLuint cmdlen = 20; 2186emit_header(gc->pc, X_GLrop_Scissor, cmdlen); 2187(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 2188(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 2189(void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4); 2190(void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4); 2191gc->pc += cmdlen; 2192if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2193} 2194 2195#define X_GLrop_ShadeModel 104 2196void __indirect_glShadeModel(GLenum mode) 2197{ 2198 struct glx_context * const gc = __glXGetCurrentContext(); 2199 const GLuint cmdlen = 8; 2200emit_header(gc->pc, X_GLrop_ShadeModel, cmdlen); 2201(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 2202gc->pc += cmdlen; 2203if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2204} 2205 2206#define X_GLrop_TexParameterf 105 2207void __indirect_glTexParameterf(GLenum target, GLenum pname, GLfloat param) 2208{ 2209 struct glx_context * const gc = __glXGetCurrentContext(); 2210 const GLuint cmdlen = 16; 2211emit_header(gc->pc, X_GLrop_TexParameterf, cmdlen); 2212(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 2213(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2214(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 2215gc->pc += cmdlen; 2216if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2217} 2218 2219#define X_GLrop_TexParameterfv 106 2220void __indirect_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params) 2221{ 2222 struct glx_context * const gc = __glXGetCurrentContext(); 2223 const GLuint compsize = __glTexParameterfv_size(pname); 2224 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 2225emit_header(gc->pc, X_GLrop_TexParameterfv, cmdlen); 2226(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 2227(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2228(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 2229gc->pc += cmdlen; 2230if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2231} 2232 2233#define X_GLrop_TexParameteri 107 2234void __indirect_glTexParameteri(GLenum target, GLenum pname, GLint param) 2235{ 2236 struct glx_context * const gc = __glXGetCurrentContext(); 2237 const GLuint cmdlen = 16; 2238emit_header(gc->pc, X_GLrop_TexParameteri, cmdlen); 2239(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 2240(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2241(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 2242gc->pc += cmdlen; 2243if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2244} 2245 2246#define X_GLrop_TexParameteriv 108 2247void __indirect_glTexParameteriv(GLenum target, GLenum pname, const GLint * params) 2248{ 2249 struct glx_context * const gc = __glXGetCurrentContext(); 2250 const GLuint compsize = __glTexParameteriv_size(pname); 2251 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 2252emit_header(gc->pc, X_GLrop_TexParameteriv, cmdlen); 2253(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 2254(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2255(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 2256gc->pc += cmdlen; 2257if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2258} 2259 2260static void 2261__glx_TexImage_1D2D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels ) 2262{ 2263 struct glx_context * const gc = __glXGetCurrentContext(); 2264 const GLuint compsize = __glImageSize(width, height, 1, format, type, target); 2265 const GLuint cmdlen = 56 + __GLX_PAD(compsize); 2266 if (__builtin_expect(gc->currentDpy != NULL, 1)) { 2267if (cmdlen <= gc->maxSmallRenderCommandSize) { 2268 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 2269 (void) __glXFlushRenderBuffer(gc, gc->pc); 2270 } 2271emit_header(gc->pc, opcode, cmdlen); 2272(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); 2273(void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4); 2274(void) memcpy((void *)(gc->pc + 32), (void *)(&internalformat), 4); 2275(void) memcpy((void *)(gc->pc + 36), (void *)(&width), 4); 2276(void) memcpy((void *)(gc->pc + 40), (void *)(&height), 4); 2277(void) memcpy((void *)(gc->pc + 44), (void *)(&border), 4); 2278(void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4); 2279(void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4); 2280if ((compsize > 0) && (pixels != NULL)) { 2281 (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 56, gc->pc + 4); 2282} else { 2283 (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); 2284} 2285gc->pc += cmdlen; 2286if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2287} 2288else { 2289const GLint op = opcode; 2290const GLuint cmdlenLarge = cmdlen + 4; 2291GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 2292(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 2293(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 2294(void) memcpy((void *)(pc + 28), (void *)(&target), 4); 2295(void) memcpy((void *)(pc + 32), (void *)(&level), 4); 2296(void) memcpy((void *)(pc + 36), (void *)(&internalformat), 4); 2297(void) memcpy((void *)(pc + 40), (void *)(&width), 4); 2298(void) memcpy((void *)(pc + 44), (void *)(&height), 4); 2299(void) memcpy((void *)(pc + 48), (void *)(&border), 4); 2300(void) memcpy((void *)(pc + 52), (void *)(&format), 4); 2301(void) memcpy((void *)(pc + 56), (void *)(&type), 4); 2302__glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 60, pc + 8); 2303} 2304 } 2305} 2306 2307#define X_GLrop_TexImage1D 109 2308void __indirect_glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels) 2309{ 2310 __glx_TexImage_1D2D(X_GLrop_TexImage1D, 1, target, level, internalformat, width, 1, border, format, type, pixels ); 2311} 2312 2313#define X_GLrop_TexImage2D 110 2314void __indirect_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels) 2315{ 2316 __glx_TexImage_1D2D(X_GLrop_TexImage2D, 2, target, level, internalformat, width, height, border, format, type, pixels ); 2317} 2318 2319#define X_GLrop_TexEnvf 111 2320void __indirect_glTexEnvf(GLenum target, GLenum pname, GLfloat param) 2321{ 2322 struct glx_context * const gc = __glXGetCurrentContext(); 2323 const GLuint cmdlen = 16; 2324emit_header(gc->pc, X_GLrop_TexEnvf, cmdlen); 2325(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 2326(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2327(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 2328gc->pc += cmdlen; 2329if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2330} 2331 2332#define X_GLrop_TexEnvfv 112 2333void __indirect_glTexEnvfv(GLenum target, GLenum pname, const GLfloat * params) 2334{ 2335 struct glx_context * const gc = __glXGetCurrentContext(); 2336 const GLuint compsize = __glTexEnvfv_size(pname); 2337 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 2338emit_header(gc->pc, X_GLrop_TexEnvfv, cmdlen); 2339(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 2340(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2341(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 2342gc->pc += cmdlen; 2343if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2344} 2345 2346#define X_GLrop_TexEnvi 113 2347void __indirect_glTexEnvi(GLenum target, GLenum pname, GLint param) 2348{ 2349 struct glx_context * const gc = __glXGetCurrentContext(); 2350 const GLuint cmdlen = 16; 2351emit_header(gc->pc, X_GLrop_TexEnvi, cmdlen); 2352(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 2353(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2354(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 2355gc->pc += cmdlen; 2356if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2357} 2358 2359#define X_GLrop_TexEnviv 114 2360void __indirect_glTexEnviv(GLenum target, GLenum pname, const GLint * params) 2361{ 2362 struct glx_context * const gc = __glXGetCurrentContext(); 2363 const GLuint compsize = __glTexEnviv_size(pname); 2364 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 2365emit_header(gc->pc, X_GLrop_TexEnviv, cmdlen); 2366(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 2367(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2368(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 2369gc->pc += cmdlen; 2370if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2371} 2372 2373#define X_GLrop_TexGend 115 2374void __indirect_glTexGend(GLenum coord, GLenum pname, GLdouble param) 2375{ 2376 struct glx_context * const gc = __glXGetCurrentContext(); 2377 const GLuint cmdlen = 20; 2378emit_header(gc->pc, X_GLrop_TexGend, cmdlen); 2379(void) memcpy((void *)(gc->pc + 4), (void *)(¶m), 8); 2380(void) memcpy((void *)(gc->pc + 12), (void *)(&coord), 4); 2381(void) memcpy((void *)(gc->pc + 16), (void *)(&pname), 4); 2382gc->pc += cmdlen; 2383if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2384} 2385 2386#define X_GLrop_TexGendv 116 2387void __indirect_glTexGendv(GLenum coord, GLenum pname, const GLdouble * params) 2388{ 2389 struct glx_context * const gc = __glXGetCurrentContext(); 2390 const GLuint compsize = __glTexGendv_size(pname); 2391 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)); 2392emit_header(gc->pc, X_GLrop_TexGendv, cmdlen); 2393(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); 2394(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2395(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 8)); 2396gc->pc += cmdlen; 2397if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2398} 2399 2400#define X_GLrop_TexGenf 117 2401void __indirect_glTexGenf(GLenum coord, GLenum pname, GLfloat param) 2402{ 2403 struct glx_context * const gc = __glXGetCurrentContext(); 2404 const GLuint cmdlen = 16; 2405emit_header(gc->pc, X_GLrop_TexGenf, cmdlen); 2406(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); 2407(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2408(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 2409gc->pc += cmdlen; 2410if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2411} 2412 2413#define X_GLrop_TexGenfv 118 2414void __indirect_glTexGenfv(GLenum coord, GLenum pname, const GLfloat * params) 2415{ 2416 struct glx_context * const gc = __glXGetCurrentContext(); 2417 const GLuint compsize = __glTexGenfv_size(pname); 2418 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 2419emit_header(gc->pc, X_GLrop_TexGenfv, cmdlen); 2420(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); 2421(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2422(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 2423gc->pc += cmdlen; 2424if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2425} 2426 2427#define X_GLrop_TexGeni 119 2428void __indirect_glTexGeni(GLenum coord, GLenum pname, GLint param) 2429{ 2430 struct glx_context * const gc = __glXGetCurrentContext(); 2431 const GLuint cmdlen = 16; 2432emit_header(gc->pc, X_GLrop_TexGeni, cmdlen); 2433(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); 2434(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2435(void) memcpy((void *)(gc->pc + 12), (void *)(¶m), 4); 2436gc->pc += cmdlen; 2437if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2438} 2439 2440#define X_GLrop_TexGeniv 120 2441void __indirect_glTexGeniv(GLenum coord, GLenum pname, const GLint * params) 2442{ 2443 struct glx_context * const gc = __glXGetCurrentContext(); 2444 const GLuint compsize = __glTexGeniv_size(pname); 2445 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 2446emit_header(gc->pc, X_GLrop_TexGeniv, cmdlen); 2447(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); 2448(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 2449(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 2450gc->pc += cmdlen; 2451if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2452} 2453 2454#define X_GLrop_InitNames 121 2455void __indirect_glInitNames(void) 2456{ 2457 struct glx_context * const gc = __glXGetCurrentContext(); 2458 const GLuint cmdlen = 4; 2459emit_header(gc->pc, X_GLrop_InitNames, cmdlen); 2460gc->pc += cmdlen; 2461if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2462} 2463 2464#define X_GLrop_LoadName 122 2465void __indirect_glLoadName(GLuint name) 2466{ 2467 struct glx_context * const gc = __glXGetCurrentContext(); 2468 const GLuint cmdlen = 8; 2469emit_header(gc->pc, X_GLrop_LoadName, cmdlen); 2470(void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4); 2471gc->pc += cmdlen; 2472if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2473} 2474 2475#define X_GLrop_PassThrough 123 2476void __indirect_glPassThrough(GLfloat token) 2477{ 2478 struct glx_context * const gc = __glXGetCurrentContext(); 2479 const GLuint cmdlen = 8; 2480emit_header(gc->pc, X_GLrop_PassThrough, cmdlen); 2481(void) memcpy((void *)(gc->pc + 4), (void *)(&token), 4); 2482gc->pc += cmdlen; 2483if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2484} 2485 2486#define X_GLrop_PopName 124 2487void __indirect_glPopName(void) 2488{ 2489 struct glx_context * const gc = __glXGetCurrentContext(); 2490 const GLuint cmdlen = 4; 2491emit_header(gc->pc, X_GLrop_PopName, cmdlen); 2492gc->pc += cmdlen; 2493if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2494} 2495 2496#define X_GLrop_PushName 125 2497void __indirect_glPushName(GLuint name) 2498{ 2499 struct glx_context * const gc = __glXGetCurrentContext(); 2500 const GLuint cmdlen = 8; 2501emit_header(gc->pc, X_GLrop_PushName, cmdlen); 2502(void) memcpy((void *)(gc->pc + 4), (void *)(&name), 4); 2503gc->pc += cmdlen; 2504if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2505} 2506 2507#define X_GLrop_DrawBuffer 126 2508void __indirect_glDrawBuffer(GLenum mode) 2509{ 2510 struct glx_context * const gc = __glXGetCurrentContext(); 2511 const GLuint cmdlen = 8; 2512emit_header(gc->pc, X_GLrop_DrawBuffer, cmdlen); 2513(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 2514gc->pc += cmdlen; 2515if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2516} 2517 2518#define X_GLrop_Clear 127 2519void __indirect_glClear(GLbitfield mask) 2520{ 2521 struct glx_context * const gc = __glXGetCurrentContext(); 2522 const GLuint cmdlen = 8; 2523emit_header(gc->pc, X_GLrop_Clear, cmdlen); 2524(void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4); 2525gc->pc += cmdlen; 2526if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2527} 2528 2529#define X_GLrop_ClearAccum 128 2530void __indirect_glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) 2531{ 2532 struct glx_context * const gc = __glXGetCurrentContext(); 2533 const GLuint cmdlen = 20; 2534emit_header(gc->pc, X_GLrop_ClearAccum, cmdlen); 2535(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 2536(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 2537(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 2538(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); 2539gc->pc += cmdlen; 2540if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2541} 2542 2543#define X_GLrop_ClearIndex 129 2544void __indirect_glClearIndex(GLfloat c) 2545{ 2546 struct glx_context * const gc = __glXGetCurrentContext(); 2547 const GLuint cmdlen = 8; 2548emit_header(gc->pc, X_GLrop_ClearIndex, cmdlen); 2549(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 4); 2550gc->pc += cmdlen; 2551if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2552} 2553 2554#define X_GLrop_ClearColor 130 2555void __indirect_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) 2556{ 2557 struct glx_context * const gc = __glXGetCurrentContext(); 2558 const GLuint cmdlen = 20; 2559emit_header(gc->pc, X_GLrop_ClearColor, cmdlen); 2560(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 2561(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 2562(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 2563(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); 2564gc->pc += cmdlen; 2565if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2566} 2567 2568#define X_GLrop_ClearStencil 131 2569void __indirect_glClearStencil(GLint s) 2570{ 2571 struct glx_context * const gc = __glXGetCurrentContext(); 2572 const GLuint cmdlen = 8; 2573emit_header(gc->pc, X_GLrop_ClearStencil, cmdlen); 2574(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 4); 2575gc->pc += cmdlen; 2576if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2577} 2578 2579#define X_GLrop_ClearDepth 132 2580void __indirect_glClearDepth(GLclampd depth) 2581{ 2582 struct glx_context * const gc = __glXGetCurrentContext(); 2583 const GLuint cmdlen = 12; 2584emit_header(gc->pc, X_GLrop_ClearDepth, cmdlen); 2585(void) memcpy((void *)(gc->pc + 4), (void *)(&depth), 8); 2586gc->pc += cmdlen; 2587if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2588} 2589 2590#define X_GLrop_StencilMask 133 2591void __indirect_glStencilMask(GLuint mask) 2592{ 2593 struct glx_context * const gc = __glXGetCurrentContext(); 2594 const GLuint cmdlen = 8; 2595emit_header(gc->pc, X_GLrop_StencilMask, cmdlen); 2596(void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4); 2597gc->pc += cmdlen; 2598if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2599} 2600 2601#define X_GLrop_ColorMask 134 2602void __indirect_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) 2603{ 2604 struct glx_context * const gc = __glXGetCurrentContext(); 2605 const GLuint cmdlen = 8; 2606emit_header(gc->pc, X_GLrop_ColorMask, cmdlen); 2607(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); 2608(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); 2609(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); 2610(void) memcpy((void *)(gc->pc + 7), (void *)(&alpha), 1); 2611gc->pc += cmdlen; 2612if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2613} 2614 2615#define X_GLrop_DepthMask 135 2616void __indirect_glDepthMask(GLboolean flag) 2617{ 2618 struct glx_context * const gc = __glXGetCurrentContext(); 2619 const GLuint cmdlen = 8; 2620emit_header(gc->pc, X_GLrop_DepthMask, cmdlen); 2621(void) memcpy((void *)(gc->pc + 4), (void *)(&flag), 1); 2622gc->pc += cmdlen; 2623if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2624} 2625 2626#define X_GLrop_IndexMask 136 2627void __indirect_glIndexMask(GLuint mask) 2628{ 2629 struct glx_context * const gc = __glXGetCurrentContext(); 2630 const GLuint cmdlen = 8; 2631emit_header(gc->pc, X_GLrop_IndexMask, cmdlen); 2632(void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4); 2633gc->pc += cmdlen; 2634if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2635} 2636 2637#define X_GLrop_Accum 137 2638void __indirect_glAccum(GLenum op, GLfloat value) 2639{ 2640 struct glx_context * const gc = __glXGetCurrentContext(); 2641 const GLuint cmdlen = 12; 2642emit_header(gc->pc, X_GLrop_Accum, cmdlen); 2643(void) memcpy((void *)(gc->pc + 4), (void *)(&op), 4); 2644(void) memcpy((void *)(gc->pc + 8), (void *)(&value), 4); 2645gc->pc += cmdlen; 2646if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2647} 2648 2649#define X_GLrop_PopAttrib 141 2650void __indirect_glPopAttrib(void) 2651{ 2652 struct glx_context * const gc = __glXGetCurrentContext(); 2653 const GLuint cmdlen = 4; 2654emit_header(gc->pc, X_GLrop_PopAttrib, cmdlen); 2655gc->pc += cmdlen; 2656if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2657} 2658 2659#define X_GLrop_PushAttrib 142 2660void __indirect_glPushAttrib(GLbitfield mask) 2661{ 2662 struct glx_context * const gc = __glXGetCurrentContext(); 2663 const GLuint cmdlen = 8; 2664emit_header(gc->pc, X_GLrop_PushAttrib, cmdlen); 2665(void) memcpy((void *)(gc->pc + 4), (void *)(&mask), 4); 2666gc->pc += cmdlen; 2667if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2668} 2669 2670#define X_GLrop_MapGrid1d 147 2671void __indirect_glMapGrid1d(GLint un, GLdouble u1, GLdouble u2) 2672{ 2673 struct glx_context * const gc = __glXGetCurrentContext(); 2674 const GLuint cmdlen = 24; 2675emit_header(gc->pc, X_GLrop_MapGrid1d, cmdlen); 2676(void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8); 2677(void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8); 2678(void) memcpy((void *)(gc->pc + 20), (void *)(&un), 4); 2679gc->pc += cmdlen; 2680if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2681} 2682 2683#define X_GLrop_MapGrid1f 148 2684void __indirect_glMapGrid1f(GLint un, GLfloat u1, GLfloat u2) 2685{ 2686 struct glx_context * const gc = __glXGetCurrentContext(); 2687 const GLuint cmdlen = 16; 2688emit_header(gc->pc, X_GLrop_MapGrid1f, cmdlen); 2689(void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4); 2690(void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4); 2691(void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4); 2692gc->pc += cmdlen; 2693if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2694} 2695 2696#define X_GLrop_MapGrid2d 149 2697void __indirect_glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) 2698{ 2699 struct glx_context * const gc = __glXGetCurrentContext(); 2700 const GLuint cmdlen = 44; 2701emit_header(gc->pc, X_GLrop_MapGrid2d, cmdlen); 2702(void) memcpy((void *)(gc->pc + 4), (void *)(&u1), 8); 2703(void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 8); 2704(void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 8); 2705(void) memcpy((void *)(gc->pc + 28), (void *)(&v2), 8); 2706(void) memcpy((void *)(gc->pc + 36), (void *)(&un), 4); 2707(void) memcpy((void *)(gc->pc + 40), (void *)(&vn), 4); 2708gc->pc += cmdlen; 2709if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2710} 2711 2712#define X_GLrop_MapGrid2f 150 2713void __indirect_glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) 2714{ 2715 struct glx_context * const gc = __glXGetCurrentContext(); 2716 const GLuint cmdlen = 28; 2717emit_header(gc->pc, X_GLrop_MapGrid2f, cmdlen); 2718(void) memcpy((void *)(gc->pc + 4), (void *)(&un), 4); 2719(void) memcpy((void *)(gc->pc + 8), (void *)(&u1), 4); 2720(void) memcpy((void *)(gc->pc + 12), (void *)(&u2), 4); 2721(void) memcpy((void *)(gc->pc + 16), (void *)(&vn), 4); 2722(void) memcpy((void *)(gc->pc + 20), (void *)(&v1), 4); 2723(void) memcpy((void *)(gc->pc + 24), (void *)(&v2), 4); 2724gc->pc += cmdlen; 2725if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2726} 2727 2728#define X_GLrop_EvalCoord1dv 151 2729void __indirect_glEvalCoord1d(GLdouble u) 2730{ 2731 struct glx_context * const gc = __glXGetCurrentContext(); 2732 const GLuint cmdlen = 12; 2733emit_header(gc->pc, X_GLrop_EvalCoord1dv, cmdlen); 2734(void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8); 2735gc->pc += cmdlen; 2736if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2737} 2738 2739#define X_GLrop_EvalCoord1dv 151 2740void __indirect_glEvalCoord1dv(const GLdouble * u) 2741{ 2742 generic_8_byte( X_GLrop_EvalCoord1dv, u ); 2743} 2744 2745#define X_GLrop_EvalCoord1fv 152 2746void __indirect_glEvalCoord1f(GLfloat u) 2747{ 2748 struct glx_context * const gc = __glXGetCurrentContext(); 2749 const GLuint cmdlen = 8; 2750emit_header(gc->pc, X_GLrop_EvalCoord1fv, cmdlen); 2751(void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4); 2752gc->pc += cmdlen; 2753if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2754} 2755 2756#define X_GLrop_EvalCoord1fv 152 2757void __indirect_glEvalCoord1fv(const GLfloat * u) 2758{ 2759 generic_4_byte( X_GLrop_EvalCoord1fv, u ); 2760} 2761 2762#define X_GLrop_EvalCoord2dv 153 2763void __indirect_glEvalCoord2d(GLdouble u, GLdouble v) 2764{ 2765 struct glx_context * const gc = __glXGetCurrentContext(); 2766 const GLuint cmdlen = 20; 2767emit_header(gc->pc, X_GLrop_EvalCoord2dv, cmdlen); 2768(void) memcpy((void *)(gc->pc + 4), (void *)(&u), 8); 2769(void) memcpy((void *)(gc->pc + 12), (void *)(&v), 8); 2770gc->pc += cmdlen; 2771if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2772} 2773 2774#define X_GLrop_EvalCoord2dv 153 2775void __indirect_glEvalCoord2dv(const GLdouble * u) 2776{ 2777 generic_16_byte( X_GLrop_EvalCoord2dv, u ); 2778} 2779 2780#define X_GLrop_EvalCoord2fv 154 2781void __indirect_glEvalCoord2f(GLfloat u, GLfloat v) 2782{ 2783 struct glx_context * const gc = __glXGetCurrentContext(); 2784 const GLuint cmdlen = 12; 2785emit_header(gc->pc, X_GLrop_EvalCoord2fv, cmdlen); 2786(void) memcpy((void *)(gc->pc + 4), (void *)(&u), 4); 2787(void) memcpy((void *)(gc->pc + 8), (void *)(&v), 4); 2788gc->pc += cmdlen; 2789if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2790} 2791 2792#define X_GLrop_EvalCoord2fv 154 2793void __indirect_glEvalCoord2fv(const GLfloat * u) 2794{ 2795 generic_8_byte( X_GLrop_EvalCoord2fv, u ); 2796} 2797 2798#define X_GLrop_EvalMesh1 155 2799void __indirect_glEvalMesh1(GLenum mode, GLint i1, GLint i2) 2800{ 2801 struct glx_context * const gc = __glXGetCurrentContext(); 2802 const GLuint cmdlen = 16; 2803emit_header(gc->pc, X_GLrop_EvalMesh1, cmdlen); 2804(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 2805(void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4); 2806(void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4); 2807gc->pc += cmdlen; 2808if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2809} 2810 2811#define X_GLrop_EvalPoint1 156 2812void __indirect_glEvalPoint1(GLint i) 2813{ 2814 struct glx_context * const gc = __glXGetCurrentContext(); 2815 const GLuint cmdlen = 8; 2816emit_header(gc->pc, X_GLrop_EvalPoint1, cmdlen); 2817(void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4); 2818gc->pc += cmdlen; 2819if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2820} 2821 2822#define X_GLrop_EvalMesh2 157 2823void __indirect_glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) 2824{ 2825 struct glx_context * const gc = __glXGetCurrentContext(); 2826 const GLuint cmdlen = 24; 2827emit_header(gc->pc, X_GLrop_EvalMesh2, cmdlen); 2828(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 2829(void) memcpy((void *)(gc->pc + 8), (void *)(&i1), 4); 2830(void) memcpy((void *)(gc->pc + 12), (void *)(&i2), 4); 2831(void) memcpy((void *)(gc->pc + 16), (void *)(&j1), 4); 2832(void) memcpy((void *)(gc->pc + 20), (void *)(&j2), 4); 2833gc->pc += cmdlen; 2834if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2835} 2836 2837#define X_GLrop_EvalPoint2 158 2838void __indirect_glEvalPoint2(GLint i, GLint j) 2839{ 2840 struct glx_context * const gc = __glXGetCurrentContext(); 2841 const GLuint cmdlen = 12; 2842emit_header(gc->pc, X_GLrop_EvalPoint2, cmdlen); 2843(void) memcpy((void *)(gc->pc + 4), (void *)(&i), 4); 2844(void) memcpy((void *)(gc->pc + 8), (void *)(&j), 4); 2845gc->pc += cmdlen; 2846if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2847} 2848 2849#define X_GLrop_AlphaFunc 159 2850void __indirect_glAlphaFunc(GLenum func, GLclampf ref) 2851{ 2852 struct glx_context * const gc = __glXGetCurrentContext(); 2853 const GLuint cmdlen = 12; 2854emit_header(gc->pc, X_GLrop_AlphaFunc, cmdlen); 2855(void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4); 2856(void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4); 2857gc->pc += cmdlen; 2858if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2859} 2860 2861#define X_GLrop_BlendFunc 160 2862void __indirect_glBlendFunc(GLenum sfactor, GLenum dfactor) 2863{ 2864 struct glx_context * const gc = __glXGetCurrentContext(); 2865 const GLuint cmdlen = 12; 2866emit_header(gc->pc, X_GLrop_BlendFunc, cmdlen); 2867(void) memcpy((void *)(gc->pc + 4), (void *)(&sfactor), 4); 2868(void) memcpy((void *)(gc->pc + 8), (void *)(&dfactor), 4); 2869gc->pc += cmdlen; 2870if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2871} 2872 2873#define X_GLrop_LogicOp 161 2874void __indirect_glLogicOp(GLenum opcode) 2875{ 2876 struct glx_context * const gc = __glXGetCurrentContext(); 2877 const GLuint cmdlen = 8; 2878emit_header(gc->pc, X_GLrop_LogicOp, cmdlen); 2879(void) memcpy((void *)(gc->pc + 4), (void *)(&opcode), 4); 2880gc->pc += cmdlen; 2881if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2882} 2883 2884#define X_GLrop_StencilFunc 162 2885void __indirect_glStencilFunc(GLenum func, GLint ref, GLuint mask) 2886{ 2887 struct glx_context * const gc = __glXGetCurrentContext(); 2888 const GLuint cmdlen = 16; 2889emit_header(gc->pc, X_GLrop_StencilFunc, cmdlen); 2890(void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4); 2891(void) memcpy((void *)(gc->pc + 8), (void *)(&ref), 4); 2892(void) memcpy((void *)(gc->pc + 12), (void *)(&mask), 4); 2893gc->pc += cmdlen; 2894if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2895} 2896 2897#define X_GLrop_StencilOp 163 2898void __indirect_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) 2899{ 2900 struct glx_context * const gc = __glXGetCurrentContext(); 2901 const GLuint cmdlen = 16; 2902emit_header(gc->pc, X_GLrop_StencilOp, cmdlen); 2903(void) memcpy((void *)(gc->pc + 4), (void *)(&fail), 4); 2904(void) memcpy((void *)(gc->pc + 8), (void *)(&zfail), 4); 2905(void) memcpy((void *)(gc->pc + 12), (void *)(&zpass), 4); 2906gc->pc += cmdlen; 2907if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2908} 2909 2910#define X_GLrop_DepthFunc 164 2911void __indirect_glDepthFunc(GLenum func) 2912{ 2913 struct glx_context * const gc = __glXGetCurrentContext(); 2914 const GLuint cmdlen = 8; 2915emit_header(gc->pc, X_GLrop_DepthFunc, cmdlen); 2916(void) memcpy((void *)(gc->pc + 4), (void *)(&func), 4); 2917gc->pc += cmdlen; 2918if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2919} 2920 2921#define X_GLrop_PixelZoom 165 2922void __indirect_glPixelZoom(GLfloat xfactor, GLfloat yfactor) 2923{ 2924 struct glx_context * const gc = __glXGetCurrentContext(); 2925 const GLuint cmdlen = 12; 2926emit_header(gc->pc, X_GLrop_PixelZoom, cmdlen); 2927(void) memcpy((void *)(gc->pc + 4), (void *)(&xfactor), 4); 2928(void) memcpy((void *)(gc->pc + 8), (void *)(&yfactor), 4); 2929gc->pc += cmdlen; 2930if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2931} 2932 2933#define X_GLrop_PixelTransferf 166 2934void __indirect_glPixelTransferf(GLenum pname, GLfloat param) 2935{ 2936 struct glx_context * const gc = __glXGetCurrentContext(); 2937 const GLuint cmdlen = 12; 2938emit_header(gc->pc, X_GLrop_PixelTransferf, cmdlen); 2939(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 2940(void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); 2941gc->pc += cmdlen; 2942if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2943} 2944 2945#define X_GLrop_PixelTransferi 167 2946void __indirect_glPixelTransferi(GLenum pname, GLint param) 2947{ 2948 struct glx_context * const gc = __glXGetCurrentContext(); 2949 const GLuint cmdlen = 12; 2950emit_header(gc->pc, X_GLrop_PixelTransferi, cmdlen); 2951(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 2952(void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); 2953gc->pc += cmdlen; 2954if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2955} 2956 2957#define X_GLrop_PixelMapfv 168 2958void __indirect_glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values) 2959{ 2960 struct glx_context * const gc = __glXGetCurrentContext(); 2961 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4)); 2962 if (mapsize < 0) { 2963 __glXSetError(gc, GL_INVALID_VALUE); 2964 return; 2965 } 2966 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) { 2967if (cmdlen <= gc->maxSmallRenderCommandSize) { 2968 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 2969 (void) __glXFlushRenderBuffer(gc, gc->pc); 2970 } 2971emit_header(gc->pc, X_GLrop_PixelMapfv, cmdlen); 2972(void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4); 2973(void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4); 2974(void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4)); 2975gc->pc += cmdlen; 2976if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 2977} 2978else { 2979const GLint op = X_GLrop_PixelMapfv; 2980const GLuint cmdlenLarge = cmdlen + 4; 2981GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 2982(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 2983(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 2984(void) memcpy((void *)(pc + 8), (void *)(&map), 4); 2985(void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4); 2986 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4)); 2987} 2988 } 2989} 2990 2991#define X_GLrop_PixelMapuiv 169 2992void __indirect_glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values) 2993{ 2994 struct glx_context * const gc = __glXGetCurrentContext(); 2995 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 4)); 2996 if (mapsize < 0) { 2997 __glXSetError(gc, GL_INVALID_VALUE); 2998 return; 2999 } 3000 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) { 3001if (cmdlen <= gc->maxSmallRenderCommandSize) { 3002 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 3003 (void) __glXFlushRenderBuffer(gc, gc->pc); 3004 } 3005emit_header(gc->pc, X_GLrop_PixelMapuiv, cmdlen); 3006(void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4); 3007(void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4); 3008(void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 4)); 3009gc->pc += cmdlen; 3010if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3011} 3012else { 3013const GLint op = X_GLrop_PixelMapuiv; 3014const GLuint cmdlenLarge = cmdlen + 4; 3015GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 3016(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 3017(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 3018(void) memcpy((void *)(pc + 8), (void *)(&map), 4); 3019(void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4); 3020 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 4)); 3021} 3022 } 3023} 3024 3025#define X_GLrop_PixelMapusv 170 3026void __indirect_glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values) 3027{ 3028 struct glx_context * const gc = __glXGetCurrentContext(); 3029 const GLuint cmdlen = 12 + __GLX_PAD((mapsize * 2)); 3030 if (mapsize < 0) { 3031 __glXSetError(gc, GL_INVALID_VALUE); 3032 return; 3033 } 3034 if (__builtin_expect((mapsize >= 0) && (gc->currentDpy != NULL), 1)) { 3035if (cmdlen <= gc->maxSmallRenderCommandSize) { 3036 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 3037 (void) __glXFlushRenderBuffer(gc, gc->pc); 3038 } 3039emit_header(gc->pc, X_GLrop_PixelMapusv, cmdlen); 3040(void) memcpy((void *)(gc->pc + 4), (void *)(&map), 4); 3041(void) memcpy((void *)(gc->pc + 8), (void *)(&mapsize), 4); 3042(void) memcpy((void *)(gc->pc + 12), (void *)(values), (mapsize * 2)); 3043gc->pc += cmdlen; 3044if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3045} 3046else { 3047const GLint op = X_GLrop_PixelMapusv; 3048const GLuint cmdlenLarge = cmdlen + 4; 3049GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 3050(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 3051(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 3052(void) memcpy((void *)(pc + 8), (void *)(&map), 4); 3053(void) memcpy((void *)(pc + 12), (void *)(&mapsize), 4); 3054 __glXSendLargeCommand(gc, pc, 16, values, (mapsize * 2)); 3055} 3056 } 3057} 3058 3059#define X_GLrop_ReadBuffer 171 3060void __indirect_glReadBuffer(GLenum mode) 3061{ 3062 struct glx_context * const gc = __glXGetCurrentContext(); 3063 const GLuint cmdlen = 8; 3064emit_header(gc->pc, X_GLrop_ReadBuffer, cmdlen); 3065(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 3066gc->pc += cmdlen; 3067if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3068} 3069 3070#define X_GLrop_CopyPixels 172 3071void __indirect_glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) 3072{ 3073 struct glx_context * const gc = __glXGetCurrentContext(); 3074 const GLuint cmdlen = 24; 3075emit_header(gc->pc, X_GLrop_CopyPixels, cmdlen); 3076(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 3077(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 3078(void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4); 3079(void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4); 3080(void) memcpy((void *)(gc->pc + 20), (void *)(&type), 4); 3081gc->pc += cmdlen; 3082if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3083} 3084 3085#define X_GLsop_ReadPixels 111 3086void __indirect_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels) 3087{ 3088 struct glx_context * const gc = __glXGetCurrentContext(); 3089 const __GLXattribute * const state = gc->client_state_private; 3090 Display * const dpy = gc->currentDpy; 3091#ifndef USE_XCB 3092 const GLuint cmdlen = 28; 3093#endif 3094 if (__builtin_expect(dpy != NULL, 1)) { 3095#ifdef USE_XCB 3096 xcb_connection_t *c = XGetXCBConnection(dpy); 3097 (void) __glXFlushRenderBuffer(gc, gc->pc); 3098 xcb_glx_read_pixels_reply_t *reply = xcb_glx_read_pixels_reply(c, xcb_glx_read_pixels(c, gc->currentContextTag, x, y, width, height, format, type, state->storePack.swapEndian, 0), NULL); 3099 __glEmptyImage(gc, 3, width, height, 1, format, type, xcb_glx_read_pixels_data(reply), pixels); 3100 free(reply); 3101#else 3102 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_ReadPixels, cmdlen); 3103(void) memcpy((void *)(pc + 0), (void *)(&x), 4); 3104(void) memcpy((void *)(pc + 4), (void *)(&y), 4); 3105(void) memcpy((void *)(pc + 8), (void *)(&width), 4); 3106(void) memcpy((void *)(pc + 12), (void *)(&height), 4); 3107(void) memcpy((void *)(pc + 16), (void *)(&format), 4); 3108(void) memcpy((void *)(pc + 20), (void *)(&type), 4); 3109 *(int32_t *)(pc + 24) = 0; 3110 * (int8_t *)(pc + 24) = state->storePack.swapEndian; 3111 __glXReadPixelReply(dpy, gc, 2, width, height, 1, format, type, pixels, GL_FALSE); 3112 UnlockDisplay(dpy); SyncHandle(); 3113#endif /* USE_XCB */ 3114 } 3115 return; 3116} 3117 3118#define X_GLrop_DrawPixels 173 3119void __indirect_glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) 3120{ 3121 struct glx_context * const gc = __glXGetCurrentContext(); 3122 const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, 0) : 0; 3123 const GLuint cmdlen = 40 + __GLX_PAD(compsize); 3124 if (__builtin_expect(gc->currentDpy != NULL, 1)) { 3125if (cmdlen <= gc->maxSmallRenderCommandSize) { 3126 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 3127 (void) __glXFlushRenderBuffer(gc, gc->pc); 3128 } 3129emit_header(gc->pc, X_GLrop_DrawPixels, cmdlen); 3130(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); 3131(void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4); 3132(void) memcpy((void *)(gc->pc + 32), (void *)(&format), 4); 3133(void) memcpy((void *)(gc->pc + 36), (void *)(&type), 4); 3134if (compsize > 0) { 3135 (*gc->fillImage)(gc, 2, width, height, 1, format, type, pixels, gc->pc + 40, gc->pc + 4); 3136} else { 3137 (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); 3138} 3139gc->pc += cmdlen; 3140if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3141} 3142else { 3143const GLint op = X_GLrop_DrawPixels; 3144const GLuint cmdlenLarge = cmdlen + 4; 3145GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 3146(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 3147(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 3148(void) memcpy((void *)(pc + 28), (void *)(&width), 4); 3149(void) memcpy((void *)(pc + 32), (void *)(&height), 4); 3150(void) memcpy((void *)(pc + 36), (void *)(&format), 4); 3151(void) memcpy((void *)(pc + 40), (void *)(&type), 4); 3152__glXSendLargeImage(gc, compsize, 2, width, height, 1, format, type, pixels, pc + 44, pc + 8); 3153} 3154 } 3155} 3156 3157#define X_GLsop_GetClipPlane 113 3158void __indirect_glGetClipPlane(GLenum plane, GLdouble * equation) 3159{ 3160 struct glx_context * const gc = __glXGetCurrentContext(); 3161 Display * const dpy = gc->currentDpy; 3162#ifndef USE_XCB 3163 const GLuint cmdlen = 4; 3164#endif 3165 if (__builtin_expect(dpy != NULL, 1)) { 3166#ifdef USE_XCB 3167 xcb_connection_t *c = XGetXCBConnection(dpy); 3168 (void) __glXFlushRenderBuffer(gc, gc->pc); 3169 xcb_glx_get_clip_plane_reply_t *reply = xcb_glx_get_clip_plane_reply(c, xcb_glx_get_clip_plane(c, gc->currentContextTag, plane), NULL); 3170 (void)memcpy(equation, xcb_glx_get_clip_plane_data(reply), xcb_glx_get_clip_plane_data_length(reply) * sizeof(GLdouble)); 3171 free(reply); 3172#else 3173 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetClipPlane, cmdlen); 3174(void) memcpy((void *)(pc + 0), (void *)(&plane), 4); 3175 (void) __glXReadReply(dpy, 8, equation, GL_TRUE); 3176 UnlockDisplay(dpy); SyncHandle(); 3177#endif /* USE_XCB */ 3178 } 3179 return; 3180} 3181 3182#define X_GLsop_GetLightfv 118 3183void __indirect_glGetLightfv(GLenum light, GLenum pname, GLfloat * params) 3184{ 3185 struct glx_context * const gc = __glXGetCurrentContext(); 3186 Display * const dpy = gc->currentDpy; 3187#ifndef USE_XCB 3188 const GLuint cmdlen = 8; 3189#endif 3190 if (__builtin_expect(dpy != NULL, 1)) { 3191#ifdef USE_XCB 3192 xcb_connection_t *c = XGetXCBConnection(dpy); 3193 (void) __glXFlushRenderBuffer(gc, gc->pc); 3194 xcb_glx_get_lightfv_reply_t *reply = xcb_glx_get_lightfv_reply(c, xcb_glx_get_lightfv(c, gc->currentContextTag, light, pname), NULL); 3195 if (xcb_glx_get_lightfv_data_length(reply) == 0) 3196 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3197 else 3198 (void)memcpy(params, xcb_glx_get_lightfv_data(reply), xcb_glx_get_lightfv_data_length(reply) * sizeof(GLfloat)); 3199 free(reply); 3200#else 3201 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightfv, cmdlen); 3202(void) memcpy((void *)(pc + 0), (void *)(&light), 4); 3203(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3204 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3205 UnlockDisplay(dpy); SyncHandle(); 3206#endif /* USE_XCB */ 3207 } 3208 return; 3209} 3210 3211#define X_GLsop_GetLightiv 119 3212void __indirect_glGetLightiv(GLenum light, GLenum pname, GLint * params) 3213{ 3214 struct glx_context * const gc = __glXGetCurrentContext(); 3215 Display * const dpy = gc->currentDpy; 3216#ifndef USE_XCB 3217 const GLuint cmdlen = 8; 3218#endif 3219 if (__builtin_expect(dpy != NULL, 1)) { 3220#ifdef USE_XCB 3221 xcb_connection_t *c = XGetXCBConnection(dpy); 3222 (void) __glXFlushRenderBuffer(gc, gc->pc); 3223 xcb_glx_get_lightiv_reply_t *reply = xcb_glx_get_lightiv_reply(c, xcb_glx_get_lightiv(c, gc->currentContextTag, light, pname), NULL); 3224 if (xcb_glx_get_lightiv_data_length(reply) == 0) 3225 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3226 else 3227 (void)memcpy(params, xcb_glx_get_lightiv_data(reply), xcb_glx_get_lightiv_data_length(reply) * sizeof(GLint)); 3228 free(reply); 3229#else 3230 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetLightiv, cmdlen); 3231(void) memcpy((void *)(pc + 0), (void *)(&light), 4); 3232(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3233 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3234 UnlockDisplay(dpy); SyncHandle(); 3235#endif /* USE_XCB */ 3236 } 3237 return; 3238} 3239 3240#define X_GLsop_GetMapdv 120 3241void __indirect_glGetMapdv(GLenum target, GLenum query, GLdouble * v) 3242{ 3243 struct glx_context * const gc = __glXGetCurrentContext(); 3244 Display * const dpy = gc->currentDpy; 3245#ifndef USE_XCB 3246 const GLuint cmdlen = 8; 3247#endif 3248 if (__builtin_expect(dpy != NULL, 1)) { 3249#ifdef USE_XCB 3250 xcb_connection_t *c = XGetXCBConnection(dpy); 3251 (void) __glXFlushRenderBuffer(gc, gc->pc); 3252 xcb_glx_get_mapdv_reply_t *reply = xcb_glx_get_mapdv_reply(c, xcb_glx_get_mapdv(c, gc->currentContextTag, target, query), NULL); 3253 if (xcb_glx_get_mapdv_data_length(reply) == 0) 3254 (void)memcpy(v, &reply->datum, sizeof(reply->datum)); 3255 else 3256 (void)memcpy(v, xcb_glx_get_mapdv_data(reply), xcb_glx_get_mapdv_data_length(reply) * sizeof(GLdouble)); 3257 free(reply); 3258#else 3259 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapdv, cmdlen); 3260(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3261(void) memcpy((void *)(pc + 4), (void *)(&query), 4); 3262 (void) __glXReadReply(dpy, 8, v, GL_FALSE); 3263 UnlockDisplay(dpy); SyncHandle(); 3264#endif /* USE_XCB */ 3265 } 3266 return; 3267} 3268 3269#define X_GLsop_GetMapfv 121 3270void __indirect_glGetMapfv(GLenum target, GLenum query, GLfloat * v) 3271{ 3272 struct glx_context * const gc = __glXGetCurrentContext(); 3273 Display * const dpy = gc->currentDpy; 3274#ifndef USE_XCB 3275 const GLuint cmdlen = 8; 3276#endif 3277 if (__builtin_expect(dpy != NULL, 1)) { 3278#ifdef USE_XCB 3279 xcb_connection_t *c = XGetXCBConnection(dpy); 3280 (void) __glXFlushRenderBuffer(gc, gc->pc); 3281 xcb_glx_get_mapfv_reply_t *reply = xcb_glx_get_mapfv_reply(c, xcb_glx_get_mapfv(c, gc->currentContextTag, target, query), NULL); 3282 if (xcb_glx_get_mapfv_data_length(reply) == 0) 3283 (void)memcpy(v, &reply->datum, sizeof(reply->datum)); 3284 else 3285 (void)memcpy(v, xcb_glx_get_mapfv_data(reply), xcb_glx_get_mapfv_data_length(reply) * sizeof(GLfloat)); 3286 free(reply); 3287#else 3288 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapfv, cmdlen); 3289(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3290(void) memcpy((void *)(pc + 4), (void *)(&query), 4); 3291 (void) __glXReadReply(dpy, 4, v, GL_FALSE); 3292 UnlockDisplay(dpy); SyncHandle(); 3293#endif /* USE_XCB */ 3294 } 3295 return; 3296} 3297 3298#define X_GLsop_GetMapiv 122 3299void __indirect_glGetMapiv(GLenum target, GLenum query, GLint * v) 3300{ 3301 struct glx_context * const gc = __glXGetCurrentContext(); 3302 Display * const dpy = gc->currentDpy; 3303#ifndef USE_XCB 3304 const GLuint cmdlen = 8; 3305#endif 3306 if (__builtin_expect(dpy != NULL, 1)) { 3307#ifdef USE_XCB 3308 xcb_connection_t *c = XGetXCBConnection(dpy); 3309 (void) __glXFlushRenderBuffer(gc, gc->pc); 3310 xcb_glx_get_mapiv_reply_t *reply = xcb_glx_get_mapiv_reply(c, xcb_glx_get_mapiv(c, gc->currentContextTag, target, query), NULL); 3311 if (xcb_glx_get_mapiv_data_length(reply) == 0) 3312 (void)memcpy(v, &reply->datum, sizeof(reply->datum)); 3313 else 3314 (void)memcpy(v, xcb_glx_get_mapiv_data(reply), xcb_glx_get_mapiv_data_length(reply) * sizeof(GLint)); 3315 free(reply); 3316#else 3317 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMapiv, cmdlen); 3318(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3319(void) memcpy((void *)(pc + 4), (void *)(&query), 4); 3320 (void) __glXReadReply(dpy, 4, v, GL_FALSE); 3321 UnlockDisplay(dpy); SyncHandle(); 3322#endif /* USE_XCB */ 3323 } 3324 return; 3325} 3326 3327#define X_GLsop_GetMaterialfv 123 3328void __indirect_glGetMaterialfv(GLenum face, GLenum pname, GLfloat * params) 3329{ 3330 struct glx_context * const gc = __glXGetCurrentContext(); 3331 Display * const dpy = gc->currentDpy; 3332#ifndef USE_XCB 3333 const GLuint cmdlen = 8; 3334#endif 3335 if (__builtin_expect(dpy != NULL, 1)) { 3336#ifdef USE_XCB 3337 xcb_connection_t *c = XGetXCBConnection(dpy); 3338 (void) __glXFlushRenderBuffer(gc, gc->pc); 3339 xcb_glx_get_materialfv_reply_t *reply = xcb_glx_get_materialfv_reply(c, xcb_glx_get_materialfv(c, gc->currentContextTag, face, pname), NULL); 3340 if (xcb_glx_get_materialfv_data_length(reply) == 0) 3341 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3342 else 3343 (void)memcpy(params, xcb_glx_get_materialfv_data(reply), xcb_glx_get_materialfv_data_length(reply) * sizeof(GLfloat)); 3344 free(reply); 3345#else 3346 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialfv, cmdlen); 3347(void) memcpy((void *)(pc + 0), (void *)(&face), 4); 3348(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3349 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3350 UnlockDisplay(dpy); SyncHandle(); 3351#endif /* USE_XCB */ 3352 } 3353 return; 3354} 3355 3356#define X_GLsop_GetMaterialiv 124 3357void __indirect_glGetMaterialiv(GLenum face, GLenum pname, GLint * params) 3358{ 3359 struct glx_context * const gc = __glXGetCurrentContext(); 3360 Display * const dpy = gc->currentDpy; 3361#ifndef USE_XCB 3362 const GLuint cmdlen = 8; 3363#endif 3364 if (__builtin_expect(dpy != NULL, 1)) { 3365#ifdef USE_XCB 3366 xcb_connection_t *c = XGetXCBConnection(dpy); 3367 (void) __glXFlushRenderBuffer(gc, gc->pc); 3368 xcb_glx_get_materialiv_reply_t *reply = xcb_glx_get_materialiv_reply(c, xcb_glx_get_materialiv(c, gc->currentContextTag, face, pname), NULL); 3369 if (xcb_glx_get_materialiv_data_length(reply) == 0) 3370 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3371 else 3372 (void)memcpy(params, xcb_glx_get_materialiv_data(reply), xcb_glx_get_materialiv_data_length(reply) * sizeof(GLint)); 3373 free(reply); 3374#else 3375 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMaterialiv, cmdlen); 3376(void) memcpy((void *)(pc + 0), (void *)(&face), 4); 3377(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3378 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3379 UnlockDisplay(dpy); SyncHandle(); 3380#endif /* USE_XCB */ 3381 } 3382 return; 3383} 3384 3385#define X_GLsop_GetPixelMapfv 125 3386void __indirect_glGetPixelMapfv(GLenum map, GLfloat * values) 3387{ 3388 struct glx_context * const gc = __glXGetCurrentContext(); 3389 Display * const dpy = gc->currentDpy; 3390#ifndef USE_XCB 3391 const GLuint cmdlen = 4; 3392#endif 3393 if (__builtin_expect(dpy != NULL, 1)) { 3394#ifdef USE_XCB 3395 xcb_connection_t *c = XGetXCBConnection(dpy); 3396 (void) __glXFlushRenderBuffer(gc, gc->pc); 3397 xcb_glx_get_pixel_mapfv_reply_t *reply = xcb_glx_get_pixel_mapfv_reply(c, xcb_glx_get_pixel_mapfv(c, gc->currentContextTag, map), NULL); 3398 if (xcb_glx_get_pixel_mapfv_data_length(reply) == 0) 3399 (void)memcpy(values, &reply->datum, sizeof(reply->datum)); 3400 else 3401 (void)memcpy(values, xcb_glx_get_pixel_mapfv_data(reply), xcb_glx_get_pixel_mapfv_data_length(reply) * sizeof(GLfloat)); 3402 free(reply); 3403#else 3404 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapfv, cmdlen); 3405(void) memcpy((void *)(pc + 0), (void *)(&map), 4); 3406 (void) __glXReadReply(dpy, 4, values, GL_FALSE); 3407 UnlockDisplay(dpy); SyncHandle(); 3408#endif /* USE_XCB */ 3409 } 3410 return; 3411} 3412 3413#define X_GLsop_GetPixelMapuiv 126 3414void __indirect_glGetPixelMapuiv(GLenum map, GLuint * values) 3415{ 3416 struct glx_context * const gc = __glXGetCurrentContext(); 3417 Display * const dpy = gc->currentDpy; 3418#ifndef USE_XCB 3419 const GLuint cmdlen = 4; 3420#endif 3421 if (__builtin_expect(dpy != NULL, 1)) { 3422#ifdef USE_XCB 3423 xcb_connection_t *c = XGetXCBConnection(dpy); 3424 (void) __glXFlushRenderBuffer(gc, gc->pc); 3425 xcb_glx_get_pixel_mapuiv_reply_t *reply = xcb_glx_get_pixel_mapuiv_reply(c, xcb_glx_get_pixel_mapuiv(c, gc->currentContextTag, map), NULL); 3426 if (xcb_glx_get_pixel_mapuiv_data_length(reply) == 0) 3427 (void)memcpy(values, &reply->datum, sizeof(reply->datum)); 3428 else 3429 (void)memcpy(values, xcb_glx_get_pixel_mapuiv_data(reply), xcb_glx_get_pixel_mapuiv_data_length(reply) * sizeof(GLuint)); 3430 free(reply); 3431#else 3432 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapuiv, cmdlen); 3433(void) memcpy((void *)(pc + 0), (void *)(&map), 4); 3434 (void) __glXReadReply(dpy, 4, values, GL_FALSE); 3435 UnlockDisplay(dpy); SyncHandle(); 3436#endif /* USE_XCB */ 3437 } 3438 return; 3439} 3440 3441#define X_GLsop_GetPixelMapusv 127 3442void __indirect_glGetPixelMapusv(GLenum map, GLushort * values) 3443{ 3444 struct glx_context * const gc = __glXGetCurrentContext(); 3445 Display * const dpy = gc->currentDpy; 3446#ifndef USE_XCB 3447 const GLuint cmdlen = 4; 3448#endif 3449 if (__builtin_expect(dpy != NULL, 1)) { 3450#ifdef USE_XCB 3451 xcb_connection_t *c = XGetXCBConnection(dpy); 3452 (void) __glXFlushRenderBuffer(gc, gc->pc); 3453 xcb_glx_get_pixel_mapusv_reply_t *reply = xcb_glx_get_pixel_mapusv_reply(c, xcb_glx_get_pixel_mapusv(c, gc->currentContextTag, map), NULL); 3454 if (xcb_glx_get_pixel_mapusv_data_length(reply) == 0) 3455 (void)memcpy(values, &reply->datum, sizeof(reply->datum)); 3456 else 3457 (void)memcpy(values, xcb_glx_get_pixel_mapusv_data(reply), xcb_glx_get_pixel_mapusv_data_length(reply) * sizeof(GLushort)); 3458 free(reply); 3459#else 3460 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPixelMapusv, cmdlen); 3461(void) memcpy((void *)(pc + 0), (void *)(&map), 4); 3462 (void) __glXReadReply(dpy, 2, values, GL_FALSE); 3463 UnlockDisplay(dpy); SyncHandle(); 3464#endif /* USE_XCB */ 3465 } 3466 return; 3467} 3468 3469#define X_GLsop_GetPolygonStipple 128 3470void __indirect_glGetPolygonStipple(GLubyte * mask) 3471{ 3472 struct glx_context * const gc = __glXGetCurrentContext(); 3473 Display * const dpy = gc->currentDpy; 3474#ifndef USE_XCB 3475 const GLuint cmdlen = 4; 3476#endif 3477 if (__builtin_expect(dpy != NULL, 1)) { 3478#ifdef USE_XCB 3479 xcb_connection_t *c = XGetXCBConnection(dpy); 3480 (void) __glXFlushRenderBuffer(gc, gc->pc); 3481 xcb_glx_get_polygon_stipple_reply_t *reply = xcb_glx_get_polygon_stipple_reply(c, xcb_glx_get_polygon_stipple(c, gc->currentContextTag, 0), NULL); 3482 __glEmptyImage(gc, 3, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, xcb_glx_get_polygon_stipple_data(reply), mask); 3483 free(reply); 3484#else 3485 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetPolygonStipple, cmdlen); 3486 *(int32_t *)(pc + 0) = 0; 3487 __glXReadPixelReply(dpy, gc, 2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP, mask, GL_FALSE); 3488 UnlockDisplay(dpy); SyncHandle(); 3489#endif /* USE_XCB */ 3490 } 3491 return; 3492} 3493 3494#define X_GLsop_GetTexEnvfv 130 3495void __indirect_glGetTexEnvfv(GLenum target, GLenum pname, GLfloat * params) 3496{ 3497 struct glx_context * const gc = __glXGetCurrentContext(); 3498 Display * const dpy = gc->currentDpy; 3499#ifndef USE_XCB 3500 const GLuint cmdlen = 8; 3501#endif 3502 if (__builtin_expect(dpy != NULL, 1)) { 3503#ifdef USE_XCB 3504 xcb_connection_t *c = XGetXCBConnection(dpy); 3505 (void) __glXFlushRenderBuffer(gc, gc->pc); 3506 xcb_glx_get_tex_envfv_reply_t *reply = xcb_glx_get_tex_envfv_reply(c, xcb_glx_get_tex_envfv(c, gc->currentContextTag, target, pname), NULL); 3507 if (xcb_glx_get_tex_envfv_data_length(reply) == 0) 3508 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3509 else 3510 (void)memcpy(params, xcb_glx_get_tex_envfv_data(reply), xcb_glx_get_tex_envfv_data_length(reply) * sizeof(GLfloat)); 3511 free(reply); 3512#else 3513 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnvfv, cmdlen); 3514(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3515(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3516 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3517 UnlockDisplay(dpy); SyncHandle(); 3518#endif /* USE_XCB */ 3519 } 3520 return; 3521} 3522 3523#define X_GLsop_GetTexEnviv 131 3524void __indirect_glGetTexEnviv(GLenum target, GLenum pname, GLint * params) 3525{ 3526 struct glx_context * const gc = __glXGetCurrentContext(); 3527 Display * const dpy = gc->currentDpy; 3528#ifndef USE_XCB 3529 const GLuint cmdlen = 8; 3530#endif 3531 if (__builtin_expect(dpy != NULL, 1)) { 3532#ifdef USE_XCB 3533 xcb_connection_t *c = XGetXCBConnection(dpy); 3534 (void) __glXFlushRenderBuffer(gc, gc->pc); 3535 xcb_glx_get_tex_enviv_reply_t *reply = xcb_glx_get_tex_enviv_reply(c, xcb_glx_get_tex_enviv(c, gc->currentContextTag, target, pname), NULL); 3536 if (xcb_glx_get_tex_enviv_data_length(reply) == 0) 3537 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3538 else 3539 (void)memcpy(params, xcb_glx_get_tex_enviv_data(reply), xcb_glx_get_tex_enviv_data_length(reply) * sizeof(GLint)); 3540 free(reply); 3541#else 3542 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexEnviv, cmdlen); 3543(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3544(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3545 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3546 UnlockDisplay(dpy); SyncHandle(); 3547#endif /* USE_XCB */ 3548 } 3549 return; 3550} 3551 3552#define X_GLsop_GetTexGendv 132 3553void __indirect_glGetTexGendv(GLenum coord, GLenum pname, GLdouble * params) 3554{ 3555 struct glx_context * const gc = __glXGetCurrentContext(); 3556 Display * const dpy = gc->currentDpy; 3557#ifndef USE_XCB 3558 const GLuint cmdlen = 8; 3559#endif 3560 if (__builtin_expect(dpy != NULL, 1)) { 3561#ifdef USE_XCB 3562 xcb_connection_t *c = XGetXCBConnection(dpy); 3563 (void) __glXFlushRenderBuffer(gc, gc->pc); 3564 xcb_glx_get_tex_gendv_reply_t *reply = xcb_glx_get_tex_gendv_reply(c, xcb_glx_get_tex_gendv(c, gc->currentContextTag, coord, pname), NULL); 3565 if (xcb_glx_get_tex_gendv_data_length(reply) == 0) 3566 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3567 else 3568 (void)memcpy(params, xcb_glx_get_tex_gendv_data(reply), xcb_glx_get_tex_gendv_data_length(reply) * sizeof(GLdouble)); 3569 free(reply); 3570#else 3571 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGendv, cmdlen); 3572(void) memcpy((void *)(pc + 0), (void *)(&coord), 4); 3573(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3574 (void) __glXReadReply(dpy, 8, params, GL_FALSE); 3575 UnlockDisplay(dpy); SyncHandle(); 3576#endif /* USE_XCB */ 3577 } 3578 return; 3579} 3580 3581#define X_GLsop_GetTexGenfv 133 3582void __indirect_glGetTexGenfv(GLenum coord, GLenum pname, GLfloat * params) 3583{ 3584 struct glx_context * const gc = __glXGetCurrentContext(); 3585 Display * const dpy = gc->currentDpy; 3586#ifndef USE_XCB 3587 const GLuint cmdlen = 8; 3588#endif 3589 if (__builtin_expect(dpy != NULL, 1)) { 3590#ifdef USE_XCB 3591 xcb_connection_t *c = XGetXCBConnection(dpy); 3592 (void) __glXFlushRenderBuffer(gc, gc->pc); 3593 xcb_glx_get_tex_genfv_reply_t *reply = xcb_glx_get_tex_genfv_reply(c, xcb_glx_get_tex_genfv(c, gc->currentContextTag, coord, pname), NULL); 3594 if (xcb_glx_get_tex_genfv_data_length(reply) == 0) 3595 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3596 else 3597 (void)memcpy(params, xcb_glx_get_tex_genfv_data(reply), xcb_glx_get_tex_genfv_data_length(reply) * sizeof(GLfloat)); 3598 free(reply); 3599#else 3600 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGenfv, cmdlen); 3601(void) memcpy((void *)(pc + 0), (void *)(&coord), 4); 3602(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3603 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3604 UnlockDisplay(dpy); SyncHandle(); 3605#endif /* USE_XCB */ 3606 } 3607 return; 3608} 3609 3610#define X_GLsop_GetTexGeniv 134 3611void __indirect_glGetTexGeniv(GLenum coord, GLenum pname, GLint * params) 3612{ 3613 struct glx_context * const gc = __glXGetCurrentContext(); 3614 Display * const dpy = gc->currentDpy; 3615#ifndef USE_XCB 3616 const GLuint cmdlen = 8; 3617#endif 3618 if (__builtin_expect(dpy != NULL, 1)) { 3619#ifdef USE_XCB 3620 xcb_connection_t *c = XGetXCBConnection(dpy); 3621 (void) __glXFlushRenderBuffer(gc, gc->pc); 3622 xcb_glx_get_tex_geniv_reply_t *reply = xcb_glx_get_tex_geniv_reply(c, xcb_glx_get_tex_geniv(c, gc->currentContextTag, coord, pname), NULL); 3623 if (xcb_glx_get_tex_geniv_data_length(reply) == 0) 3624 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3625 else 3626 (void)memcpy(params, xcb_glx_get_tex_geniv_data(reply), xcb_glx_get_tex_geniv_data_length(reply) * sizeof(GLint)); 3627 free(reply); 3628#else 3629 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexGeniv, cmdlen); 3630(void) memcpy((void *)(pc + 0), (void *)(&coord), 4); 3631(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3632 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3633 UnlockDisplay(dpy); SyncHandle(); 3634#endif /* USE_XCB */ 3635 } 3636 return; 3637} 3638 3639#define X_GLsop_GetTexImage 135 3640void __indirect_glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels) 3641{ 3642 struct glx_context * const gc = __glXGetCurrentContext(); 3643 const __GLXattribute * const state = gc->client_state_private; 3644 Display * const dpy = gc->currentDpy; 3645#ifndef USE_XCB 3646 const GLuint cmdlen = 20; 3647#endif 3648 if (__builtin_expect(dpy != NULL, 1)) { 3649#ifdef USE_XCB 3650 xcb_connection_t *c = XGetXCBConnection(dpy); 3651 (void) __glXFlushRenderBuffer(gc, gc->pc); 3652 xcb_glx_get_tex_image_reply_t *reply = xcb_glx_get_tex_image_reply(c, xcb_glx_get_tex_image(c, gc->currentContextTag, target, level, format, type, state->storePack.swapEndian), NULL); 3653 if (reply->height == 0) { reply->height = 1; } 3654 if (reply->depth == 0) { reply->depth = 1; } 3655 __glEmptyImage(gc, 3, reply->width, reply->height, reply->depth, format, type, xcb_glx_get_tex_image_data(reply), pixels); 3656 free(reply); 3657#else 3658 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexImage, cmdlen); 3659(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3660(void) memcpy((void *)(pc + 4), (void *)(&level), 4); 3661(void) memcpy((void *)(pc + 8), (void *)(&format), 4); 3662(void) memcpy((void *)(pc + 12), (void *)(&type), 4); 3663 *(int32_t *)(pc + 16) = 0; 3664 * (int8_t *)(pc + 16) = state->storePack.swapEndian; 3665 __glXReadPixelReply(dpy, gc, 3, 0, 0, 0, format, type, pixels, GL_TRUE); 3666 UnlockDisplay(dpy); SyncHandle(); 3667#endif /* USE_XCB */ 3668 } 3669 return; 3670} 3671 3672#define X_GLsop_GetTexParameterfv 136 3673void __indirect_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params) 3674{ 3675 struct glx_context * const gc = __glXGetCurrentContext(); 3676 Display * const dpy = gc->currentDpy; 3677#ifndef USE_XCB 3678 const GLuint cmdlen = 8; 3679#endif 3680 if (__builtin_expect(dpy != NULL, 1)) { 3681#ifdef USE_XCB 3682 xcb_connection_t *c = XGetXCBConnection(dpy); 3683 (void) __glXFlushRenderBuffer(gc, gc->pc); 3684 xcb_glx_get_tex_parameterfv_reply_t *reply = xcb_glx_get_tex_parameterfv_reply(c, xcb_glx_get_tex_parameterfv(c, gc->currentContextTag, target, pname), NULL); 3685 if (xcb_glx_get_tex_parameterfv_data_length(reply) == 0) 3686 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3687 else 3688 (void)memcpy(params, xcb_glx_get_tex_parameterfv_data(reply), xcb_glx_get_tex_parameterfv_data_length(reply) * sizeof(GLfloat)); 3689 free(reply); 3690#else 3691 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameterfv, cmdlen); 3692(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3693(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3694 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3695 UnlockDisplay(dpy); SyncHandle(); 3696#endif /* USE_XCB */ 3697 } 3698 return; 3699} 3700 3701#define X_GLsop_GetTexParameteriv 137 3702void __indirect_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params) 3703{ 3704 struct glx_context * const gc = __glXGetCurrentContext(); 3705 Display * const dpy = gc->currentDpy; 3706#ifndef USE_XCB 3707 const GLuint cmdlen = 8; 3708#endif 3709 if (__builtin_expect(dpy != NULL, 1)) { 3710#ifdef USE_XCB 3711 xcb_connection_t *c = XGetXCBConnection(dpy); 3712 (void) __glXFlushRenderBuffer(gc, gc->pc); 3713 xcb_glx_get_tex_parameteriv_reply_t *reply = xcb_glx_get_tex_parameteriv_reply(c, xcb_glx_get_tex_parameteriv(c, gc->currentContextTag, target, pname), NULL); 3714 if (xcb_glx_get_tex_parameteriv_data_length(reply) == 0) 3715 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3716 else 3717 (void)memcpy(params, xcb_glx_get_tex_parameteriv_data(reply), xcb_glx_get_tex_parameteriv_data_length(reply) * sizeof(GLint)); 3718 free(reply); 3719#else 3720 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexParameteriv, cmdlen); 3721(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3722(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 3723 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3724 UnlockDisplay(dpy); SyncHandle(); 3725#endif /* USE_XCB */ 3726 } 3727 return; 3728} 3729 3730#define X_GLsop_GetTexLevelParameterfv 138 3731void __indirect_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params) 3732{ 3733 struct glx_context * const gc = __glXGetCurrentContext(); 3734 Display * const dpy = gc->currentDpy; 3735#ifndef USE_XCB 3736 const GLuint cmdlen = 12; 3737#endif 3738 if (__builtin_expect(dpy != NULL, 1)) { 3739#ifdef USE_XCB 3740 xcb_connection_t *c = XGetXCBConnection(dpy); 3741 (void) __glXFlushRenderBuffer(gc, gc->pc); 3742 xcb_glx_get_tex_level_parameterfv_reply_t *reply = xcb_glx_get_tex_level_parameterfv_reply(c, xcb_glx_get_tex_level_parameterfv(c, gc->currentContextTag, target, level, pname), NULL); 3743 if (xcb_glx_get_tex_level_parameterfv_data_length(reply) == 0) 3744 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3745 else 3746 (void)memcpy(params, xcb_glx_get_tex_level_parameterfv_data(reply), xcb_glx_get_tex_level_parameterfv_data_length(reply) * sizeof(GLfloat)); 3747 free(reply); 3748#else 3749 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameterfv, cmdlen); 3750(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3751(void) memcpy((void *)(pc + 4), (void *)(&level), 4); 3752(void) memcpy((void *)(pc + 8), (void *)(&pname), 4); 3753 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3754 UnlockDisplay(dpy); SyncHandle(); 3755#endif /* USE_XCB */ 3756 } 3757 return; 3758} 3759 3760#define X_GLsop_GetTexLevelParameteriv 139 3761void __indirect_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params) 3762{ 3763 struct glx_context * const gc = __glXGetCurrentContext(); 3764 Display * const dpy = gc->currentDpy; 3765#ifndef USE_XCB 3766 const GLuint cmdlen = 12; 3767#endif 3768 if (__builtin_expect(dpy != NULL, 1)) { 3769#ifdef USE_XCB 3770 xcb_connection_t *c = XGetXCBConnection(dpy); 3771 (void) __glXFlushRenderBuffer(gc, gc->pc); 3772 xcb_glx_get_tex_level_parameteriv_reply_t *reply = xcb_glx_get_tex_level_parameteriv_reply(c, xcb_glx_get_tex_level_parameteriv(c, gc->currentContextTag, target, level, pname), NULL); 3773 if (xcb_glx_get_tex_level_parameteriv_data_length(reply) == 0) 3774 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 3775 else 3776 (void)memcpy(params, xcb_glx_get_tex_level_parameteriv_data(reply), xcb_glx_get_tex_level_parameteriv_data_length(reply) * sizeof(GLint)); 3777 free(reply); 3778#else 3779 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetTexLevelParameteriv, cmdlen); 3780(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 3781(void) memcpy((void *)(pc + 4), (void *)(&level), 4); 3782(void) memcpy((void *)(pc + 8), (void *)(&pname), 4); 3783 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 3784 UnlockDisplay(dpy); SyncHandle(); 3785#endif /* USE_XCB */ 3786 } 3787 return; 3788} 3789 3790#define X_GLsop_IsList 141 3791GLboolean __indirect_glIsList(GLuint list) 3792{ 3793 struct glx_context * const gc = __glXGetCurrentContext(); 3794 Display * const dpy = gc->currentDpy; 3795 GLboolean retval = (GLboolean) 0; 3796#ifndef USE_XCB 3797 const GLuint cmdlen = 4; 3798#endif 3799 if (__builtin_expect(dpy != NULL, 1)) { 3800#ifdef USE_XCB 3801 xcb_connection_t *c = XGetXCBConnection(dpy); 3802 (void) __glXFlushRenderBuffer(gc, gc->pc); 3803 xcb_glx_is_list_reply_t *reply = xcb_glx_is_list_reply(c, xcb_glx_is_list(c, gc->currentContextTag, list), NULL); 3804 retval = reply->ret_val; 3805 free(reply); 3806#else 3807 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsList, cmdlen); 3808(void) memcpy((void *)(pc + 0), (void *)(&list), 4); 3809 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); 3810 UnlockDisplay(dpy); SyncHandle(); 3811#endif /* USE_XCB */ 3812 } 3813 return retval; 3814} 3815 3816#define X_GLrop_DepthRange 174 3817void __indirect_glDepthRange(GLclampd zNear, GLclampd zFar) 3818{ 3819 struct glx_context * const gc = __glXGetCurrentContext(); 3820 const GLuint cmdlen = 20; 3821emit_header(gc->pc, X_GLrop_DepthRange, cmdlen); 3822(void) memcpy((void *)(gc->pc + 4), (void *)(&zNear), 8); 3823(void) memcpy((void *)(gc->pc + 12), (void *)(&zFar), 8); 3824gc->pc += cmdlen; 3825if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3826} 3827 3828#define X_GLrop_Frustum 175 3829void __indirect_glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) 3830{ 3831 struct glx_context * const gc = __glXGetCurrentContext(); 3832 const GLuint cmdlen = 52; 3833emit_header(gc->pc, X_GLrop_Frustum, cmdlen); 3834(void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8); 3835(void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8); 3836(void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8); 3837(void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8); 3838(void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8); 3839(void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8); 3840gc->pc += cmdlen; 3841if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3842} 3843 3844#define X_GLrop_LoadIdentity 176 3845void __indirect_glLoadIdentity(void) 3846{ 3847 struct glx_context * const gc = __glXGetCurrentContext(); 3848 const GLuint cmdlen = 4; 3849emit_header(gc->pc, X_GLrop_LoadIdentity, cmdlen); 3850gc->pc += cmdlen; 3851if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3852} 3853 3854#define X_GLrop_LoadMatrixf 177 3855void __indirect_glLoadMatrixf(const GLfloat * m) 3856{ 3857 struct glx_context * const gc = __glXGetCurrentContext(); 3858 const GLuint cmdlen = 68; 3859emit_header(gc->pc, X_GLrop_LoadMatrixf, cmdlen); 3860(void) memcpy((void *)(gc->pc + 4), (void *)(m), 64); 3861gc->pc += cmdlen; 3862if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3863} 3864 3865#define X_GLrop_LoadMatrixd 178 3866void __indirect_glLoadMatrixd(const GLdouble * m) 3867{ 3868 struct glx_context * const gc = __glXGetCurrentContext(); 3869 const GLuint cmdlen = 132; 3870emit_header(gc->pc, X_GLrop_LoadMatrixd, cmdlen); 3871(void) memcpy((void *)(gc->pc + 4), (void *)(m), 128); 3872gc->pc += cmdlen; 3873if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3874} 3875 3876#define X_GLrop_MatrixMode 179 3877void __indirect_glMatrixMode(GLenum mode) 3878{ 3879 struct glx_context * const gc = __glXGetCurrentContext(); 3880 const GLuint cmdlen = 8; 3881emit_header(gc->pc, X_GLrop_MatrixMode, cmdlen); 3882(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 3883gc->pc += cmdlen; 3884if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3885} 3886 3887#define X_GLrop_MultMatrixf 180 3888void __indirect_glMultMatrixf(const GLfloat * m) 3889{ 3890 struct glx_context * const gc = __glXGetCurrentContext(); 3891 const GLuint cmdlen = 68; 3892emit_header(gc->pc, X_GLrop_MultMatrixf, cmdlen); 3893(void) memcpy((void *)(gc->pc + 4), (void *)(m), 64); 3894gc->pc += cmdlen; 3895if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3896} 3897 3898#define X_GLrop_MultMatrixd 181 3899void __indirect_glMultMatrixd(const GLdouble * m) 3900{ 3901 struct glx_context * const gc = __glXGetCurrentContext(); 3902 const GLuint cmdlen = 132; 3903emit_header(gc->pc, X_GLrop_MultMatrixd, cmdlen); 3904(void) memcpy((void *)(gc->pc + 4), (void *)(m), 128); 3905gc->pc += cmdlen; 3906if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3907} 3908 3909#define X_GLrop_Ortho 182 3910void __indirect_glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) 3911{ 3912 struct glx_context * const gc = __glXGetCurrentContext(); 3913 const GLuint cmdlen = 52; 3914emit_header(gc->pc, X_GLrop_Ortho, cmdlen); 3915(void) memcpy((void *)(gc->pc + 4), (void *)(&left), 8); 3916(void) memcpy((void *)(gc->pc + 12), (void *)(&right), 8); 3917(void) memcpy((void *)(gc->pc + 20), (void *)(&bottom), 8); 3918(void) memcpy((void *)(gc->pc + 28), (void *)(&top), 8); 3919(void) memcpy((void *)(gc->pc + 36), (void *)(&zNear), 8); 3920(void) memcpy((void *)(gc->pc + 44), (void *)(&zFar), 8); 3921gc->pc += cmdlen; 3922if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3923} 3924 3925#define X_GLrop_PopMatrix 183 3926void __indirect_glPopMatrix(void) 3927{ 3928 struct glx_context * const gc = __glXGetCurrentContext(); 3929 const GLuint cmdlen = 4; 3930emit_header(gc->pc, X_GLrop_PopMatrix, cmdlen); 3931gc->pc += cmdlen; 3932if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3933} 3934 3935#define X_GLrop_PushMatrix 184 3936void __indirect_glPushMatrix(void) 3937{ 3938 struct glx_context * const gc = __glXGetCurrentContext(); 3939 const GLuint cmdlen = 4; 3940emit_header(gc->pc, X_GLrop_PushMatrix, cmdlen); 3941gc->pc += cmdlen; 3942if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3943} 3944 3945#define X_GLrop_Rotated 185 3946void __indirect_glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) 3947{ 3948 struct glx_context * const gc = __glXGetCurrentContext(); 3949 const GLuint cmdlen = 36; 3950emit_header(gc->pc, X_GLrop_Rotated, cmdlen); 3951(void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 8); 3952(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); 3953(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); 3954(void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); 3955gc->pc += cmdlen; 3956if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3957} 3958 3959#define X_GLrop_Rotatef 186 3960void __indirect_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) 3961{ 3962 struct glx_context * const gc = __glXGetCurrentContext(); 3963 const GLuint cmdlen = 20; 3964emit_header(gc->pc, X_GLrop_Rotatef, cmdlen); 3965(void) memcpy((void *)(gc->pc + 4), (void *)(&angle), 4); 3966(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); 3967(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); 3968(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); 3969gc->pc += cmdlen; 3970if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3971} 3972 3973#define X_GLrop_Scaled 187 3974void __indirect_glScaled(GLdouble x, GLdouble y, GLdouble z) 3975{ 3976 struct glx_context * const gc = __glXGetCurrentContext(); 3977 const GLuint cmdlen = 28; 3978emit_header(gc->pc, X_GLrop_Scaled, cmdlen); 3979(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); 3980(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); 3981(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); 3982gc->pc += cmdlen; 3983if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3984} 3985 3986#define X_GLrop_Scalef 188 3987void __indirect_glScalef(GLfloat x, GLfloat y, GLfloat z) 3988{ 3989 struct glx_context * const gc = __glXGetCurrentContext(); 3990 const GLuint cmdlen = 16; 3991emit_header(gc->pc, X_GLrop_Scalef, cmdlen); 3992(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 3993(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 3994(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 3995gc->pc += cmdlen; 3996if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 3997} 3998 3999#define X_GLrop_Translated 189 4000void __indirect_glTranslated(GLdouble x, GLdouble y, GLdouble z) 4001{ 4002 struct glx_context * const gc = __glXGetCurrentContext(); 4003 const GLuint cmdlen = 28; 4004emit_header(gc->pc, X_GLrop_Translated, cmdlen); 4005(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); 4006(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); 4007(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); 4008gc->pc += cmdlen; 4009if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4010} 4011 4012#define X_GLrop_Translatef 190 4013void __indirect_glTranslatef(GLfloat x, GLfloat y, GLfloat z) 4014{ 4015 struct glx_context * const gc = __glXGetCurrentContext(); 4016 const GLuint cmdlen = 16; 4017emit_header(gc->pc, X_GLrop_Translatef, cmdlen); 4018(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 4019(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 4020(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 4021gc->pc += cmdlen; 4022if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4023} 4024 4025#define X_GLrop_Viewport 191 4026void __indirect_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) 4027{ 4028 struct glx_context * const gc = __glXGetCurrentContext(); 4029 const GLuint cmdlen = 20; 4030emit_header(gc->pc, X_GLrop_Viewport, cmdlen); 4031(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 4032(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 4033(void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4); 4034(void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4); 4035gc->pc += cmdlen; 4036if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4037} 4038 4039#define X_GLrop_BindTexture 4117 4040void __indirect_glBindTexture(GLenum target, GLuint texture) 4041{ 4042 struct glx_context * const gc = __glXGetCurrentContext(); 4043 const GLuint cmdlen = 12; 4044emit_header(gc->pc, X_GLrop_BindTexture, cmdlen); 4045(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4046(void) memcpy((void *)(gc->pc + 8), (void *)(&texture), 4); 4047gc->pc += cmdlen; 4048if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4049} 4050 4051#define X_GLrop_Indexubv 194 4052void __indirect_glIndexub(GLubyte c) 4053{ 4054 struct glx_context * const gc = __glXGetCurrentContext(); 4055 const GLuint cmdlen = 8; 4056emit_header(gc->pc, X_GLrop_Indexubv, cmdlen); 4057(void) memcpy((void *)(gc->pc + 4), (void *)(&c), 1); 4058gc->pc += cmdlen; 4059if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4060} 4061 4062#define X_GLrop_Indexubv 194 4063void __indirect_glIndexubv(const GLubyte * c) 4064{ 4065 struct glx_context * const gc = __glXGetCurrentContext(); 4066 const GLuint cmdlen = 8; 4067emit_header(gc->pc, X_GLrop_Indexubv, cmdlen); 4068(void) memcpy((void *)(gc->pc + 4), (void *)(c), 1); 4069gc->pc += cmdlen; 4070if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4071} 4072 4073#define X_GLrop_PolygonOffset 192 4074void __indirect_glPolygonOffset(GLfloat factor, GLfloat units) 4075{ 4076 struct glx_context * const gc = __glXGetCurrentContext(); 4077 const GLuint cmdlen = 12; 4078emit_header(gc->pc, X_GLrop_PolygonOffset, cmdlen); 4079(void) memcpy((void *)(gc->pc + 4), (void *)(&factor), 4); 4080(void) memcpy((void *)(gc->pc + 8), (void *)(&units), 4); 4081gc->pc += cmdlen; 4082if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4083} 4084 4085#define X_GLrop_CopyTexImage1D 4119 4086void __indirect_glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) 4087{ 4088 struct glx_context * const gc = __glXGetCurrentContext(); 4089 const GLuint cmdlen = 32; 4090emit_header(gc->pc, X_GLrop_CopyTexImage1D, cmdlen); 4091(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4092(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); 4093(void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4); 4094(void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4); 4095(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4); 4096(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); 4097(void) memcpy((void *)(gc->pc + 28), (void *)(&border), 4); 4098gc->pc += cmdlen; 4099if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4100} 4101 4102#define X_GLrop_CopyTexImage2D 4120 4103void __indirect_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) 4104{ 4105 struct glx_context * const gc = __glXGetCurrentContext(); 4106 const GLuint cmdlen = 36; 4107emit_header(gc->pc, X_GLrop_CopyTexImage2D, cmdlen); 4108(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4109(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); 4110(void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4); 4111(void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4); 4112(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4); 4113(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); 4114(void) memcpy((void *)(gc->pc + 28), (void *)(&height), 4); 4115(void) memcpy((void *)(gc->pc + 32), (void *)(&border), 4); 4116gc->pc += cmdlen; 4117if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4118} 4119 4120#define X_GLrop_CopyTexSubImage1D 4121 4121void __indirect_glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) 4122{ 4123 struct glx_context * const gc = __glXGetCurrentContext(); 4124 const GLuint cmdlen = 28; 4125emit_header(gc->pc, X_GLrop_CopyTexSubImage1D, cmdlen); 4126(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4127(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); 4128(void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4); 4129(void) memcpy((void *)(gc->pc + 16), (void *)(&x), 4); 4130(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 4); 4131(void) memcpy((void *)(gc->pc + 24), (void *)(&width), 4); 4132gc->pc += cmdlen; 4133if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4134} 4135 4136#define X_GLrop_CopyTexSubImage2D 4122 4137void __indirect_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) 4138{ 4139 struct glx_context * const gc = __glXGetCurrentContext(); 4140 const GLuint cmdlen = 36; 4141emit_header(gc->pc, X_GLrop_CopyTexSubImage2D, cmdlen); 4142(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4143(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); 4144(void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4); 4145(void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4); 4146(void) memcpy((void *)(gc->pc + 20), (void *)(&x), 4); 4147(void) memcpy((void *)(gc->pc + 24), (void *)(&y), 4); 4148(void) memcpy((void *)(gc->pc + 28), (void *)(&width), 4); 4149(void) memcpy((void *)(gc->pc + 32), (void *)(&height), 4); 4150gc->pc += cmdlen; 4151if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4152} 4153 4154#define X_GLsop_DeleteTextures 144 4155void __indirect_glDeleteTextures(GLsizei n, const GLuint * textures) 4156{ 4157 struct glx_context * const gc = __glXGetCurrentContext(); 4158 Display * const dpy = gc->currentDpy; 4159#ifndef USE_XCB 4160 const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); 4161#endif 4162 if (n < 0) { 4163 __glXSetError(gc, GL_INVALID_VALUE); 4164 return; 4165 } 4166 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 4167#ifdef USE_XCB 4168 xcb_connection_t *c = XGetXCBConnection(dpy); 4169 (void) __glXFlushRenderBuffer(gc, gc->pc); 4170 xcb_glx_delete_textures(c, gc->currentContextTag, n, textures); 4171#else 4172 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteTextures, cmdlen); 4173(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 4174(void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4)); 4175 UnlockDisplay(dpy); SyncHandle(); 4176#endif /* USE_XCB */ 4177 } 4178 return; 4179} 4180 4181#define X_GLvop_DeleteTexturesEXT 12 4182void glDeleteTexturesEXT(GLsizei n, const GLuint * textures) 4183{ 4184 struct glx_context * const gc = __glXGetCurrentContext(); 4185 4186#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 4187 if (gc->isDirect) { 4188 const _glapi_proc *const disp_table = GET_DISPATCH(); 4189 PFNGLDELETETEXTURESEXTPROC p = 4190 (PFNGLDELETETEXTURESEXTPROC) disp_table[327]; 4191 p(n, textures); 4192 } else 4193#endif 4194 { 4195 struct glx_context * const gc = __glXGetCurrentContext(); 4196 Display * const dpy = gc->currentDpy; 4197 const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); 4198 if (n < 0) { 4199 __glXSetError(gc, GL_INVALID_VALUE); 4200 return; 4201 } 4202 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 4203 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteTexturesEXT, cmdlen); 4204(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 4205(void) memcpy((void *)(pc + 4), (void *)(textures), (n * 4)); 4206 UnlockDisplay(dpy); SyncHandle(); 4207 } 4208 return; 4209} 4210} 4211 4212#define X_GLsop_GenTextures 145 4213void __indirect_glGenTextures(GLsizei n, GLuint * textures) 4214{ 4215 struct glx_context * const gc = __glXGetCurrentContext(); 4216 Display * const dpy = gc->currentDpy; 4217#ifndef USE_XCB 4218 const GLuint cmdlen = 4; 4219#endif 4220 if (n < 0) { 4221 __glXSetError(gc, GL_INVALID_VALUE); 4222 return; 4223 } 4224 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 4225#ifdef USE_XCB 4226 xcb_connection_t *c = XGetXCBConnection(dpy); 4227 (void) __glXFlushRenderBuffer(gc, gc->pc); 4228 xcb_glx_gen_textures_reply_t *reply = xcb_glx_gen_textures_reply(c, xcb_glx_gen_textures(c, gc->currentContextTag, n), NULL); 4229 (void)memcpy(textures, xcb_glx_gen_textures_data(reply), xcb_glx_gen_textures_data_length(reply) * sizeof(GLuint)); 4230 free(reply); 4231#else 4232 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenTextures, cmdlen); 4233(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 4234 (void) __glXReadReply(dpy, 4, textures, GL_TRUE); 4235 UnlockDisplay(dpy); SyncHandle(); 4236#endif /* USE_XCB */ 4237 } 4238 return; 4239} 4240 4241#define X_GLvop_GenTexturesEXT 13 4242void glGenTexturesEXT(GLsizei n, GLuint * textures) 4243{ 4244 struct glx_context * const gc = __glXGetCurrentContext(); 4245 4246#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 4247 if (gc->isDirect) { 4248 const _glapi_proc *const disp_table = GET_DISPATCH(); 4249 PFNGLGENTEXTURESEXTPROC p = 4250 (PFNGLGENTEXTURESEXTPROC) disp_table[328]; 4251 p(n, textures); 4252 } else 4253#endif 4254 { 4255 struct glx_context * const gc = __glXGetCurrentContext(); 4256 Display * const dpy = gc->currentDpy; 4257 const GLuint cmdlen = 4; 4258 if (n < 0) { 4259 __glXSetError(gc, GL_INVALID_VALUE); 4260 return; 4261 } 4262 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 4263 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenTexturesEXT, cmdlen); 4264(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 4265 (void) __glXReadReply(dpy, 4, textures, GL_TRUE); 4266 UnlockDisplay(dpy); SyncHandle(); 4267 } 4268 return; 4269} 4270} 4271 4272#define X_GLsop_IsTexture 146 4273GLboolean __indirect_glIsTexture(GLuint texture) 4274{ 4275 struct glx_context * const gc = __glXGetCurrentContext(); 4276 Display * const dpy = gc->currentDpy; 4277 GLboolean retval = (GLboolean) 0; 4278#ifndef USE_XCB 4279 const GLuint cmdlen = 4; 4280#endif 4281 if (__builtin_expect(dpy != NULL, 1)) { 4282#ifdef USE_XCB 4283 xcb_connection_t *c = XGetXCBConnection(dpy); 4284 (void) __glXFlushRenderBuffer(gc, gc->pc); 4285 xcb_glx_is_texture_reply_t *reply = xcb_glx_is_texture_reply(c, xcb_glx_is_texture(c, gc->currentContextTag, texture), NULL); 4286 retval = reply->ret_val; 4287 free(reply); 4288#else 4289 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsTexture, cmdlen); 4290(void) memcpy((void *)(pc + 0), (void *)(&texture), 4); 4291 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); 4292 UnlockDisplay(dpy); SyncHandle(); 4293#endif /* USE_XCB */ 4294 } 4295 return retval; 4296} 4297 4298#define X_GLvop_IsTextureEXT 14 4299GLboolean glIsTextureEXT(GLuint texture) 4300{ 4301 struct glx_context * const gc = __glXGetCurrentContext(); 4302 4303#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 4304 if (gc->isDirect) { 4305 const _glapi_proc *const disp_table = GET_DISPATCH(); 4306 PFNGLISTEXTUREEXTPROC p = 4307 (PFNGLISTEXTUREEXTPROC) disp_table[330]; 4308 return p(texture); 4309 } else 4310#endif 4311 { 4312 struct glx_context * const gc = __glXGetCurrentContext(); 4313 Display * const dpy = gc->currentDpy; 4314 GLboolean retval = (GLboolean) 0; 4315 const GLuint cmdlen = 4; 4316 if (__builtin_expect(dpy != NULL, 1)) { 4317 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsTextureEXT, cmdlen); 4318(void) memcpy((void *)(pc + 0), (void *)(&texture), 4); 4319 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); 4320 UnlockDisplay(dpy); SyncHandle(); 4321 } 4322 return retval; 4323} 4324} 4325 4326#define X_GLrop_PrioritizeTextures 4118 4327void __indirect_glPrioritizeTextures(GLsizei n, const GLuint * textures, const GLclampf * priorities) 4328{ 4329 struct glx_context * const gc = __glXGetCurrentContext(); 4330 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)) + __GLX_PAD((n * 4)); 4331 if (n < 0) { 4332 __glXSetError(gc, GL_INVALID_VALUE); 4333 return; 4334 } 4335 if (__builtin_expect(n >= 0, 1)) { 4336emit_header(gc->pc, X_GLrop_PrioritizeTextures, cmdlen); 4337(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); 4338(void) memcpy((void *)(gc->pc + 8), (void *)(textures), (n * 4)); 4339(void) memcpy((void *)(gc->pc + 8 + (n * 4)), (void *)(priorities), (n * 4)); 4340gc->pc += cmdlen; 4341if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4342 } 4343} 4344 4345static void 4346__glx_TexSubImage_1D2D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels ) 4347{ 4348 struct glx_context * const gc = __glXGetCurrentContext(); 4349 const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0; 4350 const GLuint cmdlen = 60 + __GLX_PAD(compsize); 4351 if (__builtin_expect(gc->currentDpy != NULL, 1)) { 4352if (cmdlen <= gc->maxSmallRenderCommandSize) { 4353 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 4354 (void) __glXFlushRenderBuffer(gc, gc->pc); 4355 } 4356emit_header(gc->pc, opcode, cmdlen); 4357(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); 4358(void) memcpy((void *)(gc->pc + 28), (void *)(&level), 4); 4359(void) memcpy((void *)(gc->pc + 32), (void *)(&xoffset), 4); 4360(void) memcpy((void *)(gc->pc + 36), (void *)(&yoffset), 4); 4361(void) memcpy((void *)(gc->pc + 40), (void *)(&width), 4); 4362(void) memcpy((void *)(gc->pc + 44), (void *)(&height), 4); 4363(void) memcpy((void *)(gc->pc + 48), (void *)(&format), 4); 4364(void) memcpy((void *)(gc->pc + 52), (void *)(&type), 4); 4365(void) memset((void *)(gc->pc + 56), 0, 4); 4366if (compsize > 0) { 4367 (*gc->fillImage)(gc, dim, width, height, 1, format, type, pixels, gc->pc + 60, gc->pc + 4); 4368} else { 4369 (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); 4370} 4371gc->pc += cmdlen; 4372if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4373} 4374else { 4375const GLint op = opcode; 4376const GLuint cmdlenLarge = cmdlen + 4; 4377GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 4378(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 4379(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 4380(void) memcpy((void *)(pc + 28), (void *)(&target), 4); 4381(void) memcpy((void *)(pc + 32), (void *)(&level), 4); 4382(void) memcpy((void *)(pc + 36), (void *)(&xoffset), 4); 4383(void) memcpy((void *)(pc + 40), (void *)(&yoffset), 4); 4384(void) memcpy((void *)(pc + 44), (void *)(&width), 4); 4385(void) memcpy((void *)(pc + 48), (void *)(&height), 4); 4386(void) memcpy((void *)(pc + 52), (void *)(&format), 4); 4387(void) memcpy((void *)(pc + 56), (void *)(&type), 4); 4388(void) memset((void *)(pc + 60), 0, 4); 4389__glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, pixels, pc + 64, pc + 8); 4390} 4391 } 4392} 4393 4394#define X_GLrop_TexSubImage1D 4099 4395void __indirect_glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) 4396{ 4397 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage1D, 1, target, level, xoffset, 1, width, 1, format, type, pixels ); 4398} 4399 4400#define X_GLrop_TexSubImage2D 4100 4401void __indirect_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) 4402{ 4403 __glx_TexSubImage_1D2D(X_GLrop_TexSubImage2D, 2, target, level, xoffset, yoffset, width, height, format, type, pixels ); 4404} 4405 4406#define X_GLrop_BlendColor 4096 4407void __indirect_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) 4408{ 4409 struct glx_context * const gc = __glXGetCurrentContext(); 4410 const GLuint cmdlen = 20; 4411emit_header(gc->pc, X_GLrop_BlendColor, cmdlen); 4412(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 4413(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 4414(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 4415(void) memcpy((void *)(gc->pc + 16), (void *)(&alpha), 4); 4416gc->pc += cmdlen; 4417if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4418} 4419 4420#define X_GLrop_BlendEquation 4097 4421void __indirect_glBlendEquation(GLenum mode) 4422{ 4423 struct glx_context * const gc = __glXGetCurrentContext(); 4424 const GLuint cmdlen = 8; 4425emit_header(gc->pc, X_GLrop_BlendEquation, cmdlen); 4426(void) memcpy((void *)(gc->pc + 4), (void *)(&mode), 4); 4427gc->pc += cmdlen; 4428if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4429} 4430 4431#define X_GLrop_ColorTable 2053 4432void __indirect_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) 4433{ 4434 struct glx_context * const gc = __glXGetCurrentContext(); 4435 const GLuint compsize = (table != NULL) ? __glImageSize(width, 1, 1, format, type, target) : 0; 4436 const GLuint cmdlen = 44 + __GLX_PAD(compsize); 4437 if (__builtin_expect(gc->currentDpy != NULL, 1)) { 4438if (cmdlen <= gc->maxSmallRenderCommandSize) { 4439 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 4440 (void) __glXFlushRenderBuffer(gc, gc->pc); 4441 } 4442emit_header(gc->pc, X_GLrop_ColorTable, cmdlen); 4443(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); 4444(void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4); 4445(void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4); 4446(void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4); 4447(void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4); 4448if (compsize > 0) { 4449 (*gc->fillImage)(gc, 1, width, 1, 1, format, type, table, gc->pc + 44, gc->pc + 4); 4450} else { 4451 (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size ); 4452} 4453gc->pc += cmdlen; 4454if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4455} 4456else { 4457const GLint op = X_GLrop_ColorTable; 4458const GLuint cmdlenLarge = cmdlen + 4; 4459GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 4460(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 4461(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 4462(void) memcpy((void *)(pc + 28), (void *)(&target), 4); 4463(void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4); 4464(void) memcpy((void *)(pc + 36), (void *)(&width), 4); 4465(void) memcpy((void *)(pc + 40), (void *)(&format), 4); 4466(void) memcpy((void *)(pc + 44), (void *)(&type), 4); 4467__glXSendLargeImage(gc, compsize, 1, width, 1, 1, format, type, table, pc + 48, pc + 8); 4468} 4469 } 4470} 4471 4472#define X_GLrop_ColorTableParameterfv 2054 4473void __indirect_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params) 4474{ 4475 struct glx_context * const gc = __glXGetCurrentContext(); 4476 const GLuint compsize = __glColorTableParameterfv_size(pname); 4477 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 4478emit_header(gc->pc, X_GLrop_ColorTableParameterfv, cmdlen); 4479(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4480(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 4481(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 4482gc->pc += cmdlen; 4483if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4484} 4485 4486#define X_GLrop_ColorTableParameteriv 2055 4487void __indirect_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params) 4488{ 4489 struct glx_context * const gc = __glXGetCurrentContext(); 4490 const GLuint compsize = __glColorTableParameteriv_size(pname); 4491 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 4492emit_header(gc->pc, X_GLrop_ColorTableParameteriv, cmdlen); 4493(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4494(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 4495(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 4496gc->pc += cmdlen; 4497if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4498} 4499 4500#define X_GLrop_CopyColorTable 2056 4501void __indirect_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) 4502{ 4503 struct glx_context * const gc = __glXGetCurrentContext(); 4504 const GLuint cmdlen = 24; 4505emit_header(gc->pc, X_GLrop_CopyColorTable, cmdlen); 4506(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4507(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); 4508(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); 4509(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); 4510(void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4); 4511gc->pc += cmdlen; 4512if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4513} 4514 4515#define X_GLsop_GetColorTable 147 4516void __indirect_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table) 4517{ 4518 struct glx_context * const gc = __glXGetCurrentContext(); 4519 const __GLXattribute * const state = gc->client_state_private; 4520 Display * const dpy = gc->currentDpy; 4521#ifndef USE_XCB 4522 const GLuint cmdlen = 16; 4523#endif 4524 if (__builtin_expect(dpy != NULL, 1)) { 4525#ifdef USE_XCB 4526 xcb_connection_t *c = XGetXCBConnection(dpy); 4527 (void) __glXFlushRenderBuffer(gc, gc->pc); 4528 xcb_glx_get_color_table_reply_t *reply = xcb_glx_get_color_table_reply(c, xcb_glx_get_color_table(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL); 4529 __glEmptyImage(gc, 3, reply->width, 1, 1, format, type, xcb_glx_get_color_table_data(reply), table); 4530 free(reply); 4531#else 4532 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTable, cmdlen); 4533(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4534(void) memcpy((void *)(pc + 4), (void *)(&format), 4); 4535(void) memcpy((void *)(pc + 8), (void *)(&type), 4); 4536 *(int32_t *)(pc + 12) = 0; 4537 * (int8_t *)(pc + 12) = state->storePack.swapEndian; 4538 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE); 4539 UnlockDisplay(dpy); SyncHandle(); 4540#endif /* USE_XCB */ 4541 } 4542 return; 4543} 4544 4545#define X_GLvop_GetColorTableSGI 4098 4546void glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * table) 4547{ 4548 struct glx_context * const gc = __glXGetCurrentContext(); 4549 4550#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 4551 if (gc->isDirect) { 4552 const _glapi_proc *const disp_table = GET_DISPATCH(); 4553 PFNGLGETCOLORTABLESGIPROC p = 4554 (PFNGLGETCOLORTABLESGIPROC) disp_table[343]; 4555 p(target, format, type, table); 4556 } else 4557#endif 4558 { 4559 struct glx_context * const gc = __glXGetCurrentContext(); 4560 const __GLXattribute * const state = gc->client_state_private; 4561 Display * const dpy = gc->currentDpy; 4562 const GLuint cmdlen = 16; 4563 if (__builtin_expect(dpy != NULL, 1)) { 4564 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableSGI, cmdlen); 4565(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4566(void) memcpy((void *)(pc + 4), (void *)(&format), 4); 4567(void) memcpy((void *)(pc + 8), (void *)(&type), 4); 4568 *(int32_t *)(pc + 12) = 0; 4569 * (int8_t *)(pc + 12) = state->storePack.swapEndian; 4570 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, table, GL_TRUE); 4571 UnlockDisplay(dpy); SyncHandle(); 4572 } 4573 return; 4574} 4575} 4576 4577#define X_GLsop_GetColorTableParameterfv 148 4578void __indirect_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params) 4579{ 4580 struct glx_context * const gc = __glXGetCurrentContext(); 4581 Display * const dpy = gc->currentDpy; 4582#ifndef USE_XCB 4583 const GLuint cmdlen = 8; 4584#endif 4585 if (__builtin_expect(dpy != NULL, 1)) { 4586#ifdef USE_XCB 4587 xcb_connection_t *c = XGetXCBConnection(dpy); 4588 (void) __glXFlushRenderBuffer(gc, gc->pc); 4589 xcb_glx_get_color_table_parameterfv_reply_t *reply = xcb_glx_get_color_table_parameterfv_reply(c, xcb_glx_get_color_table_parameterfv(c, gc->currentContextTag, target, pname), NULL); 4590 if (xcb_glx_get_color_table_parameterfv_data_length(reply) == 0) 4591 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 4592 else 4593 (void)memcpy(params, xcb_glx_get_color_table_parameterfv_data(reply), xcb_glx_get_color_table_parameterfv_data_length(reply) * sizeof(GLfloat)); 4594 free(reply); 4595#else 4596 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameterfv, cmdlen); 4597(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4598(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 4599 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 4600 UnlockDisplay(dpy); SyncHandle(); 4601#endif /* USE_XCB */ 4602 } 4603 return; 4604} 4605 4606#define X_GLvop_GetColorTableParameterfvSGI 4099 4607void glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params) 4608{ 4609 struct glx_context * const gc = __glXGetCurrentContext(); 4610 4611#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 4612 if (gc->isDirect) { 4613 const _glapi_proc *const disp_table = GET_DISPATCH(); 4614 PFNGLGETCOLORTABLEPARAMETERFVSGIPROC p = 4615 (PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) disp_table[344]; 4616 p(target, pname, params); 4617 } else 4618#endif 4619 { 4620 struct glx_context * const gc = __glXGetCurrentContext(); 4621 Display * const dpy = gc->currentDpy; 4622 const GLuint cmdlen = 8; 4623 if (__builtin_expect(dpy != NULL, 1)) { 4624 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterfvSGI, cmdlen); 4625(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4626(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 4627 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 4628 UnlockDisplay(dpy); SyncHandle(); 4629 } 4630 return; 4631} 4632} 4633 4634#define X_GLsop_GetColorTableParameteriv 149 4635void __indirect_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * params) 4636{ 4637 struct glx_context * const gc = __glXGetCurrentContext(); 4638 Display * const dpy = gc->currentDpy; 4639#ifndef USE_XCB 4640 const GLuint cmdlen = 8; 4641#endif 4642 if (__builtin_expect(dpy != NULL, 1)) { 4643#ifdef USE_XCB 4644 xcb_connection_t *c = XGetXCBConnection(dpy); 4645 (void) __glXFlushRenderBuffer(gc, gc->pc); 4646 xcb_glx_get_color_table_parameteriv_reply_t *reply = xcb_glx_get_color_table_parameteriv_reply(c, xcb_glx_get_color_table_parameteriv(c, gc->currentContextTag, target, pname), NULL); 4647 if (xcb_glx_get_color_table_parameteriv_data_length(reply) == 0) 4648 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 4649 else 4650 (void)memcpy(params, xcb_glx_get_color_table_parameteriv_data(reply), xcb_glx_get_color_table_parameteriv_data_length(reply) * sizeof(GLint)); 4651 free(reply); 4652#else 4653 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetColorTableParameteriv, cmdlen); 4654(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4655(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 4656 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 4657 UnlockDisplay(dpy); SyncHandle(); 4658#endif /* USE_XCB */ 4659 } 4660 return; 4661} 4662 4663#define X_GLvop_GetColorTableParameterivSGI 4100 4664void glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params) 4665{ 4666 struct glx_context * const gc = __glXGetCurrentContext(); 4667 4668#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 4669 if (gc->isDirect) { 4670 const _glapi_proc *const disp_table = GET_DISPATCH(); 4671 PFNGLGETCOLORTABLEPARAMETERIVSGIPROC p = 4672 (PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) disp_table[345]; 4673 p(target, pname, params); 4674 } else 4675#endif 4676 { 4677 struct glx_context * const gc = __glXGetCurrentContext(); 4678 Display * const dpy = gc->currentDpy; 4679 const GLuint cmdlen = 8; 4680 if (__builtin_expect(dpy != NULL, 1)) { 4681 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetColorTableParameterivSGI, cmdlen); 4682(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4683(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 4684 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 4685 UnlockDisplay(dpy); SyncHandle(); 4686 } 4687 return; 4688} 4689} 4690 4691#define X_GLrop_ColorSubTable 195 4692void __indirect_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) 4693{ 4694 struct glx_context * const gc = __glXGetCurrentContext(); 4695 const GLuint compsize = (data != NULL) ? __glImageSize(count, 1, 1, format, type, target) : 0; 4696 const GLuint cmdlen = 44 + __GLX_PAD(compsize); 4697 if (__builtin_expect(gc->currentDpy != NULL, 1)) { 4698if (cmdlen <= gc->maxSmallRenderCommandSize) { 4699 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 4700 (void) __glXFlushRenderBuffer(gc, gc->pc); 4701 } 4702emit_header(gc->pc, X_GLrop_ColorSubTable, cmdlen); 4703(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); 4704(void) memcpy((void *)(gc->pc + 28), (void *)(&start), 4); 4705(void) memcpy((void *)(gc->pc + 32), (void *)(&count), 4); 4706(void) memcpy((void *)(gc->pc + 36), (void *)(&format), 4); 4707(void) memcpy((void *)(gc->pc + 40), (void *)(&type), 4); 4708if (compsize > 0) { 4709 (*gc->fillImage)(gc, 1, count, 1, 1, format, type, data, gc->pc + 44, gc->pc + 4); 4710} else { 4711 (void) memcpy( gc->pc + 4, default_pixel_store_1D, default_pixel_store_1D_size ); 4712} 4713gc->pc += cmdlen; 4714if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4715} 4716else { 4717const GLint op = X_GLrop_ColorSubTable; 4718const GLuint cmdlenLarge = cmdlen + 4; 4719GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 4720(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 4721(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 4722(void) memcpy((void *)(pc + 28), (void *)(&target), 4); 4723(void) memcpy((void *)(pc + 32), (void *)(&start), 4); 4724(void) memcpy((void *)(pc + 36), (void *)(&count), 4); 4725(void) memcpy((void *)(pc + 40), (void *)(&format), 4); 4726(void) memcpy((void *)(pc + 44), (void *)(&type), 4); 4727__glXSendLargeImage(gc, compsize, 1, count, 1, 1, format, type, data, pc + 48, pc + 8); 4728} 4729 } 4730} 4731 4732#define X_GLrop_CopyColorSubTable 196 4733void __indirect_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) 4734{ 4735 struct glx_context * const gc = __glXGetCurrentContext(); 4736 const GLuint cmdlen = 24; 4737emit_header(gc->pc, X_GLrop_CopyColorSubTable, cmdlen); 4738(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4739(void) memcpy((void *)(gc->pc + 8), (void *)(&start), 4); 4740(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); 4741(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); 4742(void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4); 4743gc->pc += cmdlen; 4744if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4745} 4746 4747static void 4748__glx_ConvolutionFilter_1D2D( unsigned opcode, unsigned dim, GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image ) 4749{ 4750 struct glx_context * const gc = __glXGetCurrentContext(); 4751 const GLuint compsize = (image != NULL) ? __glImageSize(width, height, 1, format, type, target) : 0; 4752 const GLuint cmdlen = 48 + __GLX_PAD(compsize); 4753 if (__builtin_expect(gc->currentDpy != NULL, 1)) { 4754if (cmdlen <= gc->maxSmallRenderCommandSize) { 4755 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 4756 (void) __glXFlushRenderBuffer(gc, gc->pc); 4757 } 4758emit_header(gc->pc, opcode, cmdlen); 4759(void) memcpy((void *)(gc->pc + 24), (void *)(&target), 4); 4760(void) memcpy((void *)(gc->pc + 28), (void *)(&internalformat), 4); 4761(void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4); 4762(void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4); 4763(void) memcpy((void *)(gc->pc + 40), (void *)(&format), 4); 4764(void) memcpy((void *)(gc->pc + 44), (void *)(&type), 4); 4765if (compsize > 0) { 4766 (*gc->fillImage)(gc, dim, width, height, 1, format, type, image, gc->pc + 48, gc->pc + 4); 4767} else { 4768 (void) memcpy( gc->pc + 4, default_pixel_store_2D, default_pixel_store_2D_size ); 4769} 4770gc->pc += cmdlen; 4771if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4772} 4773else { 4774const GLint op = opcode; 4775const GLuint cmdlenLarge = cmdlen + 4; 4776GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 4777(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 4778(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 4779(void) memcpy((void *)(pc + 28), (void *)(&target), 4); 4780(void) memcpy((void *)(pc + 32), (void *)(&internalformat), 4); 4781(void) memcpy((void *)(pc + 36), (void *)(&width), 4); 4782(void) memcpy((void *)(pc + 40), (void *)(&height), 4); 4783(void) memcpy((void *)(pc + 44), (void *)(&format), 4); 4784(void) memcpy((void *)(pc + 48), (void *)(&type), 4); 4785__glXSendLargeImage(gc, compsize, dim, width, height, 1, format, type, image, pc + 52, pc + 8); 4786} 4787 } 4788} 4789 4790#define X_GLrop_ConvolutionFilter1D 4101 4791void __indirect_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) 4792{ 4793 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter1D, 1, target, internalformat, width, 1, format, type, image ); 4794} 4795 4796#define X_GLrop_ConvolutionFilter2D 4102 4797void __indirect_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) 4798{ 4799 __glx_ConvolutionFilter_1D2D(X_GLrop_ConvolutionFilter2D, 2, target, internalformat, width, height, format, type, image ); 4800} 4801 4802#define X_GLrop_ConvolutionParameterf 4103 4803void __indirect_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params) 4804{ 4805 struct glx_context * const gc = __glXGetCurrentContext(); 4806 const GLuint cmdlen = 16; 4807emit_header(gc->pc, X_GLrop_ConvolutionParameterf, cmdlen); 4808(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4809(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 4810(void) memcpy((void *)(gc->pc + 12), (void *)(¶ms), 4); 4811gc->pc += cmdlen; 4812if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4813} 4814 4815#define X_GLrop_ConvolutionParameterfv 4104 4816void __indirect_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params) 4817{ 4818 struct glx_context * const gc = __glXGetCurrentContext(); 4819 const GLuint compsize = __glConvolutionParameterfv_size(pname); 4820 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 4821emit_header(gc->pc, X_GLrop_ConvolutionParameterfv, cmdlen); 4822(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4823(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 4824(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 4825gc->pc += cmdlen; 4826if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4827} 4828 4829#define X_GLrop_ConvolutionParameteri 4105 4830void __indirect_glConvolutionParameteri(GLenum target, GLenum pname, GLint params) 4831{ 4832 struct glx_context * const gc = __glXGetCurrentContext(); 4833 const GLuint cmdlen = 16; 4834emit_header(gc->pc, X_GLrop_ConvolutionParameteri, cmdlen); 4835(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4836(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 4837(void) memcpy((void *)(gc->pc + 12), (void *)(¶ms), 4); 4838gc->pc += cmdlen; 4839if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4840} 4841 4842#define X_GLrop_ConvolutionParameteriv 4106 4843void __indirect_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params) 4844{ 4845 struct glx_context * const gc = __glXGetCurrentContext(); 4846 const GLuint compsize = __glConvolutionParameteriv_size(pname); 4847 const GLuint cmdlen = 12 + __GLX_PAD((compsize * 4)); 4848emit_header(gc->pc, X_GLrop_ConvolutionParameteriv, cmdlen); 4849(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4850(void) memcpy((void *)(gc->pc + 8), (void *)(&pname), 4); 4851(void) memcpy((void *)(gc->pc + 12), (void *)(params), (compsize * 4)); 4852gc->pc += cmdlen; 4853if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4854} 4855 4856#define X_GLrop_CopyConvolutionFilter1D 4107 4857void __indirect_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) 4858{ 4859 struct glx_context * const gc = __glXGetCurrentContext(); 4860 const GLuint cmdlen = 24; 4861emit_header(gc->pc, X_GLrop_CopyConvolutionFilter1D, cmdlen); 4862(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4863(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); 4864(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); 4865(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); 4866(void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4); 4867gc->pc += cmdlen; 4868if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4869} 4870 4871#define X_GLrop_CopyConvolutionFilter2D 4108 4872void __indirect_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) 4873{ 4874 struct glx_context * const gc = __glXGetCurrentContext(); 4875 const GLuint cmdlen = 28; 4876emit_header(gc->pc, X_GLrop_CopyConvolutionFilter2D, cmdlen); 4877(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 4878(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); 4879(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); 4880(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); 4881(void) memcpy((void *)(gc->pc + 20), (void *)(&width), 4); 4882(void) memcpy((void *)(gc->pc + 24), (void *)(&height), 4); 4883gc->pc += cmdlen; 4884if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 4885} 4886 4887#define X_GLsop_GetConvolutionFilter 150 4888void __indirect_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image) 4889{ 4890 struct glx_context * const gc = __glXGetCurrentContext(); 4891 const __GLXattribute * const state = gc->client_state_private; 4892 Display * const dpy = gc->currentDpy; 4893#ifndef USE_XCB 4894 const GLuint cmdlen = 16; 4895#endif 4896 if (__builtin_expect(dpy != NULL, 1)) { 4897#ifdef USE_XCB 4898 xcb_connection_t *c = XGetXCBConnection(dpy); 4899 (void) __glXFlushRenderBuffer(gc, gc->pc); 4900 xcb_glx_get_convolution_filter_reply_t *reply = xcb_glx_get_convolution_filter_reply(c, xcb_glx_get_convolution_filter(c, gc->currentContextTag, target, format, type, state->storePack.swapEndian), NULL); 4901 if (reply->height == 0) { reply->height = 1; } 4902 __glEmptyImage(gc, 3, reply->width, reply->height, 1, format, type, xcb_glx_get_convolution_filter_data(reply), image); 4903 free(reply); 4904#else 4905 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionFilter, cmdlen); 4906(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4907(void) memcpy((void *)(pc + 4), (void *)(&format), 4); 4908(void) memcpy((void *)(pc + 8), (void *)(&type), 4); 4909 *(int32_t *)(pc + 12) = 0; 4910 * (int8_t *)(pc + 12) = state->storePack.swapEndian; 4911 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image, GL_TRUE); 4912 UnlockDisplay(dpy); SyncHandle(); 4913#endif /* USE_XCB */ 4914 } 4915 return; 4916} 4917 4918#define X_GLvop_GetConvolutionFilterEXT 1 4919void gl_dispatch_stub_356(GLenum target, GLenum format, GLenum type, GLvoid * image) 4920{ 4921 struct glx_context * const gc = __glXGetCurrentContext(); 4922 4923#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 4924 if (gc->isDirect) { 4925 const _glapi_proc *const disp_table = GET_DISPATCH(); 4926 PFNGLGETCONVOLUTIONFILTEREXTPROC p = 4927 (PFNGLGETCONVOLUTIONFILTEREXTPROC) disp_table[356]; 4928 p(target, format, type, image); 4929 } else 4930#endif 4931 { 4932 struct glx_context * const gc = __glXGetCurrentContext(); 4933 const __GLXattribute * const state = gc->client_state_private; 4934 Display * const dpy = gc->currentDpy; 4935 const GLuint cmdlen = 16; 4936 if (__builtin_expect(dpy != NULL, 1)) { 4937 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetConvolutionFilterEXT, cmdlen); 4938(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4939(void) memcpy((void *)(pc + 4), (void *)(&format), 4); 4940(void) memcpy((void *)(pc + 8), (void *)(&type), 4); 4941 *(int32_t *)(pc + 12) = 0; 4942 * (int8_t *)(pc + 12) = state->storePack.swapEndian; 4943 __glXReadPixelReply(dpy, gc, 2, 0, 0, 0, format, type, image, GL_TRUE); 4944 UnlockDisplay(dpy); SyncHandle(); 4945 } 4946 return; 4947} 4948} 4949 4950#define X_GLsop_GetConvolutionParameterfv 151 4951void __indirect_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params) 4952{ 4953 struct glx_context * const gc = __glXGetCurrentContext(); 4954 Display * const dpy = gc->currentDpy; 4955#ifndef USE_XCB 4956 const GLuint cmdlen = 8; 4957#endif 4958 if (__builtin_expect(dpy != NULL, 1)) { 4959#ifdef USE_XCB 4960 xcb_connection_t *c = XGetXCBConnection(dpy); 4961 (void) __glXFlushRenderBuffer(gc, gc->pc); 4962 xcb_glx_get_convolution_parameterfv_reply_t *reply = xcb_glx_get_convolution_parameterfv_reply(c, xcb_glx_get_convolution_parameterfv(c, gc->currentContextTag, target, pname), NULL); 4963 if (xcb_glx_get_convolution_parameterfv_data_length(reply) == 0) 4964 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 4965 else 4966 (void)memcpy(params, xcb_glx_get_convolution_parameterfv_data(reply), xcb_glx_get_convolution_parameterfv_data_length(reply) * sizeof(GLfloat)); 4967 free(reply); 4968#else 4969 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameterfv, cmdlen); 4970(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4971(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 4972 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 4973 UnlockDisplay(dpy); SyncHandle(); 4974#endif /* USE_XCB */ 4975 } 4976 return; 4977} 4978 4979#define X_GLvop_GetConvolutionParameterfvEXT 2 4980void gl_dispatch_stub_357(GLenum target, GLenum pname, GLfloat * params) 4981{ 4982 struct glx_context * const gc = __glXGetCurrentContext(); 4983 4984#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 4985 if (gc->isDirect) { 4986 const _glapi_proc *const disp_table = GET_DISPATCH(); 4987 PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC p = 4988 (PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) disp_table[357]; 4989 p(target, pname, params); 4990 } else 4991#endif 4992 { 4993 struct glx_context * const gc = __glXGetCurrentContext(); 4994 Display * const dpy = gc->currentDpy; 4995 const GLuint cmdlen = 8; 4996 if (__builtin_expect(dpy != NULL, 1)) { 4997 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetConvolutionParameterfvEXT, cmdlen); 4998(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 4999(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5000 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5001 UnlockDisplay(dpy); SyncHandle(); 5002 } 5003 return; 5004} 5005} 5006 5007#define X_GLsop_GetConvolutionParameteriv 152 5008void __indirect_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params) 5009{ 5010 struct glx_context * const gc = __glXGetCurrentContext(); 5011 Display * const dpy = gc->currentDpy; 5012#ifndef USE_XCB 5013 const GLuint cmdlen = 8; 5014#endif 5015 if (__builtin_expect(dpy != NULL, 1)) { 5016#ifdef USE_XCB 5017 xcb_connection_t *c = XGetXCBConnection(dpy); 5018 (void) __glXFlushRenderBuffer(gc, gc->pc); 5019 xcb_glx_get_convolution_parameteriv_reply_t *reply = xcb_glx_get_convolution_parameteriv_reply(c, xcb_glx_get_convolution_parameteriv(c, gc->currentContextTag, target, pname), NULL); 5020 if (xcb_glx_get_convolution_parameteriv_data_length(reply) == 0) 5021 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 5022 else 5023 (void)memcpy(params, xcb_glx_get_convolution_parameteriv_data(reply), xcb_glx_get_convolution_parameteriv_data_length(reply) * sizeof(GLint)); 5024 free(reply); 5025#else 5026 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetConvolutionParameteriv, cmdlen); 5027(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5028(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5029 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5030 UnlockDisplay(dpy); SyncHandle(); 5031#endif /* USE_XCB */ 5032 } 5033 return; 5034} 5035 5036#define X_GLvop_GetConvolutionParameterivEXT 3 5037void gl_dispatch_stub_358(GLenum target, GLenum pname, GLint * params) 5038{ 5039 struct glx_context * const gc = __glXGetCurrentContext(); 5040 5041#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 5042 if (gc->isDirect) { 5043 const _glapi_proc *const disp_table = GET_DISPATCH(); 5044 PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC p = 5045 (PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) disp_table[358]; 5046 p(target, pname, params); 5047 } else 5048#endif 5049 { 5050 struct glx_context * const gc = __glXGetCurrentContext(); 5051 Display * const dpy = gc->currentDpy; 5052 const GLuint cmdlen = 8; 5053 if (__builtin_expect(dpy != NULL, 1)) { 5054 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetConvolutionParameterivEXT, cmdlen); 5055(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5056(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5057 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5058 UnlockDisplay(dpy); SyncHandle(); 5059 } 5060 return; 5061} 5062} 5063 5064#define X_GLsop_GetHistogram 154 5065void __indirect_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) 5066{ 5067 struct glx_context * const gc = __glXGetCurrentContext(); 5068 const __GLXattribute * const state = gc->client_state_private; 5069 Display * const dpy = gc->currentDpy; 5070#ifndef USE_XCB 5071 const GLuint cmdlen = 16; 5072#endif 5073 if (__builtin_expect(dpy != NULL, 1)) { 5074#ifdef USE_XCB 5075 xcb_connection_t *c = XGetXCBConnection(dpy); 5076 (void) __glXFlushRenderBuffer(gc, gc->pc); 5077 xcb_glx_get_histogram_reply_t *reply = xcb_glx_get_histogram_reply(c, xcb_glx_get_histogram(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL); 5078 __glEmptyImage(gc, 3, reply->width, 1, 1, format, type, xcb_glx_get_histogram_data(reply), values); 5079 free(reply); 5080#else 5081 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogram, cmdlen); 5082(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5083(void) memcpy((void *)(pc + 4), (void *)(&format), 4); 5084(void) memcpy((void *)(pc + 8), (void *)(&type), 4); 5085 *(int32_t *)(pc + 12) = 0; 5086 * (int8_t *)(pc + 12) = state->storePack.swapEndian; 5087 * (int8_t *)(pc + 13) = reset; 5088 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values, GL_TRUE); 5089 UnlockDisplay(dpy); SyncHandle(); 5090#endif /* USE_XCB */ 5091 } 5092 return; 5093} 5094 5095#define X_GLvop_GetHistogramEXT 5 5096void gl_dispatch_stub_361(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) 5097{ 5098 struct glx_context * const gc = __glXGetCurrentContext(); 5099 5100#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 5101 if (gc->isDirect) { 5102 const _glapi_proc *const disp_table = GET_DISPATCH(); 5103 PFNGLGETHISTOGRAMEXTPROC p = 5104 (PFNGLGETHISTOGRAMEXTPROC) disp_table[361]; 5105 p(target, reset, format, type, values); 5106 } else 5107#endif 5108 { 5109 struct glx_context * const gc = __glXGetCurrentContext(); 5110 const __GLXattribute * const state = gc->client_state_private; 5111 Display * const dpy = gc->currentDpy; 5112 const GLuint cmdlen = 16; 5113 if (__builtin_expect(dpy != NULL, 1)) { 5114 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetHistogramEXT, cmdlen); 5115(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5116(void) memcpy((void *)(pc + 4), (void *)(&format), 4); 5117(void) memcpy((void *)(pc + 8), (void *)(&type), 4); 5118 *(int32_t *)(pc + 12) = 0; 5119 * (int8_t *)(pc + 12) = state->storePack.swapEndian; 5120 * (int8_t *)(pc + 13) = reset; 5121 __glXReadPixelReply(dpy, gc, 1, 0, 0, 0, format, type, values, GL_TRUE); 5122 UnlockDisplay(dpy); SyncHandle(); 5123 } 5124 return; 5125} 5126} 5127 5128#define X_GLsop_GetHistogramParameterfv 155 5129void __indirect_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params) 5130{ 5131 struct glx_context * const gc = __glXGetCurrentContext(); 5132 Display * const dpy = gc->currentDpy; 5133#ifndef USE_XCB 5134 const GLuint cmdlen = 8; 5135#endif 5136 if (__builtin_expect(dpy != NULL, 1)) { 5137#ifdef USE_XCB 5138 xcb_connection_t *c = XGetXCBConnection(dpy); 5139 (void) __glXFlushRenderBuffer(gc, gc->pc); 5140 xcb_glx_get_histogram_parameterfv_reply_t *reply = xcb_glx_get_histogram_parameterfv_reply(c, xcb_glx_get_histogram_parameterfv(c, gc->currentContextTag, target, pname), NULL); 5141 if (xcb_glx_get_histogram_parameterfv_data_length(reply) == 0) 5142 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 5143 else 5144 (void)memcpy(params, xcb_glx_get_histogram_parameterfv_data(reply), xcb_glx_get_histogram_parameterfv_data_length(reply) * sizeof(GLfloat)); 5145 free(reply); 5146#else 5147 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameterfv, cmdlen); 5148(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5149(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5150 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5151 UnlockDisplay(dpy); SyncHandle(); 5152#endif /* USE_XCB */ 5153 } 5154 return; 5155} 5156 5157#define X_GLvop_GetHistogramParameterfvEXT 6 5158void gl_dispatch_stub_362(GLenum target, GLenum pname, GLfloat * params) 5159{ 5160 struct glx_context * const gc = __glXGetCurrentContext(); 5161 5162#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 5163 if (gc->isDirect) { 5164 const _glapi_proc *const disp_table = GET_DISPATCH(); 5165 PFNGLGETHISTOGRAMPARAMETERFVEXTPROC p = 5166 (PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) disp_table[362]; 5167 p(target, pname, params); 5168 } else 5169#endif 5170 { 5171 struct glx_context * const gc = __glXGetCurrentContext(); 5172 Display * const dpy = gc->currentDpy; 5173 const GLuint cmdlen = 8; 5174 if (__builtin_expect(dpy != NULL, 1)) { 5175 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetHistogramParameterfvEXT, cmdlen); 5176(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5177(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5178 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5179 UnlockDisplay(dpy); SyncHandle(); 5180 } 5181 return; 5182} 5183} 5184 5185#define X_GLsop_GetHistogramParameteriv 156 5186void __indirect_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params) 5187{ 5188 struct glx_context * const gc = __glXGetCurrentContext(); 5189 Display * const dpy = gc->currentDpy; 5190#ifndef USE_XCB 5191 const GLuint cmdlen = 8; 5192#endif 5193 if (__builtin_expect(dpy != NULL, 1)) { 5194#ifdef USE_XCB 5195 xcb_connection_t *c = XGetXCBConnection(dpy); 5196 (void) __glXFlushRenderBuffer(gc, gc->pc); 5197 xcb_glx_get_histogram_parameteriv_reply_t *reply = xcb_glx_get_histogram_parameteriv_reply(c, xcb_glx_get_histogram_parameteriv(c, gc->currentContextTag, target, pname), NULL); 5198 if (xcb_glx_get_histogram_parameteriv_data_length(reply) == 0) 5199 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 5200 else 5201 (void)memcpy(params, xcb_glx_get_histogram_parameteriv_data(reply), xcb_glx_get_histogram_parameteriv_data_length(reply) * sizeof(GLint)); 5202 free(reply); 5203#else 5204 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetHistogramParameteriv, cmdlen); 5205(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5206(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5207 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5208 UnlockDisplay(dpy); SyncHandle(); 5209#endif /* USE_XCB */ 5210 } 5211 return; 5212} 5213 5214#define X_GLvop_GetHistogramParameterivEXT 7 5215void gl_dispatch_stub_363(GLenum target, GLenum pname, GLint * params) 5216{ 5217 struct glx_context * const gc = __glXGetCurrentContext(); 5218 5219#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 5220 if (gc->isDirect) { 5221 const _glapi_proc *const disp_table = GET_DISPATCH(); 5222 PFNGLGETHISTOGRAMPARAMETERIVEXTPROC p = 5223 (PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) disp_table[363]; 5224 p(target, pname, params); 5225 } else 5226#endif 5227 { 5228 struct glx_context * const gc = __glXGetCurrentContext(); 5229 Display * const dpy = gc->currentDpy; 5230 const GLuint cmdlen = 8; 5231 if (__builtin_expect(dpy != NULL, 1)) { 5232 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetHistogramParameterivEXT, cmdlen); 5233(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5234(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5235 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5236 UnlockDisplay(dpy); SyncHandle(); 5237 } 5238 return; 5239} 5240} 5241 5242#define X_GLsop_GetMinmax 157 5243void __indirect_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) 5244{ 5245 struct glx_context * const gc = __glXGetCurrentContext(); 5246 const __GLXattribute * const state = gc->client_state_private; 5247 Display * const dpy = gc->currentDpy; 5248#ifndef USE_XCB 5249 const GLuint cmdlen = 16; 5250#endif 5251 if (__builtin_expect(dpy != NULL, 1)) { 5252#ifdef USE_XCB 5253 xcb_connection_t *c = XGetXCBConnection(dpy); 5254 (void) __glXFlushRenderBuffer(gc, gc->pc); 5255 xcb_glx_get_minmax_reply_t *reply = xcb_glx_get_minmax_reply(c, xcb_glx_get_minmax(c, gc->currentContextTag, target, reset, format, type, state->storePack.swapEndian), NULL); 5256 __glEmptyImage(gc, 3, 2, 1, 1, format, type, xcb_glx_get_minmax_data(reply), values); 5257 free(reply); 5258#else 5259 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmax, cmdlen); 5260(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5261(void) memcpy((void *)(pc + 4), (void *)(&format), 4); 5262(void) memcpy((void *)(pc + 8), (void *)(&type), 4); 5263 *(int32_t *)(pc + 12) = 0; 5264 * (int8_t *)(pc + 12) = state->storePack.swapEndian; 5265 * (int8_t *)(pc + 13) = reset; 5266 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values, GL_FALSE); 5267 UnlockDisplay(dpy); SyncHandle(); 5268#endif /* USE_XCB */ 5269 } 5270 return; 5271} 5272 5273#define X_GLvop_GetMinmaxEXT 8 5274void gl_dispatch_stub_364(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) 5275{ 5276 struct glx_context * const gc = __glXGetCurrentContext(); 5277 5278#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 5279 if (gc->isDirect) { 5280 const _glapi_proc *const disp_table = GET_DISPATCH(); 5281 PFNGLGETMINMAXEXTPROC p = 5282 (PFNGLGETMINMAXEXTPROC) disp_table[364]; 5283 p(target, reset, format, type, values); 5284 } else 5285#endif 5286 { 5287 struct glx_context * const gc = __glXGetCurrentContext(); 5288 const __GLXattribute * const state = gc->client_state_private; 5289 Display * const dpy = gc->currentDpy; 5290 const GLuint cmdlen = 16; 5291 if (__builtin_expect(dpy != NULL, 1)) { 5292 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetMinmaxEXT, cmdlen); 5293(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5294(void) memcpy((void *)(pc + 4), (void *)(&format), 4); 5295(void) memcpy((void *)(pc + 8), (void *)(&type), 4); 5296 *(int32_t *)(pc + 12) = 0; 5297 * (int8_t *)(pc + 12) = state->storePack.swapEndian; 5298 * (int8_t *)(pc + 13) = reset; 5299 __glXReadPixelReply(dpy, gc, 1, 2, 1, 1, format, type, values, GL_FALSE); 5300 UnlockDisplay(dpy); SyncHandle(); 5301 } 5302 return; 5303} 5304} 5305 5306#define X_GLsop_GetMinmaxParameterfv 158 5307void __indirect_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params) 5308{ 5309 struct glx_context * const gc = __glXGetCurrentContext(); 5310 Display * const dpy = gc->currentDpy; 5311#ifndef USE_XCB 5312 const GLuint cmdlen = 8; 5313#endif 5314 if (__builtin_expect(dpy != NULL, 1)) { 5315#ifdef USE_XCB 5316 xcb_connection_t *c = XGetXCBConnection(dpy); 5317 (void) __glXFlushRenderBuffer(gc, gc->pc); 5318 xcb_glx_get_minmax_parameterfv_reply_t *reply = xcb_glx_get_minmax_parameterfv_reply(c, xcb_glx_get_minmax_parameterfv(c, gc->currentContextTag, target, pname), NULL); 5319 if (xcb_glx_get_minmax_parameterfv_data_length(reply) == 0) 5320 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 5321 else 5322 (void)memcpy(params, xcb_glx_get_minmax_parameterfv_data(reply), xcb_glx_get_minmax_parameterfv_data_length(reply) * sizeof(GLfloat)); 5323 free(reply); 5324#else 5325 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameterfv, cmdlen); 5326(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5327(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5328 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5329 UnlockDisplay(dpy); SyncHandle(); 5330#endif /* USE_XCB */ 5331 } 5332 return; 5333} 5334 5335#define X_GLvop_GetMinmaxParameterfvEXT 9 5336void gl_dispatch_stub_365(GLenum target, GLenum pname, GLfloat * params) 5337{ 5338 struct glx_context * const gc = __glXGetCurrentContext(); 5339 5340#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 5341 if (gc->isDirect) { 5342 const _glapi_proc *const disp_table = GET_DISPATCH(); 5343 PFNGLGETMINMAXPARAMETERFVEXTPROC p = 5344 (PFNGLGETMINMAXPARAMETERFVEXTPROC) disp_table[365]; 5345 p(target, pname, params); 5346 } else 5347#endif 5348 { 5349 struct glx_context * const gc = __glXGetCurrentContext(); 5350 Display * const dpy = gc->currentDpy; 5351 const GLuint cmdlen = 8; 5352 if (__builtin_expect(dpy != NULL, 1)) { 5353 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetMinmaxParameterfvEXT, cmdlen); 5354(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5355(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5356 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5357 UnlockDisplay(dpy); SyncHandle(); 5358 } 5359 return; 5360} 5361} 5362 5363#define X_GLsop_GetMinmaxParameteriv 159 5364void __indirect_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params) 5365{ 5366 struct glx_context * const gc = __glXGetCurrentContext(); 5367 Display * const dpy = gc->currentDpy; 5368#ifndef USE_XCB 5369 const GLuint cmdlen = 8; 5370#endif 5371 if (__builtin_expect(dpy != NULL, 1)) { 5372#ifdef USE_XCB 5373 xcb_connection_t *c = XGetXCBConnection(dpy); 5374 (void) __glXFlushRenderBuffer(gc, gc->pc); 5375 xcb_glx_get_minmax_parameteriv_reply_t *reply = xcb_glx_get_minmax_parameteriv_reply(c, xcb_glx_get_minmax_parameteriv(c, gc->currentContextTag, target, pname), NULL); 5376 if (xcb_glx_get_minmax_parameteriv_data_length(reply) == 0) 5377 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 5378 else 5379 (void)memcpy(params, xcb_glx_get_minmax_parameteriv_data(reply), xcb_glx_get_minmax_parameteriv_data_length(reply) * sizeof(GLint)); 5380 free(reply); 5381#else 5382 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetMinmaxParameteriv, cmdlen); 5383(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5384(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5385 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5386 UnlockDisplay(dpy); SyncHandle(); 5387#endif /* USE_XCB */ 5388 } 5389 return; 5390} 5391 5392#define X_GLvop_GetMinmaxParameterivEXT 10 5393void gl_dispatch_stub_366(GLenum target, GLenum pname, GLint * params) 5394{ 5395 struct glx_context * const gc = __glXGetCurrentContext(); 5396 5397#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL) 5398 if (gc->isDirect) { 5399 const _glapi_proc *const disp_table = GET_DISPATCH(); 5400 PFNGLGETMINMAXPARAMETERIVEXTPROC p = 5401 (PFNGLGETMINMAXPARAMETERIVEXTPROC) disp_table[366]; 5402 p(target, pname, params); 5403 } else 5404#endif 5405 { 5406 struct glx_context * const gc = __glXGetCurrentContext(); 5407 Display * const dpy = gc->currentDpy; 5408 const GLuint cmdlen = 8; 5409 if (__builtin_expect(dpy != NULL, 1)) { 5410 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetMinmaxParameterivEXT, cmdlen); 5411(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 5412(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 5413 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 5414 UnlockDisplay(dpy); SyncHandle(); 5415 } 5416 return; 5417} 5418} 5419 5420#define X_GLrop_Histogram 4110 5421void __indirect_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) 5422{ 5423 struct glx_context * const gc = __glXGetCurrentContext(); 5424 const GLuint cmdlen = 20; 5425emit_header(gc->pc, X_GLrop_Histogram, cmdlen); 5426(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5427(void) memcpy((void *)(gc->pc + 8), (void *)(&width), 4); 5428(void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4); 5429(void) memcpy((void *)(gc->pc + 16), (void *)(&sink), 1); 5430gc->pc += cmdlen; 5431if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5432} 5433 5434#define X_GLrop_Minmax 4111 5435void __indirect_glMinmax(GLenum target, GLenum internalformat, GLboolean sink) 5436{ 5437 struct glx_context * const gc = __glXGetCurrentContext(); 5438 const GLuint cmdlen = 16; 5439emit_header(gc->pc, X_GLrop_Minmax, cmdlen); 5440(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5441(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); 5442(void) memcpy((void *)(gc->pc + 12), (void *)(&sink), 1); 5443gc->pc += cmdlen; 5444if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5445} 5446 5447#define X_GLrop_ResetHistogram 4112 5448void __indirect_glResetHistogram(GLenum target) 5449{ 5450 struct glx_context * const gc = __glXGetCurrentContext(); 5451 const GLuint cmdlen = 8; 5452emit_header(gc->pc, X_GLrop_ResetHistogram, cmdlen); 5453(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5454gc->pc += cmdlen; 5455if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5456} 5457 5458#define X_GLrop_ResetMinmax 4113 5459void __indirect_glResetMinmax(GLenum target) 5460{ 5461 struct glx_context * const gc = __glXGetCurrentContext(); 5462 const GLuint cmdlen = 8; 5463emit_header(gc->pc, X_GLrop_ResetMinmax, cmdlen); 5464(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5465gc->pc += cmdlen; 5466if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5467} 5468 5469static void 5470__glx_TexImage_3D4D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const GLvoid * pixels ) 5471{ 5472 struct glx_context * const gc = __glXGetCurrentContext(); 5473 const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0; 5474 const GLuint cmdlen = 84 + __GLX_PAD(compsize); 5475 if (__builtin_expect(gc->currentDpy != NULL, 1)) { 5476if (cmdlen <= gc->maxSmallRenderCommandSize) { 5477 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 5478 (void) __glXFlushRenderBuffer(gc, gc->pc); 5479 } 5480emit_header(gc->pc, opcode, cmdlen); 5481(void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4); 5482(void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4); 5483(void) memcpy((void *)(gc->pc + 48), (void *)(&internalformat), 4); 5484(void) memcpy((void *)(gc->pc + 52), (void *)(&width), 4); 5485(void) memcpy((void *)(gc->pc + 56), (void *)(&height), 4); 5486(void) memcpy((void *)(gc->pc + 60), (void *)(&depth), 4); 5487(void) memcpy((void *)(gc->pc + 64), (void *)(&extent), 4); 5488(void) memcpy((void *)(gc->pc + 68), (void *)(&border), 4); 5489(void) memcpy((void *)(gc->pc + 72), (void *)(&format), 4); 5490(void) memcpy((void *)(gc->pc + 76), (void *)(&type), 4); 5491(void) memcpy((void *)(gc->pc + 80), (void *)((pixels == NULL) ? one : zero), 4); 5492if (compsize > 0) { 5493 (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 84, gc->pc + 4); 5494} else { 5495 (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size ); 5496} 5497gc->pc += cmdlen; 5498if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5499} 5500else { 5501const GLint op = opcode; 5502const GLuint cmdlenLarge = cmdlen + 4; 5503GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 5504(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 5505(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 5506(void) memcpy((void *)(pc + 44), (void *)(&target), 4); 5507(void) memcpy((void *)(pc + 48), (void *)(&level), 4); 5508(void) memcpy((void *)(pc + 52), (void *)(&internalformat), 4); 5509(void) memcpy((void *)(pc + 56), (void *)(&width), 4); 5510(void) memcpy((void *)(pc + 60), (void *)(&height), 4); 5511(void) memcpy((void *)(pc + 64), (void *)(&depth), 4); 5512(void) memcpy((void *)(pc + 68), (void *)(&extent), 4); 5513(void) memcpy((void *)(pc + 72), (void *)(&border), 4); 5514(void) memcpy((void *)(pc + 76), (void *)(&format), 4); 5515(void) memcpy((void *)(pc + 80), (void *)(&type), 4); 5516(void) memcpy((void *)(pc + 84), zero, 4); 5517__glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 88, pc + 8); 5518} 5519 } 5520} 5521 5522#define X_GLrop_TexImage3D 4114 5523void __indirect_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) 5524{ 5525 __glx_TexImage_3D4D(X_GLrop_TexImage3D, 3, target, level, internalformat, width, height, depth, 1, border, format, type, pixels ); 5526} 5527 5528static void 5529__glx_TexSubImage_3D4D( unsigned opcode, unsigned dim, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const GLvoid * pixels ) 5530{ 5531 struct glx_context * const gc = __glXGetCurrentContext(); 5532 const GLuint compsize = (pixels != NULL) ? __glImageSize(width, height, depth, format, type, target) : 0; 5533 const GLuint cmdlen = 92 + __GLX_PAD(compsize); 5534 if (__builtin_expect(gc->currentDpy != NULL, 1)) { 5535if (cmdlen <= gc->maxSmallRenderCommandSize) { 5536 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 5537 (void) __glXFlushRenderBuffer(gc, gc->pc); 5538 } 5539emit_header(gc->pc, opcode, cmdlen); 5540(void) memcpy((void *)(gc->pc + 40), (void *)(&target), 4); 5541(void) memcpy((void *)(gc->pc + 44), (void *)(&level), 4); 5542(void) memcpy((void *)(gc->pc + 48), (void *)(&xoffset), 4); 5543(void) memcpy((void *)(gc->pc + 52), (void *)(&yoffset), 4); 5544(void) memcpy((void *)(gc->pc + 56), (void *)(&zoffset), 4); 5545(void) memcpy((void *)(gc->pc + 60), (void *)(&woffset), 4); 5546(void) memcpy((void *)(gc->pc + 64), (void *)(&width), 4); 5547(void) memcpy((void *)(gc->pc + 68), (void *)(&height), 4); 5548(void) memcpy((void *)(gc->pc + 72), (void *)(&depth), 4); 5549(void) memcpy((void *)(gc->pc + 76), (void *)(&extent), 4); 5550(void) memcpy((void *)(gc->pc + 80), (void *)(&format), 4); 5551(void) memcpy((void *)(gc->pc + 84), (void *)(&type), 4); 5552(void) memset((void *)(gc->pc + 88), 0, 4); 5553if (compsize > 0) { 5554 (*gc->fillImage)(gc, dim, width, height, depth, format, type, pixels, gc->pc + 92, gc->pc + 4); 5555} else { 5556 (void) memcpy( gc->pc + 4, default_pixel_store_4D, default_pixel_store_4D_size ); 5557} 5558gc->pc += cmdlen; 5559if (gc->pc > gc->limit) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5560} 5561else { 5562const GLint op = opcode; 5563const GLuint cmdlenLarge = cmdlen + 4; 5564GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 5565(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 5566(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 5567(void) memcpy((void *)(pc + 44), (void *)(&target), 4); 5568(void) memcpy((void *)(pc + 48), (void *)(&level), 4); 5569(void) memcpy((void *)(pc + 52), (void *)(&xoffset), 4); 5570(void) memcpy((void *)(pc + 56), (void *)(&yoffset), 4); 5571(void) memcpy((void *)(pc + 60), (void *)(&zoffset), 4); 5572(void) memcpy((void *)(pc + 64), (void *)(&woffset), 4); 5573(void) memcpy((void *)(pc + 68), (void *)(&width), 4); 5574(void) memcpy((void *)(pc + 72), (void *)(&height), 4); 5575(void) memcpy((void *)(pc + 76), (void *)(&depth), 4); 5576(void) memcpy((void *)(pc + 80), (void *)(&extent), 4); 5577(void) memcpy((void *)(pc + 84), (void *)(&format), 4); 5578(void) memcpy((void *)(pc + 88), (void *)(&type), 4); 5579(void) memset((void *)(pc + 92), 0, 4); 5580__glXSendLargeImage(gc, compsize, dim, width, height, depth, format, type, pixels, pc + 96, pc + 8); 5581} 5582 } 5583} 5584 5585#define X_GLrop_TexSubImage3D 4115 5586void __indirect_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) 5587{ 5588 __glx_TexSubImage_3D4D(X_GLrop_TexSubImage3D, 3, target, level, xoffset, yoffset, zoffset, 1, width, height, depth, 1, format, type, pixels ); 5589} 5590 5591#define X_GLrop_CopyTexSubImage3D 4123 5592void __indirect_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) 5593{ 5594 struct glx_context * const gc = __glXGetCurrentContext(); 5595 const GLuint cmdlen = 40; 5596emit_header(gc->pc, X_GLrop_CopyTexSubImage3D, cmdlen); 5597(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5598(void) memcpy((void *)(gc->pc + 8), (void *)(&level), 4); 5599(void) memcpy((void *)(gc->pc + 12), (void *)(&xoffset), 4); 5600(void) memcpy((void *)(gc->pc + 16), (void *)(&yoffset), 4); 5601(void) memcpy((void *)(gc->pc + 20), (void *)(&zoffset), 4); 5602(void) memcpy((void *)(gc->pc + 24), (void *)(&x), 4); 5603(void) memcpy((void *)(gc->pc + 28), (void *)(&y), 4); 5604(void) memcpy((void *)(gc->pc + 32), (void *)(&width), 4); 5605(void) memcpy((void *)(gc->pc + 36), (void *)(&height), 4); 5606gc->pc += cmdlen; 5607if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5608} 5609 5610#define X_GLrop_ActiveTextureARB 197 5611void __indirect_glActiveTextureARB(GLenum texture) 5612{ 5613 struct glx_context * const gc = __glXGetCurrentContext(); 5614 const GLuint cmdlen = 8; 5615emit_header(gc->pc, X_GLrop_ActiveTextureARB, cmdlen); 5616(void) memcpy((void *)(gc->pc + 4), (void *)(&texture), 4); 5617gc->pc += cmdlen; 5618if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5619} 5620 5621#define X_GLrop_MultiTexCoord1dvARB 198 5622void __indirect_glMultiTexCoord1dARB(GLenum target, GLdouble s) 5623{ 5624 struct glx_context * const gc = __glXGetCurrentContext(); 5625 const GLuint cmdlen = 16; 5626emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen); 5627(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); 5628(void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4); 5629gc->pc += cmdlen; 5630if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5631} 5632 5633#define X_GLrop_MultiTexCoord1dvARB 198 5634void __indirect_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v) 5635{ 5636 struct glx_context * const gc = __glXGetCurrentContext(); 5637 const GLuint cmdlen = 16; 5638emit_header(gc->pc, X_GLrop_MultiTexCoord1dvARB, cmdlen); 5639(void) memcpy((void *)(gc->pc + 4), (void *)(v), 8); 5640(void) memcpy((void *)(gc->pc + 12), (void *)(&target), 4); 5641gc->pc += cmdlen; 5642if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5643} 5644 5645#define X_GLrop_MultiTexCoord1fvARB 199 5646void __indirect_glMultiTexCoord1fARB(GLenum target, GLfloat s) 5647{ 5648 struct glx_context * const gc = __glXGetCurrentContext(); 5649 const GLuint cmdlen = 12; 5650emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen); 5651(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5652(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); 5653gc->pc += cmdlen; 5654if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5655} 5656 5657#define X_GLrop_MultiTexCoord1fvARB 199 5658void __indirect_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v) 5659{ 5660 struct glx_context * const gc = __glXGetCurrentContext(); 5661 const GLuint cmdlen = 12; 5662emit_header(gc->pc, X_GLrop_MultiTexCoord1fvARB, cmdlen); 5663(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5664(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 5665gc->pc += cmdlen; 5666if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5667} 5668 5669#define X_GLrop_MultiTexCoord1ivARB 200 5670void __indirect_glMultiTexCoord1iARB(GLenum target, GLint s) 5671{ 5672 struct glx_context * const gc = __glXGetCurrentContext(); 5673 const GLuint cmdlen = 12; 5674emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen); 5675(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5676(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); 5677gc->pc += cmdlen; 5678if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5679} 5680 5681#define X_GLrop_MultiTexCoord1ivARB 200 5682void __indirect_glMultiTexCoord1ivARB(GLenum target, const GLint * v) 5683{ 5684 struct glx_context * const gc = __glXGetCurrentContext(); 5685 const GLuint cmdlen = 12; 5686emit_header(gc->pc, X_GLrop_MultiTexCoord1ivARB, cmdlen); 5687(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5688(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 5689gc->pc += cmdlen; 5690if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5691} 5692 5693#define X_GLrop_MultiTexCoord1svARB 201 5694void __indirect_glMultiTexCoord1sARB(GLenum target, GLshort s) 5695{ 5696 struct glx_context * const gc = __glXGetCurrentContext(); 5697 const GLuint cmdlen = 12; 5698emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen); 5699(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5700(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2); 5701gc->pc += cmdlen; 5702if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5703} 5704 5705#define X_GLrop_MultiTexCoord1svARB 201 5706void __indirect_glMultiTexCoord1svARB(GLenum target, const GLshort * v) 5707{ 5708 struct glx_context * const gc = __glXGetCurrentContext(); 5709 const GLuint cmdlen = 12; 5710emit_header(gc->pc, X_GLrop_MultiTexCoord1svARB, cmdlen); 5711(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5712(void) memcpy((void *)(gc->pc + 8), (void *)(v), 2); 5713gc->pc += cmdlen; 5714if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5715} 5716 5717#define X_GLrop_MultiTexCoord2dvARB 202 5718void __indirect_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t) 5719{ 5720 struct glx_context * const gc = __glXGetCurrentContext(); 5721 const GLuint cmdlen = 24; 5722emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen); 5723(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); 5724(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); 5725(void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4); 5726gc->pc += cmdlen; 5727if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5728} 5729 5730#define X_GLrop_MultiTexCoord2dvARB 202 5731void __indirect_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v) 5732{ 5733 struct glx_context * const gc = __glXGetCurrentContext(); 5734 const GLuint cmdlen = 24; 5735emit_header(gc->pc, X_GLrop_MultiTexCoord2dvARB, cmdlen); 5736(void) memcpy((void *)(gc->pc + 4), (void *)(v), 16); 5737(void) memcpy((void *)(gc->pc + 20), (void *)(&target), 4); 5738gc->pc += cmdlen; 5739if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5740} 5741 5742#define X_GLrop_MultiTexCoord2fvARB 203 5743void __indirect_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t) 5744{ 5745 struct glx_context * const gc = __glXGetCurrentContext(); 5746 const GLuint cmdlen = 16; 5747emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen); 5748(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5749(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); 5750(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); 5751gc->pc += cmdlen; 5752if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5753} 5754 5755#define X_GLrop_MultiTexCoord2fvARB 203 5756void __indirect_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v) 5757{ 5758 struct glx_context * const gc = __glXGetCurrentContext(); 5759 const GLuint cmdlen = 16; 5760emit_header(gc->pc, X_GLrop_MultiTexCoord2fvARB, cmdlen); 5761(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5762(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 5763gc->pc += cmdlen; 5764if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5765} 5766 5767#define X_GLrop_MultiTexCoord2ivARB 204 5768void __indirect_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t) 5769{ 5770 struct glx_context * const gc = __glXGetCurrentContext(); 5771 const GLuint cmdlen = 16; 5772emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen); 5773(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5774(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); 5775(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); 5776gc->pc += cmdlen; 5777if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5778} 5779 5780#define X_GLrop_MultiTexCoord2ivARB 204 5781void __indirect_glMultiTexCoord2ivARB(GLenum target, const GLint * v) 5782{ 5783 struct glx_context * const gc = __glXGetCurrentContext(); 5784 const GLuint cmdlen = 16; 5785emit_header(gc->pc, X_GLrop_MultiTexCoord2ivARB, cmdlen); 5786(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5787(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 5788gc->pc += cmdlen; 5789if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5790} 5791 5792#define X_GLrop_MultiTexCoord2svARB 205 5793void __indirect_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t) 5794{ 5795 struct glx_context * const gc = __glXGetCurrentContext(); 5796 const GLuint cmdlen = 12; 5797emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen); 5798(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5799(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2); 5800(void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2); 5801gc->pc += cmdlen; 5802if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5803} 5804 5805#define X_GLrop_MultiTexCoord2svARB 205 5806void __indirect_glMultiTexCoord2svARB(GLenum target, const GLshort * v) 5807{ 5808 struct glx_context * const gc = __glXGetCurrentContext(); 5809 const GLuint cmdlen = 12; 5810emit_header(gc->pc, X_GLrop_MultiTexCoord2svARB, cmdlen); 5811(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5812(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 5813gc->pc += cmdlen; 5814if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5815} 5816 5817#define X_GLrop_MultiTexCoord3dvARB 206 5818void __indirect_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r) 5819{ 5820 struct glx_context * const gc = __glXGetCurrentContext(); 5821 const GLuint cmdlen = 32; 5822emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen); 5823(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); 5824(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); 5825(void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8); 5826(void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4); 5827gc->pc += cmdlen; 5828if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5829} 5830 5831#define X_GLrop_MultiTexCoord3dvARB 206 5832void __indirect_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v) 5833{ 5834 struct glx_context * const gc = __glXGetCurrentContext(); 5835 const GLuint cmdlen = 32; 5836emit_header(gc->pc, X_GLrop_MultiTexCoord3dvARB, cmdlen); 5837(void) memcpy((void *)(gc->pc + 4), (void *)(v), 24); 5838(void) memcpy((void *)(gc->pc + 28), (void *)(&target), 4); 5839gc->pc += cmdlen; 5840if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5841} 5842 5843#define X_GLrop_MultiTexCoord3fvARB 207 5844void __indirect_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r) 5845{ 5846 struct glx_context * const gc = __glXGetCurrentContext(); 5847 const GLuint cmdlen = 20; 5848emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen); 5849(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5850(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); 5851(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); 5852(void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4); 5853gc->pc += cmdlen; 5854if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5855} 5856 5857#define X_GLrop_MultiTexCoord3fvARB 207 5858void __indirect_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v) 5859{ 5860 struct glx_context * const gc = __glXGetCurrentContext(); 5861 const GLuint cmdlen = 20; 5862emit_header(gc->pc, X_GLrop_MultiTexCoord3fvARB, cmdlen); 5863(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5864(void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); 5865gc->pc += cmdlen; 5866if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5867} 5868 5869#define X_GLrop_MultiTexCoord3ivARB 208 5870void __indirect_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r) 5871{ 5872 struct glx_context * const gc = __glXGetCurrentContext(); 5873 const GLuint cmdlen = 20; 5874emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen); 5875(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5876(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); 5877(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); 5878(void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4); 5879gc->pc += cmdlen; 5880if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5881} 5882 5883#define X_GLrop_MultiTexCoord3ivARB 208 5884void __indirect_glMultiTexCoord3ivARB(GLenum target, const GLint * v) 5885{ 5886 struct glx_context * const gc = __glXGetCurrentContext(); 5887 const GLuint cmdlen = 20; 5888emit_header(gc->pc, X_GLrop_MultiTexCoord3ivARB, cmdlen); 5889(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5890(void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); 5891gc->pc += cmdlen; 5892if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5893} 5894 5895#define X_GLrop_MultiTexCoord3svARB 209 5896void __indirect_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r) 5897{ 5898 struct glx_context * const gc = __glXGetCurrentContext(); 5899 const GLuint cmdlen = 16; 5900emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen); 5901(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5902(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2); 5903(void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2); 5904(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2); 5905gc->pc += cmdlen; 5906if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5907} 5908 5909#define X_GLrop_MultiTexCoord3svARB 209 5910void __indirect_glMultiTexCoord3svARB(GLenum target, const GLshort * v) 5911{ 5912 struct glx_context * const gc = __glXGetCurrentContext(); 5913 const GLuint cmdlen = 16; 5914emit_header(gc->pc, X_GLrop_MultiTexCoord3svARB, cmdlen); 5915(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5916(void) memcpy((void *)(gc->pc + 8), (void *)(v), 6); 5917gc->pc += cmdlen; 5918if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5919} 5920 5921#define X_GLrop_MultiTexCoord4dvARB 210 5922void __indirect_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) 5923{ 5924 struct glx_context * const gc = __glXGetCurrentContext(); 5925 const GLuint cmdlen = 40; 5926emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen); 5927(void) memcpy((void *)(gc->pc + 4), (void *)(&s), 8); 5928(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 8); 5929(void) memcpy((void *)(gc->pc + 20), (void *)(&r), 8); 5930(void) memcpy((void *)(gc->pc + 28), (void *)(&q), 8); 5931(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); 5932gc->pc += cmdlen; 5933if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5934} 5935 5936#define X_GLrop_MultiTexCoord4dvARB 210 5937void __indirect_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v) 5938{ 5939 struct glx_context * const gc = __glXGetCurrentContext(); 5940 const GLuint cmdlen = 40; 5941emit_header(gc->pc, X_GLrop_MultiTexCoord4dvARB, cmdlen); 5942(void) memcpy((void *)(gc->pc + 4), (void *)(v), 32); 5943(void) memcpy((void *)(gc->pc + 36), (void *)(&target), 4); 5944gc->pc += cmdlen; 5945if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5946} 5947 5948#define X_GLrop_MultiTexCoord4fvARB 211 5949void __indirect_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) 5950{ 5951 struct glx_context * const gc = __glXGetCurrentContext(); 5952 const GLuint cmdlen = 24; 5953emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen); 5954(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5955(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); 5956(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); 5957(void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4); 5958(void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4); 5959gc->pc += cmdlen; 5960if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5961} 5962 5963#define X_GLrop_MultiTexCoord4fvARB 211 5964void __indirect_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v) 5965{ 5966 struct glx_context * const gc = __glXGetCurrentContext(); 5967 const GLuint cmdlen = 24; 5968emit_header(gc->pc, X_GLrop_MultiTexCoord4fvARB, cmdlen); 5969(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5970(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 5971gc->pc += cmdlen; 5972if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5973} 5974 5975#define X_GLrop_MultiTexCoord4ivARB 212 5976void __indirect_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q) 5977{ 5978 struct glx_context * const gc = __glXGetCurrentContext(); 5979 const GLuint cmdlen = 24; 5980emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen); 5981(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5982(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 4); 5983(void) memcpy((void *)(gc->pc + 12), (void *)(&t), 4); 5984(void) memcpy((void *)(gc->pc + 16), (void *)(&r), 4); 5985(void) memcpy((void *)(gc->pc + 20), (void *)(&q), 4); 5986gc->pc += cmdlen; 5987if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 5988} 5989 5990#define X_GLrop_MultiTexCoord4ivARB 212 5991void __indirect_glMultiTexCoord4ivARB(GLenum target, const GLint * v) 5992{ 5993 struct glx_context * const gc = __glXGetCurrentContext(); 5994 const GLuint cmdlen = 24; 5995emit_header(gc->pc, X_GLrop_MultiTexCoord4ivARB, cmdlen); 5996(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 5997(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 5998gc->pc += cmdlen; 5999if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6000} 6001 6002#define X_GLrop_MultiTexCoord4svARB 213 6003void __indirect_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) 6004{ 6005 struct glx_context * const gc = __glXGetCurrentContext(); 6006 const GLuint cmdlen = 16; 6007emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen); 6008(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6009(void) memcpy((void *)(gc->pc + 8), (void *)(&s), 2); 6010(void) memcpy((void *)(gc->pc + 10), (void *)(&t), 2); 6011(void) memcpy((void *)(gc->pc + 12), (void *)(&r), 2); 6012(void) memcpy((void *)(gc->pc + 14), (void *)(&q), 2); 6013gc->pc += cmdlen; 6014if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6015} 6016 6017#define X_GLrop_MultiTexCoord4svARB 213 6018void __indirect_glMultiTexCoord4svARB(GLenum target, const GLshort * v) 6019{ 6020 struct glx_context * const gc = __glXGetCurrentContext(); 6021 const GLuint cmdlen = 16; 6022emit_header(gc->pc, X_GLrop_MultiTexCoord4svARB, cmdlen); 6023(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6024(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 6025gc->pc += cmdlen; 6026if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6027} 6028 6029#define X_GLrop_SampleCoverageARB 229 6030void __indirect_glSampleCoverageARB(GLclampf value, GLboolean invert) 6031{ 6032 struct glx_context * const gc = __glXGetCurrentContext(); 6033 const GLuint cmdlen = 12; 6034emit_header(gc->pc, X_GLrop_SampleCoverageARB, cmdlen); 6035(void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4); 6036(void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1); 6037gc->pc += cmdlen; 6038if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6039} 6040 6041#define X_GLvop_GetProgramStringARB 1308 6042void __indirect_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string) 6043{ 6044 struct glx_context * const gc = __glXGetCurrentContext(); 6045 Display * const dpy = gc->currentDpy; 6046 const GLuint cmdlen = 8; 6047 if (__builtin_expect(dpy != NULL, 1)) { 6048 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringARB, cmdlen); 6049(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 6050(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 6051 (void) __glXReadReply(dpy, 1, string, GL_TRUE); 6052 UnlockDisplay(dpy); SyncHandle(); 6053 } 6054 return; 6055} 6056 6057#define X_GLvop_GetProgramivARB 1307 6058void __indirect_glGetProgramivARB(GLenum target, GLenum pname, GLint * params) 6059{ 6060 struct glx_context * const gc = __glXGetCurrentContext(); 6061 Display * const dpy = gc->currentDpy; 6062 const GLuint cmdlen = 8; 6063 if (__builtin_expect(dpy != NULL, 1)) { 6064 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivARB, cmdlen); 6065(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 6066(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 6067 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 6068 UnlockDisplay(dpy); SyncHandle(); 6069 } 6070 return; 6071} 6072 6073#define X_GLrop_ProgramEnvParameter4dvARB 4185 6074void __indirect_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) 6075{ 6076 struct glx_context * const gc = __glXGetCurrentContext(); 6077 const GLuint cmdlen = 44; 6078emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen); 6079(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6080(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 6081(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); 6082(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); 6083(void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); 6084(void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8); 6085gc->pc += cmdlen; 6086if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6087} 6088 6089#define X_GLrop_ProgramEnvParameter4dvARB 4185 6090void __indirect_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params) 6091{ 6092 struct glx_context * const gc = __glXGetCurrentContext(); 6093 const GLuint cmdlen = 44; 6094emit_header(gc->pc, X_GLrop_ProgramEnvParameter4dvARB, cmdlen); 6095(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6096(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 6097(void) memcpy((void *)(gc->pc + 12), (void *)(params), 32); 6098gc->pc += cmdlen; 6099if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6100} 6101 6102#define X_GLrop_ProgramEnvParameter4fvARB 4184 6103void __indirect_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) 6104{ 6105 struct glx_context * const gc = __glXGetCurrentContext(); 6106 const GLuint cmdlen = 28; 6107emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen); 6108(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6109(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 6110(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); 6111(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); 6112(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4); 6113(void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4); 6114gc->pc += cmdlen; 6115if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6116} 6117 6118#define X_GLrop_ProgramEnvParameter4fvARB 4184 6119void __indirect_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params) 6120{ 6121 struct glx_context * const gc = __glXGetCurrentContext(); 6122 const GLuint cmdlen = 28; 6123emit_header(gc->pc, X_GLrop_ProgramEnvParameter4fvARB, cmdlen); 6124(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6125(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 6126(void) memcpy((void *)(gc->pc + 12), (void *)(params), 16); 6127gc->pc += cmdlen; 6128if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6129} 6130 6131#define X_GLrop_ProgramLocalParameter4dvARB 4216 6132void __indirect_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) 6133{ 6134 struct glx_context * const gc = __glXGetCurrentContext(); 6135 const GLuint cmdlen = 44; 6136emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen); 6137(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6138(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 6139(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 8); 6140(void) memcpy((void *)(gc->pc + 20), (void *)(&y), 8); 6141(void) memcpy((void *)(gc->pc + 28), (void *)(&z), 8); 6142(void) memcpy((void *)(gc->pc + 36), (void *)(&w), 8); 6143gc->pc += cmdlen; 6144if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6145} 6146 6147#define X_GLrop_ProgramLocalParameter4dvARB 4216 6148void __indirect_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params) 6149{ 6150 struct glx_context * const gc = __glXGetCurrentContext(); 6151 const GLuint cmdlen = 44; 6152emit_header(gc->pc, X_GLrop_ProgramLocalParameter4dvARB, cmdlen); 6153(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6154(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 6155(void) memcpy((void *)(gc->pc + 12), (void *)(params), 32); 6156gc->pc += cmdlen; 6157if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6158} 6159 6160#define X_GLrop_ProgramLocalParameter4fvARB 4215 6161void __indirect_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) 6162{ 6163 struct glx_context * const gc = __glXGetCurrentContext(); 6164 const GLuint cmdlen = 28; 6165emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen); 6166(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6167(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 6168(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); 6169(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); 6170(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4); 6171(void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4); 6172gc->pc += cmdlen; 6173if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6174} 6175 6176#define X_GLrop_ProgramLocalParameter4fvARB 4215 6177void __indirect_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params) 6178{ 6179 struct glx_context * const gc = __glXGetCurrentContext(); 6180 const GLuint cmdlen = 28; 6181emit_header(gc->pc, X_GLrop_ProgramLocalParameter4fvARB, cmdlen); 6182(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6183(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 6184(void) memcpy((void *)(gc->pc + 12), (void *)(params), 16); 6185gc->pc += cmdlen; 6186if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6187} 6188 6189#define X_GLrop_ProgramStringARB 4217 6190void __indirect_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string) 6191{ 6192 struct glx_context * const gc = __glXGetCurrentContext(); 6193 const GLuint cmdlen = 16 + __GLX_PAD(len); 6194 if (len < 0) { 6195 __glXSetError(gc, GL_INVALID_VALUE); 6196 return; 6197 } 6198 if (__builtin_expect((len >= 0) && (gc->currentDpy != NULL), 1)) { 6199if (cmdlen <= gc->maxSmallRenderCommandSize) { 6200 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 6201 (void) __glXFlushRenderBuffer(gc, gc->pc); 6202 } 6203emit_header(gc->pc, X_GLrop_ProgramStringARB, cmdlen); 6204(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6205(void) memcpy((void *)(gc->pc + 8), (void *)(&format), 4); 6206(void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4); 6207(void) memcpy((void *)(gc->pc + 16), (void *)(string), len); 6208gc->pc += cmdlen; 6209if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6210} 6211else { 6212const GLint op = X_GLrop_ProgramStringARB; 6213const GLuint cmdlenLarge = cmdlen + 4; 6214GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 6215(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 6216(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 6217(void) memcpy((void *)(pc + 8), (void *)(&target), 4); 6218(void) memcpy((void *)(pc + 12), (void *)(&format), 4); 6219(void) memcpy((void *)(pc + 16), (void *)(&len), 4); 6220 __glXSendLargeCommand(gc, pc, 20, string, len); 6221} 6222 } 6223} 6224 6225#define X_GLrop_VertexAttrib1dvARB 4197 6226void __indirect_glVertexAttrib1dARB(GLuint index, GLdouble x) 6227{ 6228 struct glx_context * const gc = __glXGetCurrentContext(); 6229 const GLuint cmdlen = 16; 6230emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen); 6231(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6232(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); 6233gc->pc += cmdlen; 6234if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6235} 6236 6237#define X_GLrop_VertexAttrib1dvARB 4197 6238void __indirect_glVertexAttrib1dvARB(GLuint index, const GLdouble * v) 6239{ 6240 struct glx_context * const gc = __glXGetCurrentContext(); 6241 const GLuint cmdlen = 16; 6242emit_header(gc->pc, X_GLrop_VertexAttrib1dvARB, cmdlen); 6243(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6244(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 6245gc->pc += cmdlen; 6246if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6247} 6248 6249#define X_GLrop_VertexAttrib1fvARB 4193 6250void __indirect_glVertexAttrib1fARB(GLuint index, GLfloat x) 6251{ 6252 struct glx_context * const gc = __glXGetCurrentContext(); 6253 const GLuint cmdlen = 12; 6254emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen); 6255(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6256(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); 6257gc->pc += cmdlen; 6258if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6259} 6260 6261#define X_GLrop_VertexAttrib1fvARB 4193 6262void __indirect_glVertexAttrib1fvARB(GLuint index, const GLfloat * v) 6263{ 6264 struct glx_context * const gc = __glXGetCurrentContext(); 6265 const GLuint cmdlen = 12; 6266emit_header(gc->pc, X_GLrop_VertexAttrib1fvARB, cmdlen); 6267(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6268(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 6269gc->pc += cmdlen; 6270if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6271} 6272 6273#define X_GLrop_VertexAttrib1svARB 4189 6274void __indirect_glVertexAttrib1sARB(GLuint index, GLshort x) 6275{ 6276 struct glx_context * const gc = __glXGetCurrentContext(); 6277 const GLuint cmdlen = 12; 6278emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen); 6279(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6280(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); 6281gc->pc += cmdlen; 6282if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6283} 6284 6285#define X_GLrop_VertexAttrib1svARB 4189 6286void __indirect_glVertexAttrib1svARB(GLuint index, const GLshort * v) 6287{ 6288 struct glx_context * const gc = __glXGetCurrentContext(); 6289 const GLuint cmdlen = 12; 6290emit_header(gc->pc, X_GLrop_VertexAttrib1svARB, cmdlen); 6291(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6292(void) memcpy((void *)(gc->pc + 8), (void *)(v), 2); 6293gc->pc += cmdlen; 6294if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6295} 6296 6297#define X_GLrop_VertexAttrib2dvARB 4198 6298void __indirect_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y) 6299{ 6300 struct glx_context * const gc = __glXGetCurrentContext(); 6301 const GLuint cmdlen = 24; 6302emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen); 6303(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6304(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); 6305(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); 6306gc->pc += cmdlen; 6307if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6308} 6309 6310#define X_GLrop_VertexAttrib2dvARB 4198 6311void __indirect_glVertexAttrib2dvARB(GLuint index, const GLdouble * v) 6312{ 6313 struct glx_context * const gc = __glXGetCurrentContext(); 6314 const GLuint cmdlen = 24; 6315emit_header(gc->pc, X_GLrop_VertexAttrib2dvARB, cmdlen); 6316(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6317(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 6318gc->pc += cmdlen; 6319if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6320} 6321 6322#define X_GLrop_VertexAttrib2fvARB 4194 6323void __indirect_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y) 6324{ 6325 struct glx_context * const gc = __glXGetCurrentContext(); 6326 const GLuint cmdlen = 16; 6327emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen); 6328(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6329(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); 6330(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); 6331gc->pc += cmdlen; 6332if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6333} 6334 6335#define X_GLrop_VertexAttrib2fvARB 4194 6336void __indirect_glVertexAttrib2fvARB(GLuint index, const GLfloat * v) 6337{ 6338 struct glx_context * const gc = __glXGetCurrentContext(); 6339 const GLuint cmdlen = 16; 6340emit_header(gc->pc, X_GLrop_VertexAttrib2fvARB, cmdlen); 6341(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6342(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 6343gc->pc += cmdlen; 6344if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6345} 6346 6347#define X_GLrop_VertexAttrib2svARB 4190 6348void __indirect_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y) 6349{ 6350 struct glx_context * const gc = __glXGetCurrentContext(); 6351 const GLuint cmdlen = 12; 6352emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen); 6353(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6354(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); 6355(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); 6356gc->pc += cmdlen; 6357if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6358} 6359 6360#define X_GLrop_VertexAttrib2svARB 4190 6361void __indirect_glVertexAttrib2svARB(GLuint index, const GLshort * v) 6362{ 6363 struct glx_context * const gc = __glXGetCurrentContext(); 6364 const GLuint cmdlen = 12; 6365emit_header(gc->pc, X_GLrop_VertexAttrib2svARB, cmdlen); 6366(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6367(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 6368gc->pc += cmdlen; 6369if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6370} 6371 6372#define X_GLrop_VertexAttrib3dvARB 4199 6373void __indirect_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z) 6374{ 6375 struct glx_context * const gc = __glXGetCurrentContext(); 6376 const GLuint cmdlen = 32; 6377emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen); 6378(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6379(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); 6380(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); 6381(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8); 6382gc->pc += cmdlen; 6383if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6384} 6385 6386#define X_GLrop_VertexAttrib3dvARB 4199 6387void __indirect_glVertexAttrib3dvARB(GLuint index, const GLdouble * v) 6388{ 6389 struct glx_context * const gc = __glXGetCurrentContext(); 6390 const GLuint cmdlen = 32; 6391emit_header(gc->pc, X_GLrop_VertexAttrib3dvARB, cmdlen); 6392(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6393(void) memcpy((void *)(gc->pc + 8), (void *)(v), 24); 6394gc->pc += cmdlen; 6395if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6396} 6397 6398#define X_GLrop_VertexAttrib3fvARB 4195 6399void __indirect_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z) 6400{ 6401 struct glx_context * const gc = __glXGetCurrentContext(); 6402 const GLuint cmdlen = 20; 6403emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen); 6404(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6405(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); 6406(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); 6407(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); 6408gc->pc += cmdlen; 6409if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6410} 6411 6412#define X_GLrop_VertexAttrib3fvARB 4195 6413void __indirect_glVertexAttrib3fvARB(GLuint index, const GLfloat * v) 6414{ 6415 struct glx_context * const gc = __glXGetCurrentContext(); 6416 const GLuint cmdlen = 20; 6417emit_header(gc->pc, X_GLrop_VertexAttrib3fvARB, cmdlen); 6418(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6419(void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); 6420gc->pc += cmdlen; 6421if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6422} 6423 6424#define X_GLrop_VertexAttrib3svARB 4191 6425void __indirect_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z) 6426{ 6427 struct glx_context * const gc = __glXGetCurrentContext(); 6428 const GLuint cmdlen = 16; 6429emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen); 6430(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6431(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); 6432(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); 6433(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); 6434gc->pc += cmdlen; 6435if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6436} 6437 6438#define X_GLrop_VertexAttrib3svARB 4191 6439void __indirect_glVertexAttrib3svARB(GLuint index, const GLshort * v) 6440{ 6441 struct glx_context * const gc = __glXGetCurrentContext(); 6442 const GLuint cmdlen = 16; 6443emit_header(gc->pc, X_GLrop_VertexAttrib3svARB, cmdlen); 6444(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6445(void) memcpy((void *)(gc->pc + 8), (void *)(v), 6); 6446gc->pc += cmdlen; 6447if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6448} 6449 6450#define X_GLrop_VertexAttrib4NbvARB 4235 6451void __indirect_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v) 6452{ 6453 struct glx_context * const gc = __glXGetCurrentContext(); 6454 const GLuint cmdlen = 12; 6455emit_header(gc->pc, X_GLrop_VertexAttrib4NbvARB, cmdlen); 6456(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6457(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 6458gc->pc += cmdlen; 6459if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6460} 6461 6462#define X_GLrop_VertexAttrib4NivARB 4237 6463void __indirect_glVertexAttrib4NivARB(GLuint index, const GLint * v) 6464{ 6465 struct glx_context * const gc = __glXGetCurrentContext(); 6466 const GLuint cmdlen = 24; 6467emit_header(gc->pc, X_GLrop_VertexAttrib4NivARB, cmdlen); 6468(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6469(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 6470gc->pc += cmdlen; 6471if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6472} 6473 6474#define X_GLrop_VertexAttrib4NsvARB 4236 6475void __indirect_glVertexAttrib4NsvARB(GLuint index, const GLshort * v) 6476{ 6477 struct glx_context * const gc = __glXGetCurrentContext(); 6478 const GLuint cmdlen = 16; 6479emit_header(gc->pc, X_GLrop_VertexAttrib4NsvARB, cmdlen); 6480(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6481(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 6482gc->pc += cmdlen; 6483if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6484} 6485 6486#define X_GLrop_VertexAttrib4NubvARB 4201 6487void __indirect_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) 6488{ 6489 struct glx_context * const gc = __glXGetCurrentContext(); 6490 const GLuint cmdlen = 12; 6491emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen); 6492(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6493(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1); 6494(void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1); 6495(void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1); 6496(void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1); 6497gc->pc += cmdlen; 6498if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6499} 6500 6501#define X_GLrop_VertexAttrib4NubvARB 4201 6502void __indirect_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v) 6503{ 6504 struct glx_context * const gc = __glXGetCurrentContext(); 6505 const GLuint cmdlen = 12; 6506emit_header(gc->pc, X_GLrop_VertexAttrib4NubvARB, cmdlen); 6507(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6508(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 6509gc->pc += cmdlen; 6510if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6511} 6512 6513#define X_GLrop_VertexAttrib4NuivARB 4239 6514void __indirect_glVertexAttrib4NuivARB(GLuint index, const GLuint * v) 6515{ 6516 struct glx_context * const gc = __glXGetCurrentContext(); 6517 const GLuint cmdlen = 24; 6518emit_header(gc->pc, X_GLrop_VertexAttrib4NuivARB, cmdlen); 6519(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6520(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 6521gc->pc += cmdlen; 6522if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6523} 6524 6525#define X_GLrop_VertexAttrib4NusvARB 4238 6526void __indirect_glVertexAttrib4NusvARB(GLuint index, const GLushort * v) 6527{ 6528 struct glx_context * const gc = __glXGetCurrentContext(); 6529 const GLuint cmdlen = 16; 6530emit_header(gc->pc, X_GLrop_VertexAttrib4NusvARB, cmdlen); 6531(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6532(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 6533gc->pc += cmdlen; 6534if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6535} 6536 6537#define X_GLrop_VertexAttrib4bvARB 4230 6538void __indirect_glVertexAttrib4bvARB(GLuint index, const GLbyte * v) 6539{ 6540 struct glx_context * const gc = __glXGetCurrentContext(); 6541 const GLuint cmdlen = 12; 6542emit_header(gc->pc, X_GLrop_VertexAttrib4bvARB, cmdlen); 6543(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6544(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 6545gc->pc += cmdlen; 6546if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6547} 6548 6549#define X_GLrop_VertexAttrib4dvARB 4200 6550void __indirect_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) 6551{ 6552 struct glx_context * const gc = __glXGetCurrentContext(); 6553 const GLuint cmdlen = 40; 6554emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen); 6555(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6556(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); 6557(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); 6558(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8); 6559(void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8); 6560gc->pc += cmdlen; 6561if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6562} 6563 6564#define X_GLrop_VertexAttrib4dvARB 4200 6565void __indirect_glVertexAttrib4dvARB(GLuint index, const GLdouble * v) 6566{ 6567 struct glx_context * const gc = __glXGetCurrentContext(); 6568 const GLuint cmdlen = 40; 6569emit_header(gc->pc, X_GLrop_VertexAttrib4dvARB, cmdlen); 6570(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6571(void) memcpy((void *)(gc->pc + 8), (void *)(v), 32); 6572gc->pc += cmdlen; 6573if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6574} 6575 6576#define X_GLrop_VertexAttrib4fvARB 4196 6577void __indirect_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) 6578{ 6579 struct glx_context * const gc = __glXGetCurrentContext(); 6580 const GLuint cmdlen = 24; 6581emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen); 6582(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6583(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); 6584(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); 6585(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); 6586(void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4); 6587gc->pc += cmdlen; 6588if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6589} 6590 6591#define X_GLrop_VertexAttrib4fvARB 4196 6592void __indirect_glVertexAttrib4fvARB(GLuint index, const GLfloat * v) 6593{ 6594 struct glx_context * const gc = __glXGetCurrentContext(); 6595 const GLuint cmdlen = 24; 6596emit_header(gc->pc, X_GLrop_VertexAttrib4fvARB, cmdlen); 6597(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6598(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 6599gc->pc += cmdlen; 6600if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6601} 6602 6603#define X_GLrop_VertexAttrib4ivARB 4231 6604void __indirect_glVertexAttrib4ivARB(GLuint index, const GLint * v) 6605{ 6606 struct glx_context * const gc = __glXGetCurrentContext(); 6607 const GLuint cmdlen = 24; 6608emit_header(gc->pc, X_GLrop_VertexAttrib4ivARB, cmdlen); 6609(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6610(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 6611gc->pc += cmdlen; 6612if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6613} 6614 6615#define X_GLrop_VertexAttrib4svARB 4192 6616void __indirect_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) 6617{ 6618 struct glx_context * const gc = __glXGetCurrentContext(); 6619 const GLuint cmdlen = 16; 6620emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen); 6621(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6622(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); 6623(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); 6624(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); 6625(void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2); 6626gc->pc += cmdlen; 6627if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6628} 6629 6630#define X_GLrop_VertexAttrib4svARB 4192 6631void __indirect_glVertexAttrib4svARB(GLuint index, const GLshort * v) 6632{ 6633 struct glx_context * const gc = __glXGetCurrentContext(); 6634 const GLuint cmdlen = 16; 6635emit_header(gc->pc, X_GLrop_VertexAttrib4svARB, cmdlen); 6636(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6637(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 6638gc->pc += cmdlen; 6639if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6640} 6641 6642#define X_GLrop_VertexAttrib4ubvARB 4232 6643void __indirect_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v) 6644{ 6645 struct glx_context * const gc = __glXGetCurrentContext(); 6646 const GLuint cmdlen = 12; 6647emit_header(gc->pc, X_GLrop_VertexAttrib4ubvARB, cmdlen); 6648(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6649(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 6650gc->pc += cmdlen; 6651if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6652} 6653 6654#define X_GLrop_VertexAttrib4uivARB 4234 6655void __indirect_glVertexAttrib4uivARB(GLuint index, const GLuint * v) 6656{ 6657 struct glx_context * const gc = __glXGetCurrentContext(); 6658 const GLuint cmdlen = 24; 6659emit_header(gc->pc, X_GLrop_VertexAttrib4uivARB, cmdlen); 6660(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6661(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 6662gc->pc += cmdlen; 6663if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6664} 6665 6666#define X_GLrop_VertexAttrib4usvARB 4233 6667void __indirect_glVertexAttrib4usvARB(GLuint index, const GLushort * v) 6668{ 6669 struct glx_context * const gc = __glXGetCurrentContext(); 6670 const GLuint cmdlen = 16; 6671emit_header(gc->pc, X_GLrop_VertexAttrib4usvARB, cmdlen); 6672(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 6673(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 6674gc->pc += cmdlen; 6675if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6676} 6677 6678#define X_GLrop_BeginQueryARB 231 6679void __indirect_glBeginQueryARB(GLenum target, GLuint id) 6680{ 6681 struct glx_context * const gc = __glXGetCurrentContext(); 6682 const GLuint cmdlen = 12; 6683emit_header(gc->pc, X_GLrop_BeginQueryARB, cmdlen); 6684(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6685(void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4); 6686gc->pc += cmdlen; 6687if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6688} 6689 6690#define X_GLsop_DeleteQueriesARB 161 6691void __indirect_glDeleteQueriesARB(GLsizei n, const GLuint * ids) 6692{ 6693 struct glx_context * const gc = __glXGetCurrentContext(); 6694 Display * const dpy = gc->currentDpy; 6695#ifndef USE_XCB 6696 const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); 6697#endif 6698 if (n < 0) { 6699 __glXSetError(gc, GL_INVALID_VALUE); 6700 return; 6701 } 6702 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 6703#ifdef USE_XCB 6704 xcb_connection_t *c = XGetXCBConnection(dpy); 6705 (void) __glXFlushRenderBuffer(gc, gc->pc); 6706 xcb_glx_delete_queries_arb(c, gc->currentContextTag, n, ids); 6707#else 6708 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_DeleteQueriesARB, cmdlen); 6709(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 6710(void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4)); 6711 UnlockDisplay(dpy); SyncHandle(); 6712#endif /* USE_XCB */ 6713 } 6714 return; 6715} 6716 6717#define X_GLrop_EndQueryARB 232 6718void __indirect_glEndQueryARB(GLenum target) 6719{ 6720 struct glx_context * const gc = __glXGetCurrentContext(); 6721 const GLuint cmdlen = 8; 6722emit_header(gc->pc, X_GLrop_EndQueryARB, cmdlen); 6723(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6724gc->pc += cmdlen; 6725if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6726} 6727 6728#define X_GLsop_GenQueriesARB 162 6729void __indirect_glGenQueriesARB(GLsizei n, GLuint * ids) 6730{ 6731 struct glx_context * const gc = __glXGetCurrentContext(); 6732 Display * const dpy = gc->currentDpy; 6733#ifndef USE_XCB 6734 const GLuint cmdlen = 4; 6735#endif 6736 if (n < 0) { 6737 __glXSetError(gc, GL_INVALID_VALUE); 6738 return; 6739 } 6740 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 6741#ifdef USE_XCB 6742 xcb_connection_t *c = XGetXCBConnection(dpy); 6743 (void) __glXFlushRenderBuffer(gc, gc->pc); 6744 xcb_glx_gen_queries_arb_reply_t *reply = xcb_glx_gen_queries_arb_reply(c, xcb_glx_gen_queries_arb(c, gc->currentContextTag, n), NULL); 6745 (void)memcpy(ids, xcb_glx_gen_queries_arb_data(reply), xcb_glx_gen_queries_arb_data_length(reply) * sizeof(GLuint)); 6746 free(reply); 6747#else 6748 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GenQueriesARB, cmdlen); 6749(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 6750 (void) __glXReadReply(dpy, 4, ids, GL_TRUE); 6751 UnlockDisplay(dpy); SyncHandle(); 6752#endif /* USE_XCB */ 6753 } 6754 return; 6755} 6756 6757#define X_GLsop_GetQueryObjectivARB 165 6758void __indirect_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params) 6759{ 6760 struct glx_context * const gc = __glXGetCurrentContext(); 6761 Display * const dpy = gc->currentDpy; 6762#ifndef USE_XCB 6763 const GLuint cmdlen = 8; 6764#endif 6765 if (__builtin_expect(dpy != NULL, 1)) { 6766#ifdef USE_XCB 6767 xcb_connection_t *c = XGetXCBConnection(dpy); 6768 (void) __glXFlushRenderBuffer(gc, gc->pc); 6769 xcb_glx_get_query_objectiv_arb_reply_t *reply = xcb_glx_get_query_objectiv_arb_reply(c, xcb_glx_get_query_objectiv_arb(c, gc->currentContextTag, id, pname), NULL); 6770 if (xcb_glx_get_query_objectiv_arb_data_length(reply) == 0) 6771 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 6772 else 6773 (void)memcpy(params, xcb_glx_get_query_objectiv_arb_data(reply), xcb_glx_get_query_objectiv_arb_data_length(reply) * sizeof(GLint)); 6774 free(reply); 6775#else 6776 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectivARB, cmdlen); 6777(void) memcpy((void *)(pc + 0), (void *)(&id), 4); 6778(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 6779 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 6780 UnlockDisplay(dpy); SyncHandle(); 6781#endif /* USE_XCB */ 6782 } 6783 return; 6784} 6785 6786#define X_GLsop_GetQueryObjectuivARB 166 6787void __indirect_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params) 6788{ 6789 struct glx_context * const gc = __glXGetCurrentContext(); 6790 Display * const dpy = gc->currentDpy; 6791#ifndef USE_XCB 6792 const GLuint cmdlen = 8; 6793#endif 6794 if (__builtin_expect(dpy != NULL, 1)) { 6795#ifdef USE_XCB 6796 xcb_connection_t *c = XGetXCBConnection(dpy); 6797 (void) __glXFlushRenderBuffer(gc, gc->pc); 6798 xcb_glx_get_query_objectuiv_arb_reply_t *reply = xcb_glx_get_query_objectuiv_arb_reply(c, xcb_glx_get_query_objectuiv_arb(c, gc->currentContextTag, id, pname), NULL); 6799 if (xcb_glx_get_query_objectuiv_arb_data_length(reply) == 0) 6800 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 6801 else 6802 (void)memcpy(params, xcb_glx_get_query_objectuiv_arb_data(reply), xcb_glx_get_query_objectuiv_arb_data_length(reply) * sizeof(GLuint)); 6803 free(reply); 6804#else 6805 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryObjectuivARB, cmdlen); 6806(void) memcpy((void *)(pc + 0), (void *)(&id), 4); 6807(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 6808 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 6809 UnlockDisplay(dpy); SyncHandle(); 6810#endif /* USE_XCB */ 6811 } 6812 return; 6813} 6814 6815#define X_GLsop_GetQueryivARB 164 6816void __indirect_glGetQueryivARB(GLenum target, GLenum pname, GLint * params) 6817{ 6818 struct glx_context * const gc = __glXGetCurrentContext(); 6819 Display * const dpy = gc->currentDpy; 6820#ifndef USE_XCB 6821 const GLuint cmdlen = 8; 6822#endif 6823 if (__builtin_expect(dpy != NULL, 1)) { 6824#ifdef USE_XCB 6825 xcb_connection_t *c = XGetXCBConnection(dpy); 6826 (void) __glXFlushRenderBuffer(gc, gc->pc); 6827 xcb_glx_get_queryiv_arb_reply_t *reply = xcb_glx_get_queryiv_arb_reply(c, xcb_glx_get_queryiv_arb(c, gc->currentContextTag, target, pname), NULL); 6828 if (xcb_glx_get_queryiv_arb_data_length(reply) == 0) 6829 (void)memcpy(params, &reply->datum, sizeof(reply->datum)); 6830 else 6831 (void)memcpy(params, xcb_glx_get_queryiv_arb_data(reply), xcb_glx_get_queryiv_arb_data_length(reply) * sizeof(GLint)); 6832 free(reply); 6833#else 6834 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_GetQueryivARB, cmdlen); 6835(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 6836(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 6837 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 6838 UnlockDisplay(dpy); SyncHandle(); 6839#endif /* USE_XCB */ 6840 } 6841 return; 6842} 6843 6844#define X_GLsop_IsQueryARB 163 6845GLboolean __indirect_glIsQueryARB(GLuint id) 6846{ 6847 struct glx_context * const gc = __glXGetCurrentContext(); 6848 Display * const dpy = gc->currentDpy; 6849 GLboolean retval = (GLboolean) 0; 6850#ifndef USE_XCB 6851 const GLuint cmdlen = 4; 6852#endif 6853 if (__builtin_expect(dpy != NULL, 1)) { 6854#ifdef USE_XCB 6855 xcb_connection_t *c = XGetXCBConnection(dpy); 6856 (void) __glXFlushRenderBuffer(gc, gc->pc); 6857 xcb_glx_is_query_arb_reply_t *reply = xcb_glx_is_query_arb_reply(c, xcb_glx_is_query_arb(c, gc->currentContextTag, id), NULL); 6858 retval = reply->ret_val; 6859 free(reply); 6860#else 6861 GLubyte const * pc = __glXSetupSingleRequest(gc, X_GLsop_IsQueryARB, cmdlen); 6862(void) memcpy((void *)(pc + 0), (void *)(&id), 4); 6863 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); 6864 UnlockDisplay(dpy); SyncHandle(); 6865#endif /* USE_XCB */ 6866 } 6867 return retval; 6868} 6869 6870#define X_GLrop_DrawBuffersARB 233 6871void __indirect_glDrawBuffersARB(GLsizei n, const GLenum * bufs) 6872{ 6873 struct glx_context * const gc = __glXGetCurrentContext(); 6874 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); 6875 if (n < 0) { 6876 __glXSetError(gc, GL_INVALID_VALUE); 6877 return; 6878 } 6879 if (__builtin_expect((n >= 0) && (gc->currentDpy != NULL), 1)) { 6880if (cmdlen <= gc->maxSmallRenderCommandSize) { 6881 if ( (gc->pc + cmdlen) > gc->bufEnd ) { 6882 (void) __glXFlushRenderBuffer(gc, gc->pc); 6883 } 6884emit_header(gc->pc, X_GLrop_DrawBuffersARB, cmdlen); 6885(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); 6886(void) memcpy((void *)(gc->pc + 8), (void *)(bufs), (n * 4)); 6887gc->pc += cmdlen; 6888if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6889} 6890else { 6891const GLint op = X_GLrop_DrawBuffersARB; 6892const GLuint cmdlenLarge = cmdlen + 4; 6893GLubyte * const pc = __glXFlushRenderBuffer(gc, gc->pc); 6894(void) memcpy((void *)(pc + 0), (void *)(&cmdlenLarge), 4); 6895(void) memcpy((void *)(pc + 4), (void *)(&op), 4); 6896(void) memcpy((void *)(pc + 8), (void *)(&n), 4); 6897 __glXSendLargeCommand(gc, pc, 12, bufs, (n * 4)); 6898} 6899 } 6900} 6901 6902#define X_GLrop_ClampColorARB 234 6903void __indirect_glClampColorARB(GLenum target, GLenum clamp) 6904{ 6905 struct glx_context * const gc = __glXGetCurrentContext(); 6906 const GLuint cmdlen = 12; 6907emit_header(gc->pc, X_GLrop_ClampColorARB, cmdlen); 6908(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6909(void) memcpy((void *)(gc->pc + 8), (void *)(&clamp), 4); 6910gc->pc += cmdlen; 6911if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6912} 6913 6914#define X_GLrop_RenderbufferStorageMultisample 4331 6915void __indirect_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) 6916{ 6917 struct glx_context * const gc = __glXGetCurrentContext(); 6918 const GLuint cmdlen = 24; 6919emit_header(gc->pc, X_GLrop_RenderbufferStorageMultisample, cmdlen); 6920(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 6921(void) memcpy((void *)(gc->pc + 8), (void *)(&samples), 4); 6922(void) memcpy((void *)(gc->pc + 12), (void *)(&internalformat), 4); 6923(void) memcpy((void *)(gc->pc + 16), (void *)(&width), 4); 6924(void) memcpy((void *)(gc->pc + 20), (void *)(&height), 4); 6925gc->pc += cmdlen; 6926if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6927} 6928 6929#define X_GLrop_SampleMaskSGIS 2048 6930void __indirect_glSampleMaskSGIS(GLclampf value, GLboolean invert) 6931{ 6932 struct glx_context * const gc = __glXGetCurrentContext(); 6933 const GLuint cmdlen = 12; 6934emit_header(gc->pc, X_GLrop_SampleMaskSGIS, cmdlen); 6935(void) memcpy((void *)(gc->pc + 4), (void *)(&value), 4); 6936(void) memcpy((void *)(gc->pc + 8), (void *)(&invert), 1); 6937gc->pc += cmdlen; 6938if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6939} 6940 6941#define X_GLrop_SamplePatternSGIS 2049 6942void __indirect_glSamplePatternSGIS(GLenum pattern) 6943{ 6944 struct glx_context * const gc = __glXGetCurrentContext(); 6945 const GLuint cmdlen = 8; 6946emit_header(gc->pc, X_GLrop_SamplePatternSGIS, cmdlen); 6947(void) memcpy((void *)(gc->pc + 4), (void *)(&pattern), 4); 6948gc->pc += cmdlen; 6949if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6950} 6951 6952#define X_GLrop_PointParameterfEXT 2065 6953void __indirect_glPointParameterfEXT(GLenum pname, GLfloat param) 6954{ 6955 struct glx_context * const gc = __glXGetCurrentContext(); 6956 const GLuint cmdlen = 12; 6957emit_header(gc->pc, X_GLrop_PointParameterfEXT, cmdlen); 6958(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 6959(void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); 6960gc->pc += cmdlen; 6961if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6962} 6963 6964#define X_GLrop_PointParameterfvEXT 2066 6965void __indirect_glPointParameterfvEXT(GLenum pname, const GLfloat * params) 6966{ 6967 struct glx_context * const gc = __glXGetCurrentContext(); 6968 const GLuint compsize = __glPointParameterfvEXT_size(pname); 6969 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); 6970emit_header(gc->pc, X_GLrop_PointParameterfvEXT, cmdlen); 6971(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 6972(void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); 6973gc->pc += cmdlen; 6974if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6975} 6976 6977#define X_GLrop_SecondaryColor3bvEXT 4126 6978void __indirect_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue) 6979{ 6980 struct glx_context * const gc = __glXGetCurrentContext(); 6981 const GLuint cmdlen = 8; 6982emit_header(gc->pc, X_GLrop_SecondaryColor3bvEXT, cmdlen); 6983(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); 6984(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); 6985(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); 6986gc->pc += cmdlen; 6987if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 6988} 6989 6990#define X_GLrop_SecondaryColor3bvEXT 4126 6991void __indirect_glSecondaryColor3bvEXT(const GLbyte * v) 6992{ 6993 generic_3_byte( X_GLrop_SecondaryColor3bvEXT, v ); 6994} 6995 6996#define X_GLrop_SecondaryColor3dvEXT 4130 6997void __indirect_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue) 6998{ 6999 struct glx_context * const gc = __glXGetCurrentContext(); 7000 const GLuint cmdlen = 28; 7001emit_header(gc->pc, X_GLrop_SecondaryColor3dvEXT, cmdlen); 7002(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 8); 7003(void) memcpy((void *)(gc->pc + 12), (void *)(&green), 8); 7004(void) memcpy((void *)(gc->pc + 20), (void *)(&blue), 8); 7005gc->pc += cmdlen; 7006if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7007} 7008 7009#define X_GLrop_SecondaryColor3dvEXT 4130 7010void __indirect_glSecondaryColor3dvEXT(const GLdouble * v) 7011{ 7012 generic_24_byte( X_GLrop_SecondaryColor3dvEXT, v ); 7013} 7014 7015#define X_GLrop_SecondaryColor3fvEXT 4129 7016void __indirect_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue) 7017{ 7018 struct glx_context * const gc = __glXGetCurrentContext(); 7019 const GLuint cmdlen = 16; 7020emit_header(gc->pc, X_GLrop_SecondaryColor3fvEXT, cmdlen); 7021(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 7022(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 7023(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 7024gc->pc += cmdlen; 7025if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7026} 7027 7028#define X_GLrop_SecondaryColor3fvEXT 4129 7029void __indirect_glSecondaryColor3fvEXT(const GLfloat * v) 7030{ 7031 generic_12_byte( X_GLrop_SecondaryColor3fvEXT, v ); 7032} 7033 7034#define X_GLrop_SecondaryColor3ivEXT 4128 7035void __indirect_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue) 7036{ 7037 struct glx_context * const gc = __glXGetCurrentContext(); 7038 const GLuint cmdlen = 16; 7039emit_header(gc->pc, X_GLrop_SecondaryColor3ivEXT, cmdlen); 7040(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 7041(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 7042(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 7043gc->pc += cmdlen; 7044if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7045} 7046 7047#define X_GLrop_SecondaryColor3ivEXT 4128 7048void __indirect_glSecondaryColor3ivEXT(const GLint * v) 7049{ 7050 generic_12_byte( X_GLrop_SecondaryColor3ivEXT, v ); 7051} 7052 7053#define X_GLrop_SecondaryColor3svEXT 4127 7054void __indirect_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue) 7055{ 7056 struct glx_context * const gc = __glXGetCurrentContext(); 7057 const GLuint cmdlen = 12; 7058emit_header(gc->pc, X_GLrop_SecondaryColor3svEXT, cmdlen); 7059(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); 7060(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); 7061(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); 7062gc->pc += cmdlen; 7063if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7064} 7065 7066#define X_GLrop_SecondaryColor3svEXT 4127 7067void __indirect_glSecondaryColor3svEXT(const GLshort * v) 7068{ 7069 generic_6_byte( X_GLrop_SecondaryColor3svEXT, v ); 7070} 7071 7072#define X_GLrop_SecondaryColor3ubvEXT 4131 7073void __indirect_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue) 7074{ 7075 struct glx_context * const gc = __glXGetCurrentContext(); 7076 const GLuint cmdlen = 8; 7077emit_header(gc->pc, X_GLrop_SecondaryColor3ubvEXT, cmdlen); 7078(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 1); 7079(void) memcpy((void *)(gc->pc + 5), (void *)(&green), 1); 7080(void) memcpy((void *)(gc->pc + 6), (void *)(&blue), 1); 7081gc->pc += cmdlen; 7082if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7083} 7084 7085#define X_GLrop_SecondaryColor3ubvEXT 4131 7086void __indirect_glSecondaryColor3ubvEXT(const GLubyte * v) 7087{ 7088 generic_3_byte( X_GLrop_SecondaryColor3ubvEXT, v ); 7089} 7090 7091#define X_GLrop_SecondaryColor3uivEXT 4133 7092void __indirect_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue) 7093{ 7094 struct glx_context * const gc = __glXGetCurrentContext(); 7095 const GLuint cmdlen = 16; 7096emit_header(gc->pc, X_GLrop_SecondaryColor3uivEXT, cmdlen); 7097(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 4); 7098(void) memcpy((void *)(gc->pc + 8), (void *)(&green), 4); 7099(void) memcpy((void *)(gc->pc + 12), (void *)(&blue), 4); 7100gc->pc += cmdlen; 7101if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7102} 7103 7104#define X_GLrop_SecondaryColor3uivEXT 4133 7105void __indirect_glSecondaryColor3uivEXT(const GLuint * v) 7106{ 7107 generic_12_byte( X_GLrop_SecondaryColor3uivEXT, v ); 7108} 7109 7110#define X_GLrop_SecondaryColor3usvEXT 4132 7111void __indirect_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue) 7112{ 7113 struct glx_context * const gc = __glXGetCurrentContext(); 7114 const GLuint cmdlen = 12; 7115emit_header(gc->pc, X_GLrop_SecondaryColor3usvEXT, cmdlen); 7116(void) memcpy((void *)(gc->pc + 4), (void *)(&red), 2); 7117(void) memcpy((void *)(gc->pc + 6), (void *)(&green), 2); 7118(void) memcpy((void *)(gc->pc + 8), (void *)(&blue), 2); 7119gc->pc += cmdlen; 7120if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7121} 7122 7123#define X_GLrop_SecondaryColor3usvEXT 4132 7124void __indirect_glSecondaryColor3usvEXT(const GLushort * v) 7125{ 7126 generic_6_byte( X_GLrop_SecondaryColor3usvEXT, v ); 7127} 7128 7129#define X_GLrop_FogCoorddvEXT 4125 7130void __indirect_glFogCoorddEXT(GLdouble coord) 7131{ 7132 struct glx_context * const gc = __glXGetCurrentContext(); 7133 const GLuint cmdlen = 12; 7134emit_header(gc->pc, X_GLrop_FogCoorddvEXT, cmdlen); 7135(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 8); 7136gc->pc += cmdlen; 7137if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7138} 7139 7140#define X_GLrop_FogCoorddvEXT 4125 7141void __indirect_glFogCoorddvEXT(const GLdouble * coord) 7142{ 7143 generic_8_byte( X_GLrop_FogCoorddvEXT, coord ); 7144} 7145 7146#define X_GLrop_FogCoordfvEXT 4124 7147void __indirect_glFogCoordfEXT(GLfloat coord) 7148{ 7149 struct glx_context * const gc = __glXGetCurrentContext(); 7150 const GLuint cmdlen = 8; 7151emit_header(gc->pc, X_GLrop_FogCoordfvEXT, cmdlen); 7152(void) memcpy((void *)(gc->pc + 4), (void *)(&coord), 4); 7153gc->pc += cmdlen; 7154if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7155} 7156 7157#define X_GLrop_FogCoordfvEXT 4124 7158void __indirect_glFogCoordfvEXT(const GLfloat * coord) 7159{ 7160 generic_4_byte( X_GLrop_FogCoordfvEXT, coord ); 7161} 7162 7163#define X_GLrop_BlendFuncSeparateEXT 4134 7164void __indirect_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) 7165{ 7166 struct glx_context * const gc = __glXGetCurrentContext(); 7167 const GLuint cmdlen = 20; 7168emit_header(gc->pc, X_GLrop_BlendFuncSeparateEXT, cmdlen); 7169(void) memcpy((void *)(gc->pc + 4), (void *)(&sfactorRGB), 4); 7170(void) memcpy((void *)(gc->pc + 8), (void *)(&dfactorRGB), 4); 7171(void) memcpy((void *)(gc->pc + 12), (void *)(&sfactorAlpha), 4); 7172(void) memcpy((void *)(gc->pc + 16), (void *)(&dfactorAlpha), 4); 7173gc->pc += cmdlen; 7174if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7175} 7176 7177#define X_GLrop_WindowPos3fvMESA 230 7178void __indirect_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z) 7179{ 7180 struct glx_context * const gc = __glXGetCurrentContext(); 7181 const GLuint cmdlen = 16; 7182emit_header(gc->pc, X_GLrop_WindowPos3fvMESA, cmdlen); 7183(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 4); 7184(void) memcpy((void *)(gc->pc + 8), (void *)(&y), 4); 7185(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 4); 7186gc->pc += cmdlen; 7187if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7188} 7189 7190#define X_GLrop_WindowPos3fvMESA 230 7191void __indirect_glWindowPos3fvMESA(const GLfloat * v) 7192{ 7193 generic_12_byte( X_GLrop_WindowPos3fvMESA, v ); 7194} 7195 7196#define X_GLvop_AreProgramsResidentNV 1293 7197GLboolean __indirect_glAreProgramsResidentNV(GLsizei n, const GLuint * ids, GLboolean * residences) 7198{ 7199 struct glx_context * const gc = __glXGetCurrentContext(); 7200 Display * const dpy = gc->currentDpy; 7201 GLboolean retval = (GLboolean) 0; 7202 const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); 7203 if (n < 0) { 7204 __glXSetError(gc, GL_INVALID_VALUE); 7205 return 0; 7206 } 7207 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 7208 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_AreProgramsResidentNV, cmdlen); 7209(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 7210(void) memcpy((void *)(pc + 4), (void *)(ids), (n * 4)); 7211 retval = (GLboolean) __glXReadReply(dpy, 1, residences, GL_FALSE); 7212 UnlockDisplay(dpy); SyncHandle(); 7213 } 7214 return retval; 7215} 7216 7217#define X_GLrop_BindProgramNV 4180 7218void __indirect_glBindProgramNV(GLenum target, GLuint program) 7219{ 7220 struct glx_context * const gc = __glXGetCurrentContext(); 7221 const GLuint cmdlen = 12; 7222emit_header(gc->pc, X_GLrop_BindProgramNV, cmdlen); 7223(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 7224(void) memcpy((void *)(gc->pc + 8), (void *)(&program), 4); 7225gc->pc += cmdlen; 7226if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7227} 7228 7229#define X_GLvop_DeleteProgramsNV 1294 7230void __indirect_glDeleteProgramsNV(GLsizei n, const GLuint * programs) 7231{ 7232 struct glx_context * const gc = __glXGetCurrentContext(); 7233 Display * const dpy = gc->currentDpy; 7234 const GLuint cmdlen = 4 + __GLX_PAD((n * 4)); 7235 if (n < 0) { 7236 __glXSetError(gc, GL_INVALID_VALUE); 7237 return; 7238 } 7239 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 7240 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivate, X_GLvop_DeleteProgramsNV, cmdlen); 7241(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 7242(void) memcpy((void *)(pc + 4), (void *)(programs), (n * 4)); 7243 UnlockDisplay(dpy); SyncHandle(); 7244 } 7245 return; 7246} 7247 7248#define X_GLrop_ExecuteProgramNV 4181 7249void __indirect_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params) 7250{ 7251 struct glx_context * const gc = __glXGetCurrentContext(); 7252 const GLuint cmdlen = 28; 7253emit_header(gc->pc, X_GLrop_ExecuteProgramNV, cmdlen); 7254(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 7255(void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4); 7256(void) memcpy((void *)(gc->pc + 12), (void *)(params), 16); 7257gc->pc += cmdlen; 7258if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7259} 7260 7261#define X_GLvop_GenProgramsNV 1295 7262void __indirect_glGenProgramsNV(GLsizei n, GLuint * programs) 7263{ 7264 struct glx_context * const gc = __glXGetCurrentContext(); 7265 Display * const dpy = gc->currentDpy; 7266 const GLuint cmdlen = 4; 7267 if (n < 0) { 7268 __glXSetError(gc, GL_INVALID_VALUE); 7269 return; 7270 } 7271 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 7272 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenProgramsNV, cmdlen); 7273(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 7274 (void) __glXReadReply(dpy, 4, programs, GL_TRUE); 7275 UnlockDisplay(dpy); SyncHandle(); 7276 } 7277 return; 7278} 7279 7280#define X_GLvop_GetProgramParameterdvNV 1297 7281void __indirect_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params) 7282{ 7283 struct glx_context * const gc = __glXGetCurrentContext(); 7284 Display * const dpy = gc->currentDpy; 7285 const GLuint cmdlen = 12; 7286 if (__builtin_expect(dpy != NULL, 1)) { 7287 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterdvNV, cmdlen); 7288(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 7289(void) memcpy((void *)(pc + 4), (void *)(&index), 4); 7290(void) memcpy((void *)(pc + 8), (void *)(&pname), 4); 7291 (void) __glXReadReply(dpy, 8, params, GL_FALSE); 7292 UnlockDisplay(dpy); SyncHandle(); 7293 } 7294 return; 7295} 7296 7297#define X_GLvop_GetProgramParameterfvNV 1296 7298void __indirect_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params) 7299{ 7300 struct glx_context * const gc = __glXGetCurrentContext(); 7301 Display * const dpy = gc->currentDpy; 7302 const GLuint cmdlen = 12; 7303 if (__builtin_expect(dpy != NULL, 1)) { 7304 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramParameterfvNV, cmdlen); 7305(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 7306(void) memcpy((void *)(pc + 4), (void *)(&index), 4); 7307(void) memcpy((void *)(pc + 8), (void *)(&pname), 4); 7308 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 7309 UnlockDisplay(dpy); SyncHandle(); 7310 } 7311 return; 7312} 7313 7314#define X_GLvop_GetProgramStringNV 1299 7315void __indirect_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program) 7316{ 7317 struct glx_context * const gc = __glXGetCurrentContext(); 7318 Display * const dpy = gc->currentDpy; 7319 const GLuint cmdlen = 8; 7320 if (__builtin_expect(dpy != NULL, 1)) { 7321 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramStringNV, cmdlen); 7322(void) memcpy((void *)(pc + 0), (void *)(&id), 4); 7323(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 7324 (void) __glXReadReply(dpy, 1, program, GL_TRUE); 7325 UnlockDisplay(dpy); SyncHandle(); 7326 } 7327 return; 7328} 7329 7330#define X_GLvop_GetProgramivNV 1298 7331void __indirect_glGetProgramivNV(GLuint id, GLenum pname, GLint * params) 7332{ 7333 struct glx_context * const gc = __glXGetCurrentContext(); 7334 Display * const dpy = gc->currentDpy; 7335 const GLuint cmdlen = 8; 7336 if (__builtin_expect(dpy != NULL, 1)) { 7337 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramivNV, cmdlen); 7338(void) memcpy((void *)(pc + 0), (void *)(&id), 4); 7339(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 7340 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 7341 UnlockDisplay(dpy); SyncHandle(); 7342 } 7343 return; 7344} 7345 7346#define X_GLvop_GetTrackMatrixivNV 1300 7347void __indirect_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params) 7348{ 7349 struct glx_context * const gc = __glXGetCurrentContext(); 7350 Display * const dpy = gc->currentDpy; 7351 const GLuint cmdlen = 12; 7352 if (__builtin_expect(dpy != NULL, 1)) { 7353 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetTrackMatrixivNV, cmdlen); 7354(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 7355(void) memcpy((void *)(pc + 4), (void *)(&address), 4); 7356(void) memcpy((void *)(pc + 8), (void *)(&pname), 4); 7357 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 7358 UnlockDisplay(dpy); SyncHandle(); 7359 } 7360 return; 7361} 7362 7363#define X_GLvop_GetVertexAttribdvNV 1301 7364void __indirect_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params) 7365{ 7366 struct glx_context * const gc = __glXGetCurrentContext(); 7367 Display * const dpy = gc->currentDpy; 7368 const GLuint cmdlen = 8; 7369 if (__builtin_expect(dpy != NULL, 1)) { 7370 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribdvNV, cmdlen); 7371(void) memcpy((void *)(pc + 0), (void *)(&index), 4); 7372(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 7373 (void) __glXReadReply(dpy, 8, params, GL_FALSE); 7374 UnlockDisplay(dpy); SyncHandle(); 7375 } 7376 return; 7377} 7378 7379#define X_GLvop_GetVertexAttribfvNV 1302 7380void __indirect_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params) 7381{ 7382 struct glx_context * const gc = __glXGetCurrentContext(); 7383 Display * const dpy = gc->currentDpy; 7384 const GLuint cmdlen = 8; 7385 if (__builtin_expect(dpy != NULL, 1)) { 7386 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribfvNV, cmdlen); 7387(void) memcpy((void *)(pc + 0), (void *)(&index), 4); 7388(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 7389 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 7390 UnlockDisplay(dpy); SyncHandle(); 7391 } 7392 return; 7393} 7394 7395#define X_GLvop_GetVertexAttribivNV 1303 7396void __indirect_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params) 7397{ 7398 struct glx_context * const gc = __glXGetCurrentContext(); 7399 Display * const dpy = gc->currentDpy; 7400 const GLuint cmdlen = 8; 7401 if (__builtin_expect(dpy != NULL, 1)) { 7402 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetVertexAttribivNV, cmdlen); 7403(void) memcpy((void *)(pc + 0), (void *)(&index), 4); 7404(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 7405 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 7406 UnlockDisplay(dpy); SyncHandle(); 7407 } 7408 return; 7409} 7410 7411#define X_GLvop_IsProgramNV 1304 7412GLboolean __indirect_glIsProgramNV(GLuint program) 7413{ 7414 struct glx_context * const gc = __glXGetCurrentContext(); 7415 Display * const dpy = gc->currentDpy; 7416 GLboolean retval = (GLboolean) 0; 7417 const GLuint cmdlen = 4; 7418 if (__builtin_expect(dpy != NULL, 1)) { 7419 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsProgramNV, cmdlen); 7420(void) memcpy((void *)(pc + 0), (void *)(&program), 4); 7421 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); 7422 UnlockDisplay(dpy); SyncHandle(); 7423 } 7424 return retval; 7425} 7426 7427#define X_GLrop_LoadProgramNV 4183 7428void __indirect_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program) 7429{ 7430 struct glx_context * const gc = __glXGetCurrentContext(); 7431 const GLuint cmdlen = 16 + __GLX_PAD(len); 7432 if (len < 0) { 7433 __glXSetError(gc, GL_INVALID_VALUE); 7434 return; 7435 } 7436 if (__builtin_expect(len >= 0, 1)) { 7437emit_header(gc->pc, X_GLrop_LoadProgramNV, cmdlen); 7438(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 7439(void) memcpy((void *)(gc->pc + 8), (void *)(&id), 4); 7440(void) memcpy((void *)(gc->pc + 12), (void *)(&len), 4); 7441(void) memcpy((void *)(gc->pc + 16), (void *)(program), len); 7442gc->pc += cmdlen; 7443if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7444 } 7445} 7446 7447#define X_GLrop_ProgramParameters4dvNV 4187 7448void __indirect_glProgramParameters4dvNV(GLenum target, GLuint index, GLsizei num, const GLdouble * params) 7449{ 7450 struct glx_context * const gc = __glXGetCurrentContext(); 7451 const GLuint cmdlen = 16 + __GLX_PAD((num * 32)); 7452 if (num < 0) { 7453 __glXSetError(gc, GL_INVALID_VALUE); 7454 return; 7455 } 7456 if (__builtin_expect(num >= 0, 1)) { 7457emit_header(gc->pc, X_GLrop_ProgramParameters4dvNV, cmdlen); 7458(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 7459(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 7460(void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4); 7461(void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 32)); 7462gc->pc += cmdlen; 7463if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7464 } 7465} 7466 7467#define X_GLrop_ProgramParameters4fvNV 4186 7468void __indirect_glProgramParameters4fvNV(GLenum target, GLuint index, GLsizei num, const GLfloat * params) 7469{ 7470 struct glx_context * const gc = __glXGetCurrentContext(); 7471 const GLuint cmdlen = 16 + __GLX_PAD((num * 16)); 7472 if (num < 0) { 7473 __glXSetError(gc, GL_INVALID_VALUE); 7474 return; 7475 } 7476 if (__builtin_expect(num >= 0, 1)) { 7477emit_header(gc->pc, X_GLrop_ProgramParameters4fvNV, cmdlen); 7478(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 7479(void) memcpy((void *)(gc->pc + 8), (void *)(&index), 4); 7480(void) memcpy((void *)(gc->pc + 12), (void *)(&num), 4); 7481(void) memcpy((void *)(gc->pc + 16), (void *)(params), (num * 16)); 7482gc->pc += cmdlen; 7483if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7484 } 7485} 7486 7487#define X_GLrop_RequestResidentProgramsNV 4182 7488void __indirect_glRequestResidentProgramsNV(GLsizei n, const GLuint * ids) 7489{ 7490 struct glx_context * const gc = __glXGetCurrentContext(); 7491 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); 7492 if (n < 0) { 7493 __glXSetError(gc, GL_INVALID_VALUE); 7494 return; 7495 } 7496 if (__builtin_expect(n >= 0, 1)) { 7497emit_header(gc->pc, X_GLrop_RequestResidentProgramsNV, cmdlen); 7498(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); 7499(void) memcpy((void *)(gc->pc + 8), (void *)(ids), (n * 4)); 7500gc->pc += cmdlen; 7501if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7502 } 7503} 7504 7505#define X_GLrop_TrackMatrixNV 4188 7506void __indirect_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform) 7507{ 7508 struct glx_context * const gc = __glXGetCurrentContext(); 7509 const GLuint cmdlen = 20; 7510emit_header(gc->pc, X_GLrop_TrackMatrixNV, cmdlen); 7511(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 7512(void) memcpy((void *)(gc->pc + 8), (void *)(&address), 4); 7513(void) memcpy((void *)(gc->pc + 12), (void *)(&matrix), 4); 7514(void) memcpy((void *)(gc->pc + 16), (void *)(&transform), 4); 7515gc->pc += cmdlen; 7516if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7517} 7518 7519#define X_GLrop_VertexAttrib1dvNV 4273 7520void __indirect_glVertexAttrib1dNV(GLuint index, GLdouble x) 7521{ 7522 struct glx_context * const gc = __glXGetCurrentContext(); 7523 const GLuint cmdlen = 16; 7524emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen); 7525(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7526(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); 7527gc->pc += cmdlen; 7528if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7529} 7530 7531#define X_GLrop_VertexAttrib1dvNV 4273 7532void __indirect_glVertexAttrib1dvNV(GLuint index, const GLdouble * v) 7533{ 7534 struct glx_context * const gc = __glXGetCurrentContext(); 7535 const GLuint cmdlen = 16; 7536emit_header(gc->pc, X_GLrop_VertexAttrib1dvNV, cmdlen); 7537(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7538(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 7539gc->pc += cmdlen; 7540if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7541} 7542 7543#define X_GLrop_VertexAttrib1fvNV 4269 7544void __indirect_glVertexAttrib1fNV(GLuint index, GLfloat x) 7545{ 7546 struct glx_context * const gc = __glXGetCurrentContext(); 7547 const GLuint cmdlen = 12; 7548emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen); 7549(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7550(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); 7551gc->pc += cmdlen; 7552if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7553} 7554 7555#define X_GLrop_VertexAttrib1fvNV 4269 7556void __indirect_glVertexAttrib1fvNV(GLuint index, const GLfloat * v) 7557{ 7558 struct glx_context * const gc = __glXGetCurrentContext(); 7559 const GLuint cmdlen = 12; 7560emit_header(gc->pc, X_GLrop_VertexAttrib1fvNV, cmdlen); 7561(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7562(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 7563gc->pc += cmdlen; 7564if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7565} 7566 7567#define X_GLrop_VertexAttrib1svNV 4265 7568void __indirect_glVertexAttrib1sNV(GLuint index, GLshort x) 7569{ 7570 struct glx_context * const gc = __glXGetCurrentContext(); 7571 const GLuint cmdlen = 12; 7572emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen); 7573(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7574(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); 7575gc->pc += cmdlen; 7576if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7577} 7578 7579#define X_GLrop_VertexAttrib1svNV 4265 7580void __indirect_glVertexAttrib1svNV(GLuint index, const GLshort * v) 7581{ 7582 struct glx_context * const gc = __glXGetCurrentContext(); 7583 const GLuint cmdlen = 12; 7584emit_header(gc->pc, X_GLrop_VertexAttrib1svNV, cmdlen); 7585(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7586(void) memcpy((void *)(gc->pc + 8), (void *)(v), 2); 7587gc->pc += cmdlen; 7588if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7589} 7590 7591#define X_GLrop_VertexAttrib2dvNV 4274 7592void __indirect_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y) 7593{ 7594 struct glx_context * const gc = __glXGetCurrentContext(); 7595 const GLuint cmdlen = 24; 7596emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen); 7597(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7598(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); 7599(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); 7600gc->pc += cmdlen; 7601if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7602} 7603 7604#define X_GLrop_VertexAttrib2dvNV 4274 7605void __indirect_glVertexAttrib2dvNV(GLuint index, const GLdouble * v) 7606{ 7607 struct glx_context * const gc = __glXGetCurrentContext(); 7608 const GLuint cmdlen = 24; 7609emit_header(gc->pc, X_GLrop_VertexAttrib2dvNV, cmdlen); 7610(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7611(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 7612gc->pc += cmdlen; 7613if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7614} 7615 7616#define X_GLrop_VertexAttrib2fvNV 4270 7617void __indirect_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y) 7618{ 7619 struct glx_context * const gc = __glXGetCurrentContext(); 7620 const GLuint cmdlen = 16; 7621emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen); 7622(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7623(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); 7624(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); 7625gc->pc += cmdlen; 7626if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7627} 7628 7629#define X_GLrop_VertexAttrib2fvNV 4270 7630void __indirect_glVertexAttrib2fvNV(GLuint index, const GLfloat * v) 7631{ 7632 struct glx_context * const gc = __glXGetCurrentContext(); 7633 const GLuint cmdlen = 16; 7634emit_header(gc->pc, X_GLrop_VertexAttrib2fvNV, cmdlen); 7635(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7636(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 7637gc->pc += cmdlen; 7638if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7639} 7640 7641#define X_GLrop_VertexAttrib2svNV 4266 7642void __indirect_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y) 7643{ 7644 struct glx_context * const gc = __glXGetCurrentContext(); 7645 const GLuint cmdlen = 12; 7646emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen); 7647(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7648(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); 7649(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); 7650gc->pc += cmdlen; 7651if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7652} 7653 7654#define X_GLrop_VertexAttrib2svNV 4266 7655void __indirect_glVertexAttrib2svNV(GLuint index, const GLshort * v) 7656{ 7657 struct glx_context * const gc = __glXGetCurrentContext(); 7658 const GLuint cmdlen = 12; 7659emit_header(gc->pc, X_GLrop_VertexAttrib2svNV, cmdlen); 7660(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7661(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 7662gc->pc += cmdlen; 7663if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7664} 7665 7666#define X_GLrop_VertexAttrib3dvNV 4275 7667void __indirect_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z) 7668{ 7669 struct glx_context * const gc = __glXGetCurrentContext(); 7670 const GLuint cmdlen = 32; 7671emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen); 7672(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7673(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); 7674(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); 7675(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8); 7676gc->pc += cmdlen; 7677if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7678} 7679 7680#define X_GLrop_VertexAttrib3dvNV 4275 7681void __indirect_glVertexAttrib3dvNV(GLuint index, const GLdouble * v) 7682{ 7683 struct glx_context * const gc = __glXGetCurrentContext(); 7684 const GLuint cmdlen = 32; 7685emit_header(gc->pc, X_GLrop_VertexAttrib3dvNV, cmdlen); 7686(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7687(void) memcpy((void *)(gc->pc + 8), (void *)(v), 24); 7688gc->pc += cmdlen; 7689if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7690} 7691 7692#define X_GLrop_VertexAttrib3fvNV 4271 7693void __indirect_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z) 7694{ 7695 struct glx_context * const gc = __glXGetCurrentContext(); 7696 const GLuint cmdlen = 20; 7697emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen); 7698(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7699(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); 7700(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); 7701(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); 7702gc->pc += cmdlen; 7703if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7704} 7705 7706#define X_GLrop_VertexAttrib3fvNV 4271 7707void __indirect_glVertexAttrib3fvNV(GLuint index, const GLfloat * v) 7708{ 7709 struct glx_context * const gc = __glXGetCurrentContext(); 7710 const GLuint cmdlen = 20; 7711emit_header(gc->pc, X_GLrop_VertexAttrib3fvNV, cmdlen); 7712(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7713(void) memcpy((void *)(gc->pc + 8), (void *)(v), 12); 7714gc->pc += cmdlen; 7715if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7716} 7717 7718#define X_GLrop_VertexAttrib3svNV 4267 7719void __indirect_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z) 7720{ 7721 struct glx_context * const gc = __glXGetCurrentContext(); 7722 const GLuint cmdlen = 16; 7723emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen); 7724(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7725(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); 7726(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); 7727(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); 7728gc->pc += cmdlen; 7729if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7730} 7731 7732#define X_GLrop_VertexAttrib3svNV 4267 7733void __indirect_glVertexAttrib3svNV(GLuint index, const GLshort * v) 7734{ 7735 struct glx_context * const gc = __glXGetCurrentContext(); 7736 const GLuint cmdlen = 16; 7737emit_header(gc->pc, X_GLrop_VertexAttrib3svNV, cmdlen); 7738(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7739(void) memcpy((void *)(gc->pc + 8), (void *)(v), 6); 7740gc->pc += cmdlen; 7741if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7742} 7743 7744#define X_GLrop_VertexAttrib4dvNV 4276 7745void __indirect_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) 7746{ 7747 struct glx_context * const gc = __glXGetCurrentContext(); 7748 const GLuint cmdlen = 40; 7749emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen); 7750(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7751(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 8); 7752(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 8); 7753(void) memcpy((void *)(gc->pc + 24), (void *)(&z), 8); 7754(void) memcpy((void *)(gc->pc + 32), (void *)(&w), 8); 7755gc->pc += cmdlen; 7756if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7757} 7758 7759#define X_GLrop_VertexAttrib4dvNV 4276 7760void __indirect_glVertexAttrib4dvNV(GLuint index, const GLdouble * v) 7761{ 7762 struct glx_context * const gc = __glXGetCurrentContext(); 7763 const GLuint cmdlen = 40; 7764emit_header(gc->pc, X_GLrop_VertexAttrib4dvNV, cmdlen); 7765(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7766(void) memcpy((void *)(gc->pc + 8), (void *)(v), 32); 7767gc->pc += cmdlen; 7768if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7769} 7770 7771#define X_GLrop_VertexAttrib4fvNV 4272 7772void __indirect_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) 7773{ 7774 struct glx_context * const gc = __glXGetCurrentContext(); 7775 const GLuint cmdlen = 24; 7776emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen); 7777(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7778(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 4); 7779(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 4); 7780(void) memcpy((void *)(gc->pc + 16), (void *)(&z), 4); 7781(void) memcpy((void *)(gc->pc + 20), (void *)(&w), 4); 7782gc->pc += cmdlen; 7783if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7784} 7785 7786#define X_GLrop_VertexAttrib4fvNV 4272 7787void __indirect_glVertexAttrib4fvNV(GLuint index, const GLfloat * v) 7788{ 7789 struct glx_context * const gc = __glXGetCurrentContext(); 7790 const GLuint cmdlen = 24; 7791emit_header(gc->pc, X_GLrop_VertexAttrib4fvNV, cmdlen); 7792(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7793(void) memcpy((void *)(gc->pc + 8), (void *)(v), 16); 7794gc->pc += cmdlen; 7795if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7796} 7797 7798#define X_GLrop_VertexAttrib4svNV 4268 7799void __indirect_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) 7800{ 7801 struct glx_context * const gc = __glXGetCurrentContext(); 7802 const GLuint cmdlen = 16; 7803emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen); 7804(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7805(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 2); 7806(void) memcpy((void *)(gc->pc + 10), (void *)(&y), 2); 7807(void) memcpy((void *)(gc->pc + 12), (void *)(&z), 2); 7808(void) memcpy((void *)(gc->pc + 14), (void *)(&w), 2); 7809gc->pc += cmdlen; 7810if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7811} 7812 7813#define X_GLrop_VertexAttrib4svNV 4268 7814void __indirect_glVertexAttrib4svNV(GLuint index, const GLshort * v) 7815{ 7816 struct glx_context * const gc = __glXGetCurrentContext(); 7817 const GLuint cmdlen = 16; 7818emit_header(gc->pc, X_GLrop_VertexAttrib4svNV, cmdlen); 7819(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7820(void) memcpy((void *)(gc->pc + 8), (void *)(v), 8); 7821gc->pc += cmdlen; 7822if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7823} 7824 7825#define X_GLrop_VertexAttrib4ubvNV 4277 7826void __indirect_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) 7827{ 7828 struct glx_context * const gc = __glXGetCurrentContext(); 7829 const GLuint cmdlen = 12; 7830emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen); 7831(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7832(void) memcpy((void *)(gc->pc + 8), (void *)(&x), 1); 7833(void) memcpy((void *)(gc->pc + 9), (void *)(&y), 1); 7834(void) memcpy((void *)(gc->pc + 10), (void *)(&z), 1); 7835(void) memcpy((void *)(gc->pc + 11), (void *)(&w), 1); 7836gc->pc += cmdlen; 7837if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7838} 7839 7840#define X_GLrop_VertexAttrib4ubvNV 4277 7841void __indirect_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v) 7842{ 7843 struct glx_context * const gc = __glXGetCurrentContext(); 7844 const GLuint cmdlen = 12; 7845emit_header(gc->pc, X_GLrop_VertexAttrib4ubvNV, cmdlen); 7846(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7847(void) memcpy((void *)(gc->pc + 8), (void *)(v), 4); 7848gc->pc += cmdlen; 7849if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7850} 7851 7852#define X_GLrop_VertexAttribs1dvNV 4210 7853void __indirect_glVertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v) 7854{ 7855 struct glx_context * const gc = __glXGetCurrentContext(); 7856 const GLuint cmdlen = 12 + __GLX_PAD((n * 8)); 7857 if (n < 0) { 7858 __glXSetError(gc, GL_INVALID_VALUE); 7859 return; 7860 } 7861 if (__builtin_expect(n >= 0, 1)) { 7862emit_header(gc->pc, X_GLrop_VertexAttribs1dvNV, cmdlen); 7863(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7864(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 7865(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8)); 7866gc->pc += cmdlen; 7867if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7868 } 7869} 7870 7871#define X_GLrop_VertexAttribs1fvNV 4206 7872void __indirect_glVertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v) 7873{ 7874 struct glx_context * const gc = __glXGetCurrentContext(); 7875 const GLuint cmdlen = 12 + __GLX_PAD((n * 4)); 7876 if (n < 0) { 7877 __glXSetError(gc, GL_INVALID_VALUE); 7878 return; 7879 } 7880 if (__builtin_expect(n >= 0, 1)) { 7881emit_header(gc->pc, X_GLrop_VertexAttribs1fvNV, cmdlen); 7882(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7883(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 7884(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4)); 7885gc->pc += cmdlen; 7886if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7887 } 7888} 7889 7890#define X_GLrop_VertexAttribs1svNV 4202 7891void __indirect_glVertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v) 7892{ 7893 struct glx_context * const gc = __glXGetCurrentContext(); 7894 const GLuint cmdlen = 12 + __GLX_PAD((n * 2)); 7895 if (n < 0) { 7896 __glXSetError(gc, GL_INVALID_VALUE); 7897 return; 7898 } 7899 if (__builtin_expect(n >= 0, 1)) { 7900emit_header(gc->pc, X_GLrop_VertexAttribs1svNV, cmdlen); 7901(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7902(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 7903(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 2)); 7904gc->pc += cmdlen; 7905if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7906 } 7907} 7908 7909#define X_GLrop_VertexAttribs2dvNV 4211 7910void __indirect_glVertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v) 7911{ 7912 struct glx_context * const gc = __glXGetCurrentContext(); 7913 const GLuint cmdlen = 12 + __GLX_PAD((n * 16)); 7914 if (n < 0) { 7915 __glXSetError(gc, GL_INVALID_VALUE); 7916 return; 7917 } 7918 if (__builtin_expect(n >= 0, 1)) { 7919emit_header(gc->pc, X_GLrop_VertexAttribs2dvNV, cmdlen); 7920(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7921(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 7922(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16)); 7923gc->pc += cmdlen; 7924if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7925 } 7926} 7927 7928#define X_GLrop_VertexAttribs2fvNV 4207 7929void __indirect_glVertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v) 7930{ 7931 struct glx_context * const gc = __glXGetCurrentContext(); 7932 const GLuint cmdlen = 12 + __GLX_PAD((n * 8)); 7933 if (n < 0) { 7934 __glXSetError(gc, GL_INVALID_VALUE); 7935 return; 7936 } 7937 if (__builtin_expect(n >= 0, 1)) { 7938emit_header(gc->pc, X_GLrop_VertexAttribs2fvNV, cmdlen); 7939(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7940(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 7941(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8)); 7942gc->pc += cmdlen; 7943if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7944 } 7945} 7946 7947#define X_GLrop_VertexAttribs2svNV 4203 7948void __indirect_glVertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v) 7949{ 7950 struct glx_context * const gc = __glXGetCurrentContext(); 7951 const GLuint cmdlen = 12 + __GLX_PAD((n * 4)); 7952 if (n < 0) { 7953 __glXSetError(gc, GL_INVALID_VALUE); 7954 return; 7955 } 7956 if (__builtin_expect(n >= 0, 1)) { 7957emit_header(gc->pc, X_GLrop_VertexAttribs2svNV, cmdlen); 7958(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7959(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 7960(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4)); 7961gc->pc += cmdlen; 7962if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7963 } 7964} 7965 7966#define X_GLrop_VertexAttribs3dvNV 4212 7967void __indirect_glVertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v) 7968{ 7969 struct glx_context * const gc = __glXGetCurrentContext(); 7970 const GLuint cmdlen = 12 + __GLX_PAD((n * 24)); 7971 if (n < 0) { 7972 __glXSetError(gc, GL_INVALID_VALUE); 7973 return; 7974 } 7975 if (__builtin_expect(n >= 0, 1)) { 7976emit_header(gc->pc, X_GLrop_VertexAttribs3dvNV, cmdlen); 7977(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7978(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 7979(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 24)); 7980gc->pc += cmdlen; 7981if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 7982 } 7983} 7984 7985#define X_GLrop_VertexAttribs3fvNV 4208 7986void __indirect_glVertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v) 7987{ 7988 struct glx_context * const gc = __glXGetCurrentContext(); 7989 const GLuint cmdlen = 12 + __GLX_PAD((n * 12)); 7990 if (n < 0) { 7991 __glXSetError(gc, GL_INVALID_VALUE); 7992 return; 7993 } 7994 if (__builtin_expect(n >= 0, 1)) { 7995emit_header(gc->pc, X_GLrop_VertexAttribs3fvNV, cmdlen); 7996(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 7997(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 7998(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 12)); 7999gc->pc += cmdlen; 8000if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8001 } 8002} 8003 8004#define X_GLrop_VertexAttribs3svNV 4204 8005void __indirect_glVertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v) 8006{ 8007 struct glx_context * const gc = __glXGetCurrentContext(); 8008 const GLuint cmdlen = 12 + __GLX_PAD((n * 6)); 8009 if (n < 0) { 8010 __glXSetError(gc, GL_INVALID_VALUE); 8011 return; 8012 } 8013 if (__builtin_expect(n >= 0, 1)) { 8014emit_header(gc->pc, X_GLrop_VertexAttribs3svNV, cmdlen); 8015(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 8016(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 8017(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 6)); 8018gc->pc += cmdlen; 8019if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8020 } 8021} 8022 8023#define X_GLrop_VertexAttribs4dvNV 4213 8024void __indirect_glVertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v) 8025{ 8026 struct glx_context * const gc = __glXGetCurrentContext(); 8027 const GLuint cmdlen = 12 + __GLX_PAD((n * 32)); 8028 if (n < 0) { 8029 __glXSetError(gc, GL_INVALID_VALUE); 8030 return; 8031 } 8032 if (__builtin_expect(n >= 0, 1)) { 8033emit_header(gc->pc, X_GLrop_VertexAttribs4dvNV, cmdlen); 8034(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 8035(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 8036(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 32)); 8037gc->pc += cmdlen; 8038if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8039 } 8040} 8041 8042#define X_GLrop_VertexAttribs4fvNV 4209 8043void __indirect_glVertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v) 8044{ 8045 struct glx_context * const gc = __glXGetCurrentContext(); 8046 const GLuint cmdlen = 12 + __GLX_PAD((n * 16)); 8047 if (n < 0) { 8048 __glXSetError(gc, GL_INVALID_VALUE); 8049 return; 8050 } 8051 if (__builtin_expect(n >= 0, 1)) { 8052emit_header(gc->pc, X_GLrop_VertexAttribs4fvNV, cmdlen); 8053(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 8054(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 8055(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 16)); 8056gc->pc += cmdlen; 8057if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8058 } 8059} 8060 8061#define X_GLrop_VertexAttribs4svNV 4205 8062void __indirect_glVertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v) 8063{ 8064 struct glx_context * const gc = __glXGetCurrentContext(); 8065 const GLuint cmdlen = 12 + __GLX_PAD((n * 8)); 8066 if (n < 0) { 8067 __glXSetError(gc, GL_INVALID_VALUE); 8068 return; 8069 } 8070 if (__builtin_expect(n >= 0, 1)) { 8071emit_header(gc->pc, X_GLrop_VertexAttribs4svNV, cmdlen); 8072(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 8073(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 8074(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 8)); 8075gc->pc += cmdlen; 8076if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8077 } 8078} 8079 8080#define X_GLrop_VertexAttribs4ubvNV 4214 8081void __indirect_glVertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v) 8082{ 8083 struct glx_context * const gc = __glXGetCurrentContext(); 8084 const GLuint cmdlen = 12 + __GLX_PAD((n * 4)); 8085 if (n < 0) { 8086 __glXSetError(gc, GL_INVALID_VALUE); 8087 return; 8088 } 8089 if (__builtin_expect(n >= 0, 1)) { 8090emit_header(gc->pc, X_GLrop_VertexAttribs4ubvNV, cmdlen); 8091(void) memcpy((void *)(gc->pc + 4), (void *)(&index), 4); 8092(void) memcpy((void *)(gc->pc + 8), (void *)(&n), 4); 8093(void) memcpy((void *)(gc->pc + 12), (void *)(v), (n * 4)); 8094gc->pc += cmdlen; 8095if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8096 } 8097} 8098 8099#define X_GLrop_PointParameteriNV 4221 8100void __indirect_glPointParameteriNV(GLenum pname, GLint param) 8101{ 8102 struct glx_context * const gc = __glXGetCurrentContext(); 8103 const GLuint cmdlen = 12; 8104emit_header(gc->pc, X_GLrop_PointParameteriNV, cmdlen); 8105(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 8106(void) memcpy((void *)(gc->pc + 8), (void *)(¶m), 4); 8107gc->pc += cmdlen; 8108if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8109} 8110 8111#define X_GLrop_PointParameterivNV 4222 8112void __indirect_glPointParameterivNV(GLenum pname, const GLint * params) 8113{ 8114 struct glx_context * const gc = __glXGetCurrentContext(); 8115 const GLuint compsize = __glPointParameterivNV_size(pname); 8116 const GLuint cmdlen = 8 + __GLX_PAD((compsize * 4)); 8117emit_header(gc->pc, X_GLrop_PointParameterivNV, cmdlen); 8118(void) memcpy((void *)(gc->pc + 4), (void *)(&pname), 4); 8119(void) memcpy((void *)(gc->pc + 8), (void *)(params), (compsize * 4)); 8120gc->pc += cmdlen; 8121if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8122} 8123 8124#define X_GLrop_ActiveStencilFaceEXT 4220 8125void __indirect_glActiveStencilFaceEXT(GLenum face) 8126{ 8127 struct glx_context * const gc = __glXGetCurrentContext(); 8128 const GLuint cmdlen = 8; 8129emit_header(gc->pc, X_GLrop_ActiveStencilFaceEXT, cmdlen); 8130(void) memcpy((void *)(gc->pc + 4), (void *)(&face), 4); 8131gc->pc += cmdlen; 8132if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8133} 8134 8135#define X_GLvop_GetProgramNamedParameterdvNV 1311 8136void __indirect_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params) 8137{ 8138 struct glx_context * const gc = __glXGetCurrentContext(); 8139 Display * const dpy = gc->currentDpy; 8140 const GLuint cmdlen = 8 + __GLX_PAD(len); 8141 if (len < 0) { 8142 __glXSetError(gc, GL_INVALID_VALUE); 8143 return; 8144 } 8145 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) { 8146 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterdvNV, cmdlen); 8147(void) memcpy((void *)(pc + 0), (void *)(&id), 4); 8148(void) memcpy((void *)(pc + 4), (void *)(&len), 4); 8149(void) memcpy((void *)(pc + 8), (void *)(name), len); 8150 (void) __glXReadReply(dpy, 8, params, GL_TRUE); 8151 UnlockDisplay(dpy); SyncHandle(); 8152 } 8153 return; 8154} 8155 8156#define X_GLvop_GetProgramNamedParameterfvNV 1310 8157void __indirect_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params) 8158{ 8159 struct glx_context * const gc = __glXGetCurrentContext(); 8160 Display * const dpy = gc->currentDpy; 8161 const GLuint cmdlen = 8 + __GLX_PAD(len); 8162 if (len < 0) { 8163 __glXSetError(gc, GL_INVALID_VALUE); 8164 return; 8165 } 8166 if (__builtin_expect((len >= 0) && (dpy != NULL), 1)) { 8167 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetProgramNamedParameterfvNV, cmdlen); 8168(void) memcpy((void *)(pc + 0), (void *)(&id), 4); 8169(void) memcpy((void *)(pc + 4), (void *)(&len), 4); 8170(void) memcpy((void *)(pc + 8), (void *)(name), len); 8171 (void) __glXReadReply(dpy, 4, params, GL_TRUE); 8172 UnlockDisplay(dpy); SyncHandle(); 8173 } 8174 return; 8175} 8176 8177#define X_GLrop_ProgramNamedParameter4dvNV 4219 8178void __indirect_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w) 8179{ 8180 struct glx_context * const gc = __glXGetCurrentContext(); 8181 const GLuint cmdlen = 44 + __GLX_PAD(len); 8182 if (len < 0) { 8183 __glXSetError(gc, GL_INVALID_VALUE); 8184 return; 8185 } 8186 if (__builtin_expect(len >= 0, 1)) { 8187emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen); 8188(void) memcpy((void *)(gc->pc + 4), (void *)(&x), 8); 8189(void) memcpy((void *)(gc->pc + 12), (void *)(&y), 8); 8190(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 8); 8191(void) memcpy((void *)(gc->pc + 28), (void *)(&w), 8); 8192(void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4); 8193(void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4); 8194(void) memcpy((void *)(gc->pc + 44), (void *)(name), len); 8195gc->pc += cmdlen; 8196if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8197 } 8198} 8199 8200#define X_GLrop_ProgramNamedParameter4dvNV 4219 8201void __indirect_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v) 8202{ 8203 struct glx_context * const gc = __glXGetCurrentContext(); 8204 const GLuint cmdlen = 44 + __GLX_PAD(len); 8205 if (len < 0) { 8206 __glXSetError(gc, GL_INVALID_VALUE); 8207 return; 8208 } 8209 if (__builtin_expect(len >= 0, 1)) { 8210emit_header(gc->pc, X_GLrop_ProgramNamedParameter4dvNV, cmdlen); 8211(void) memcpy((void *)(gc->pc + 4), (void *)(v), 32); 8212(void) memcpy((void *)(gc->pc + 36), (void *)(&id), 4); 8213(void) memcpy((void *)(gc->pc + 40), (void *)(&len), 4); 8214(void) memcpy((void *)(gc->pc + 44), (void *)(name), len); 8215gc->pc += cmdlen; 8216if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8217 } 8218} 8219 8220#define X_GLrop_ProgramNamedParameter4fvNV 4218 8221void __indirect_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) 8222{ 8223 struct glx_context * const gc = __glXGetCurrentContext(); 8224 const GLuint cmdlen = 28 + __GLX_PAD(len); 8225 if (len < 0) { 8226 __glXSetError(gc, GL_INVALID_VALUE); 8227 return; 8228 } 8229 if (__builtin_expect(len >= 0, 1)) { 8230emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen); 8231(void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4); 8232(void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4); 8233(void) memcpy((void *)(gc->pc + 12), (void *)(&x), 4); 8234(void) memcpy((void *)(gc->pc + 16), (void *)(&y), 4); 8235(void) memcpy((void *)(gc->pc + 20), (void *)(&z), 4); 8236(void) memcpy((void *)(gc->pc + 24), (void *)(&w), 4); 8237(void) memcpy((void *)(gc->pc + 28), (void *)(name), len); 8238gc->pc += cmdlen; 8239if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8240 } 8241} 8242 8243#define X_GLrop_ProgramNamedParameter4fvNV 4218 8244void __indirect_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v) 8245{ 8246 struct glx_context * const gc = __glXGetCurrentContext(); 8247 const GLuint cmdlen = 28 + __GLX_PAD(len); 8248 if (len < 0) { 8249 __glXSetError(gc, GL_INVALID_VALUE); 8250 return; 8251 } 8252 if (__builtin_expect(len >= 0, 1)) { 8253emit_header(gc->pc, X_GLrop_ProgramNamedParameter4fvNV, cmdlen); 8254(void) memcpy((void *)(gc->pc + 4), (void *)(&id), 4); 8255(void) memcpy((void *)(gc->pc + 8), (void *)(&len), 4); 8256(void) memcpy((void *)(gc->pc + 12), (void *)(v), 16); 8257(void) memcpy((void *)(gc->pc + 28), (void *)(name), len); 8258gc->pc += cmdlen; 8259if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8260 } 8261} 8262 8263#define X_GLrop_BlendEquationSeparateEXT 4228 8264void __indirect_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeA) 8265{ 8266 struct glx_context * const gc = __glXGetCurrentContext(); 8267 const GLuint cmdlen = 12; 8268emit_header(gc->pc, X_GLrop_BlendEquationSeparateEXT, cmdlen); 8269(void) memcpy((void *)(gc->pc + 4), (void *)(&modeRGB), 4); 8270(void) memcpy((void *)(gc->pc + 8), (void *)(&modeA), 4); 8271gc->pc += cmdlen; 8272if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8273} 8274 8275#define X_GLrop_BindFramebufferEXT 4319 8276void __indirect_glBindFramebufferEXT(GLenum target, GLuint framebuffer) 8277{ 8278 struct glx_context * const gc = __glXGetCurrentContext(); 8279 const GLuint cmdlen = 12; 8280emit_header(gc->pc, X_GLrop_BindFramebufferEXT, cmdlen); 8281(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 8282(void) memcpy((void *)(gc->pc + 8), (void *)(&framebuffer), 4); 8283gc->pc += cmdlen; 8284if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8285} 8286 8287#define X_GLrop_BindRenderbufferEXT 4316 8288void __indirect_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer) 8289{ 8290 struct glx_context * const gc = __glXGetCurrentContext(); 8291 const GLuint cmdlen = 12; 8292emit_header(gc->pc, X_GLrop_BindRenderbufferEXT, cmdlen); 8293(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 8294(void) memcpy((void *)(gc->pc + 8), (void *)(&renderbuffer), 4); 8295gc->pc += cmdlen; 8296if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8297} 8298 8299#define X_GLvop_CheckFramebufferStatusEXT 1427 8300GLenum __indirect_glCheckFramebufferStatusEXT(GLenum target) 8301{ 8302 struct glx_context * const gc = __glXGetCurrentContext(); 8303 Display * const dpy = gc->currentDpy; 8304 GLenum retval = (GLenum) 0; 8305 const GLuint cmdlen = 4; 8306 if (__builtin_expect(dpy != NULL, 1)) { 8307 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_CheckFramebufferStatusEXT, cmdlen); 8308(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 8309 retval = (GLenum) __glXReadReply(dpy, 0, NULL, GL_FALSE); 8310 UnlockDisplay(dpy); SyncHandle(); 8311 } 8312 return retval; 8313} 8314 8315#define X_GLrop_DeleteFramebuffersEXT 4320 8316void __indirect_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers) 8317{ 8318 struct glx_context * const gc = __glXGetCurrentContext(); 8319 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); 8320 if (n < 0) { 8321 __glXSetError(gc, GL_INVALID_VALUE); 8322 return; 8323 } 8324 if (__builtin_expect(n >= 0, 1)) { 8325emit_header(gc->pc, X_GLrop_DeleteFramebuffersEXT, cmdlen); 8326(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); 8327(void) memcpy((void *)(gc->pc + 8), (void *)(framebuffers), (n * 4)); 8328gc->pc += cmdlen; 8329if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8330 } 8331} 8332 8333#define X_GLrop_DeleteRenderbuffersEXT 4317 8334void __indirect_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers) 8335{ 8336 struct glx_context * const gc = __glXGetCurrentContext(); 8337 const GLuint cmdlen = 8 + __GLX_PAD((n * 4)); 8338 if (n < 0) { 8339 __glXSetError(gc, GL_INVALID_VALUE); 8340 return; 8341 } 8342 if (__builtin_expect(n >= 0, 1)) { 8343emit_header(gc->pc, X_GLrop_DeleteRenderbuffersEXT, cmdlen); 8344(void) memcpy((void *)(gc->pc + 4), (void *)(&n), 4); 8345(void) memcpy((void *)(gc->pc + 8), (void *)(renderbuffers), (n * 4)); 8346gc->pc += cmdlen; 8347if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8348 } 8349} 8350 8351#define X_GLrop_FramebufferRenderbufferEXT 4324 8352void __indirect_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) 8353{ 8354 struct glx_context * const gc = __glXGetCurrentContext(); 8355 const GLuint cmdlen = 20; 8356emit_header(gc->pc, X_GLrop_FramebufferRenderbufferEXT, cmdlen); 8357(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 8358(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); 8359(void) memcpy((void *)(gc->pc + 12), (void *)(&renderbuffertarget), 4); 8360(void) memcpy((void *)(gc->pc + 16), (void *)(&renderbuffer), 4); 8361gc->pc += cmdlen; 8362if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8363} 8364 8365#define X_GLrop_FramebufferTexture1DEXT 4321 8366void __indirect_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) 8367{ 8368 struct glx_context * const gc = __glXGetCurrentContext(); 8369 const GLuint cmdlen = 24; 8370emit_header(gc->pc, X_GLrop_FramebufferTexture1DEXT, cmdlen); 8371(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 8372(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); 8373(void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4); 8374(void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4); 8375(void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4); 8376gc->pc += cmdlen; 8377if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8378} 8379 8380#define X_GLrop_FramebufferTexture2DEXT 4322 8381void __indirect_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) 8382{ 8383 struct glx_context * const gc = __glXGetCurrentContext(); 8384 const GLuint cmdlen = 24; 8385emit_header(gc->pc, X_GLrop_FramebufferTexture2DEXT, cmdlen); 8386(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 8387(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); 8388(void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4); 8389(void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4); 8390(void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4); 8391gc->pc += cmdlen; 8392if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8393} 8394 8395#define X_GLrop_FramebufferTexture3DEXT 4323 8396void __indirect_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) 8397{ 8398 struct glx_context * const gc = __glXGetCurrentContext(); 8399 const GLuint cmdlen = 28; 8400emit_header(gc->pc, X_GLrop_FramebufferTexture3DEXT, cmdlen); 8401(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 8402(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); 8403(void) memcpy((void *)(gc->pc + 12), (void *)(&textarget), 4); 8404(void) memcpy((void *)(gc->pc + 16), (void *)(&texture), 4); 8405(void) memcpy((void *)(gc->pc + 20), (void *)(&level), 4); 8406(void) memcpy((void *)(gc->pc + 24), (void *)(&zoffset), 4); 8407gc->pc += cmdlen; 8408if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8409} 8410 8411#define X_GLvop_GenFramebuffersEXT 1426 8412void __indirect_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers) 8413{ 8414 struct glx_context * const gc = __glXGetCurrentContext(); 8415 Display * const dpy = gc->currentDpy; 8416 const GLuint cmdlen = 4; 8417 if (n < 0) { 8418 __glXSetError(gc, GL_INVALID_VALUE); 8419 return; 8420 } 8421 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 8422 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenFramebuffersEXT, cmdlen); 8423(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 8424 (void) __glXReadReply(dpy, 4, framebuffers, GL_TRUE); 8425 UnlockDisplay(dpy); SyncHandle(); 8426 } 8427 return; 8428} 8429 8430#define X_GLvop_GenRenderbuffersEXT 1423 8431void __indirect_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers) 8432{ 8433 struct glx_context * const gc = __glXGetCurrentContext(); 8434 Display * const dpy = gc->currentDpy; 8435 const GLuint cmdlen = 4; 8436 if (n < 0) { 8437 __glXSetError(gc, GL_INVALID_VALUE); 8438 return; 8439 } 8440 if (__builtin_expect((n >= 0) && (dpy != NULL), 1)) { 8441 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GenRenderbuffersEXT, cmdlen); 8442(void) memcpy((void *)(pc + 0), (void *)(&n), 4); 8443 (void) __glXReadReply(dpy, 4, renderbuffers, GL_TRUE); 8444 UnlockDisplay(dpy); SyncHandle(); 8445 } 8446 return; 8447} 8448 8449#define X_GLrop_GenerateMipmapEXT 4325 8450void __indirect_glGenerateMipmapEXT(GLenum target) 8451{ 8452 struct glx_context * const gc = __glXGetCurrentContext(); 8453 const GLuint cmdlen = 8; 8454emit_header(gc->pc, X_GLrop_GenerateMipmapEXT, cmdlen); 8455(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 8456gc->pc += cmdlen; 8457if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8458} 8459 8460#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428 8461void __indirect_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params) 8462{ 8463 struct glx_context * const gc = __glXGetCurrentContext(); 8464 Display * const dpy = gc->currentDpy; 8465 const GLuint cmdlen = 12; 8466 if (__builtin_expect(dpy != NULL, 1)) { 8467 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetFramebufferAttachmentParameterivEXT, cmdlen); 8468(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 8469(void) memcpy((void *)(pc + 4), (void *)(&attachment), 4); 8470(void) memcpy((void *)(pc + 8), (void *)(&pname), 4); 8471 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 8472 UnlockDisplay(dpy); SyncHandle(); 8473 } 8474 return; 8475} 8476 8477#define X_GLvop_GetRenderbufferParameterivEXT 1424 8478void __indirect_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params) 8479{ 8480 struct glx_context * const gc = __glXGetCurrentContext(); 8481 Display * const dpy = gc->currentDpy; 8482 const GLuint cmdlen = 8; 8483 if (__builtin_expect(dpy != NULL, 1)) { 8484 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_GetRenderbufferParameterivEXT, cmdlen); 8485(void) memcpy((void *)(pc + 0), (void *)(&target), 4); 8486(void) memcpy((void *)(pc + 4), (void *)(&pname), 4); 8487 (void) __glXReadReply(dpy, 4, params, GL_FALSE); 8488 UnlockDisplay(dpy); SyncHandle(); 8489 } 8490 return; 8491} 8492 8493#define X_GLvop_IsFramebufferEXT 1425 8494GLboolean __indirect_glIsFramebufferEXT(GLuint framebuffer) 8495{ 8496 struct glx_context * const gc = __glXGetCurrentContext(); 8497 Display * const dpy = gc->currentDpy; 8498 GLboolean retval = (GLboolean) 0; 8499 const GLuint cmdlen = 4; 8500 if (__builtin_expect(dpy != NULL, 1)) { 8501 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsFramebufferEXT, cmdlen); 8502(void) memcpy((void *)(pc + 0), (void *)(&framebuffer), 4); 8503 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); 8504 UnlockDisplay(dpy); SyncHandle(); 8505 } 8506 return retval; 8507} 8508 8509#define X_GLvop_IsRenderbufferEXT 1422 8510GLboolean __indirect_glIsRenderbufferEXT(GLuint renderbuffer) 8511{ 8512 struct glx_context * const gc = __glXGetCurrentContext(); 8513 Display * const dpy = gc->currentDpy; 8514 GLboolean retval = (GLboolean) 0; 8515 const GLuint cmdlen = 4; 8516 if (__builtin_expect(dpy != NULL, 1)) { 8517 GLubyte const * pc = __glXSetupVendorRequest(gc, X_GLXVendorPrivateWithReply, X_GLvop_IsRenderbufferEXT, cmdlen); 8518(void) memcpy((void *)(pc + 0), (void *)(&renderbuffer), 4); 8519 retval = (GLboolean) __glXReadReply(dpy, 0, NULL, GL_FALSE); 8520 UnlockDisplay(dpy); SyncHandle(); 8521 } 8522 return retval; 8523} 8524 8525#define X_GLrop_RenderbufferStorageEXT 4318 8526void __indirect_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) 8527{ 8528 struct glx_context * const gc = __glXGetCurrentContext(); 8529 const GLuint cmdlen = 20; 8530emit_header(gc->pc, X_GLrop_RenderbufferStorageEXT, cmdlen); 8531(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 8532(void) memcpy((void *)(gc->pc + 8), (void *)(&internalformat), 4); 8533(void) memcpy((void *)(gc->pc + 12), (void *)(&width), 4); 8534(void) memcpy((void *)(gc->pc + 16), (void *)(&height), 4); 8535gc->pc += cmdlen; 8536if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8537} 8538 8539#define X_GLrop_BlitFramebufferEXT 4330 8540void __indirect_glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) 8541{ 8542 struct glx_context * const gc = __glXGetCurrentContext(); 8543 const GLuint cmdlen = 44; 8544emit_header(gc->pc, X_GLrop_BlitFramebufferEXT, cmdlen); 8545(void) memcpy((void *)(gc->pc + 4), (void *)(&srcX0), 4); 8546(void) memcpy((void *)(gc->pc + 8), (void *)(&srcY0), 4); 8547(void) memcpy((void *)(gc->pc + 12), (void *)(&srcX1), 4); 8548(void) memcpy((void *)(gc->pc + 16), (void *)(&srcY1), 4); 8549(void) memcpy((void *)(gc->pc + 20), (void *)(&dstX0), 4); 8550(void) memcpy((void *)(gc->pc + 24), (void *)(&dstY0), 4); 8551(void) memcpy((void *)(gc->pc + 28), (void *)(&dstX1), 4); 8552(void) memcpy((void *)(gc->pc + 32), (void *)(&dstY1), 4); 8553(void) memcpy((void *)(gc->pc + 36), (void *)(&mask), 4); 8554(void) memcpy((void *)(gc->pc + 40), (void *)(&filter), 4); 8555gc->pc += cmdlen; 8556if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8557} 8558 8559#define X_GLrop_FramebufferTextureLayerEXT 237 8560void __indirect_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) 8561{ 8562 struct glx_context * const gc = __glXGetCurrentContext(); 8563 const GLuint cmdlen = 24; 8564emit_header(gc->pc, X_GLrop_FramebufferTextureLayerEXT, cmdlen); 8565(void) memcpy((void *)(gc->pc + 4), (void *)(&target), 4); 8566(void) memcpy((void *)(gc->pc + 8), (void *)(&attachment), 4); 8567(void) memcpy((void *)(gc->pc + 12), (void *)(&texture), 4); 8568(void) memcpy((void *)(gc->pc + 16), (void *)(&level), 4); 8569(void) memcpy((void *)(gc->pc + 20), (void *)(&layer), 4); 8570gc->pc += cmdlen; 8571if (__builtin_expect(gc->pc > gc->limit, 0)) { (void) __glXFlushRenderBuffer(gc, gc->pc); } 8572} 8573 8574 8575#ifdef GLX_SHARED_GLAPI 8576 8577static const struct proc_pair 8578{ 8579 const char *name; 8580 _glapi_proc proc; 8581} proc_pairs[20] = { 8582 { "AreTexturesResidentEXT", (_glapi_proc) glAreTexturesResidentEXT }, 8583 { "DeleteTexturesEXT", (_glapi_proc) glDeleteTexturesEXT }, 8584 { "GenTexturesEXT", (_glapi_proc) glGenTexturesEXT }, 8585 { "GetColorTableEXT", (_glapi_proc) glGetColorTableEXT }, 8586 { "GetColorTableParameterfvEXT", (_glapi_proc) glGetColorTableParameterfvEXT }, 8587 { "GetColorTableParameterfvSGI", (_glapi_proc) glGetColorTableParameterfvEXT }, 8588 { "GetColorTableParameterivEXT", (_glapi_proc) glGetColorTableParameterivEXT }, 8589 { "GetColorTableParameterivSGI", (_glapi_proc) glGetColorTableParameterivEXT }, 8590 { "GetColorTableSGI", (_glapi_proc) glGetColorTableEXT }, 8591 { "GetConvolutionFilterEXT", (_glapi_proc) gl_dispatch_stub_356 }, 8592 { "GetConvolutionParameterfvEXT", (_glapi_proc) gl_dispatch_stub_357 }, 8593 { "GetConvolutionParameterivEXT", (_glapi_proc) gl_dispatch_stub_358 }, 8594 { "GetHistogramEXT", (_glapi_proc) gl_dispatch_stub_361 }, 8595 { "GetHistogramParameterfvEXT", (_glapi_proc) gl_dispatch_stub_362 }, 8596 { "GetHistogramParameterivEXT", (_glapi_proc) gl_dispatch_stub_363 }, 8597 { "GetMinmaxEXT", (_glapi_proc) gl_dispatch_stub_364 }, 8598 { "GetMinmaxParameterfvEXT", (_glapi_proc) gl_dispatch_stub_365 }, 8599 { "GetMinmaxParameterivEXT", (_glapi_proc) gl_dispatch_stub_366 }, 8600 { "GetSeparableFilterEXT", (_glapi_proc) gl_dispatch_stub_359 }, 8601 { "IsTextureEXT", (_glapi_proc) glIsTextureEXT } 8602}; 8603 8604static int 8605__indirect_get_proc_compare(const void *key, const void *memb) 8606{ 8607 const struct proc_pair *pair = (const struct proc_pair *) memb; 8608 return strcmp((const char *) key, pair->name); 8609} 8610 8611_glapi_proc 8612__indirect_get_proc_address(const char *name) 8613{ 8614 const struct proc_pair *pair; 8615 8616 /* skip "gl" */ 8617 name += 2; 8618 8619 pair = (const struct proc_pair *) bsearch((const void *) name, 8620 (const void *) proc_pairs, ARRAY_SIZE(proc_pairs), sizeof(proc_pairs[0]), 8621 __indirect_get_proc_compare); 8622 8623 return (pair) ? pair->proc : NULL; 8624} 8625 8626#endif /* GLX_SHARED_GLAPI */ 8627 8628 8629# undef FASTCALL 8630# undef NOINLINE 8631