1/* DO NOT EDIT - This file generated automatically by gl_marshal.py script */ 2 3/* 4 * Copyright (C) 2012 Intel Corporation 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 * INTEL CORPORATION, 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 "api_exec.h" 30#include "glthread_marshal.h" 31#include "bufferobj.h" 32#include "dispatch.h" 33 34#define COMPAT (ctx->API != API_OPENGL_CORE) 35 36UNUSED static inline int safe_mul(int a, int b) 37{ 38 if (a < 0 || b < 0) return -1; 39 if (a == 0 || b == 0) return 0; 40 if (a > INT_MAX / b) return -1; 41 return a * b; 42} 43 44/* VertexAttrib1sNV: marshalled asynchronously */ 45struct marshal_cmd_VertexAttrib1sNV 46{ 47 struct marshal_cmd_base cmd_base; 48 GLshort x; 49 GLuint index; 50}; 51uint32_t 52_mesa_unmarshal_VertexAttrib1sNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib1sNV *cmd, const uint64_t *last) 53{ 54 GLuint index = cmd->index; 55 GLshort x = cmd->x; 56 CALL_VertexAttrib1sNV(ctx->CurrentServerDispatch, (index, x)); 57 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib1sNV), 8) / 8); 58 assert (cmd_size == cmd->cmd_base.cmd_size); 59 return cmd_size; 60} 61void GLAPIENTRY 62_mesa_marshal_VertexAttrib1sNV(GLuint index, GLshort x) 63{ 64 GET_CURRENT_CONTEXT(ctx); 65 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib1sNV); 66 struct marshal_cmd_VertexAttrib1sNV *cmd; 67 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib1sNV, cmd_size); 68 cmd->index = index; 69 cmd->x = x; 70} 71 72 73/* VertexAttrib1svNV: marshalled asynchronously */ 74struct marshal_cmd_VertexAttrib1svNV 75{ 76 struct marshal_cmd_base cmd_base; 77 GLuint index; 78 GLshort v[1]; 79}; 80uint32_t 81_mesa_unmarshal_VertexAttrib1svNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib1svNV *cmd, const uint64_t *last) 82{ 83 GLuint index = cmd->index; 84 const GLshort * v = cmd->v; 85 CALL_VertexAttrib1svNV(ctx->CurrentServerDispatch, (index, v)); 86 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib1svNV), 8) / 8); 87 assert (cmd_size == cmd->cmd_base.cmd_size); 88 return cmd_size; 89} 90void GLAPIENTRY 91_mesa_marshal_VertexAttrib1svNV(GLuint index, const GLshort * v) 92{ 93 GET_CURRENT_CONTEXT(ctx); 94 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib1svNV); 95 struct marshal_cmd_VertexAttrib1svNV *cmd; 96 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib1svNV, cmd_size); 97 cmd->index = index; 98 memcpy(cmd->v, v, 1 * sizeof(GLshort)); 99} 100 101 102/* VertexAttrib2sNV: marshalled asynchronously */ 103struct marshal_cmd_VertexAttrib2sNV 104{ 105 struct marshal_cmd_base cmd_base; 106 GLshort x; 107 GLshort y; 108 GLuint index; 109}; 110uint32_t 111_mesa_unmarshal_VertexAttrib2sNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib2sNV *cmd, const uint64_t *last) 112{ 113 GLuint index = cmd->index; 114 GLshort x = cmd->x; 115 GLshort y = cmd->y; 116 CALL_VertexAttrib2sNV(ctx->CurrentServerDispatch, (index, x, y)); 117 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib2sNV), 8) / 8); 118 assert (cmd_size == cmd->cmd_base.cmd_size); 119 return cmd_size; 120} 121void GLAPIENTRY 122_mesa_marshal_VertexAttrib2sNV(GLuint index, GLshort x, GLshort y) 123{ 124 GET_CURRENT_CONTEXT(ctx); 125 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib2sNV); 126 struct marshal_cmd_VertexAttrib2sNV *cmd; 127 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib2sNV, cmd_size); 128 cmd->index = index; 129 cmd->x = x; 130 cmd->y = y; 131} 132 133 134/* VertexAttrib2svNV: marshalled asynchronously */ 135struct marshal_cmd_VertexAttrib2svNV 136{ 137 struct marshal_cmd_base cmd_base; 138 GLuint index; 139 GLshort v[2]; 140}; 141uint32_t 142_mesa_unmarshal_VertexAttrib2svNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib2svNV *cmd, const uint64_t *last) 143{ 144 GLuint index = cmd->index; 145 const GLshort * v = cmd->v; 146 CALL_VertexAttrib2svNV(ctx->CurrentServerDispatch, (index, v)); 147 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib2svNV), 8) / 8); 148 assert (cmd_size == cmd->cmd_base.cmd_size); 149 return cmd_size; 150} 151void GLAPIENTRY 152_mesa_marshal_VertexAttrib2svNV(GLuint index, const GLshort * v) 153{ 154 GET_CURRENT_CONTEXT(ctx); 155 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib2svNV); 156 struct marshal_cmd_VertexAttrib2svNV *cmd; 157 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib2svNV, cmd_size); 158 cmd->index = index; 159 memcpy(cmd->v, v, 2 * sizeof(GLshort)); 160} 161 162 163/* VertexAttrib3sNV: marshalled asynchronously */ 164struct marshal_cmd_VertexAttrib3sNV 165{ 166 struct marshal_cmd_base cmd_base; 167 GLshort x; 168 GLshort y; 169 GLshort z; 170 GLuint index; 171}; 172uint32_t 173_mesa_unmarshal_VertexAttrib3sNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib3sNV *cmd, const uint64_t *last) 174{ 175 GLuint index = cmd->index; 176 GLshort x = cmd->x; 177 GLshort y = cmd->y; 178 GLshort z = cmd->z; 179 CALL_VertexAttrib3sNV(ctx->CurrentServerDispatch, (index, x, y, z)); 180 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib3sNV), 8) / 8); 181 assert (cmd_size == cmd->cmd_base.cmd_size); 182 return cmd_size; 183} 184void GLAPIENTRY 185_mesa_marshal_VertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z) 186{ 187 GET_CURRENT_CONTEXT(ctx); 188 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib3sNV); 189 struct marshal_cmd_VertexAttrib3sNV *cmd; 190 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib3sNV, cmd_size); 191 cmd->index = index; 192 cmd->x = x; 193 cmd->y = y; 194 cmd->z = z; 195} 196 197 198/* VertexAttrib3svNV: marshalled asynchronously */ 199struct marshal_cmd_VertexAttrib3svNV 200{ 201 struct marshal_cmd_base cmd_base; 202 GLuint index; 203 GLshort v[3]; 204}; 205uint32_t 206_mesa_unmarshal_VertexAttrib3svNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib3svNV *cmd, const uint64_t *last) 207{ 208 GLuint index = cmd->index; 209 const GLshort * v = cmd->v; 210 CALL_VertexAttrib3svNV(ctx->CurrentServerDispatch, (index, v)); 211 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib3svNV), 8) / 8); 212 assert (cmd_size == cmd->cmd_base.cmd_size); 213 return cmd_size; 214} 215void GLAPIENTRY 216_mesa_marshal_VertexAttrib3svNV(GLuint index, const GLshort * v) 217{ 218 GET_CURRENT_CONTEXT(ctx); 219 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib3svNV); 220 struct marshal_cmd_VertexAttrib3svNV *cmd; 221 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib3svNV, cmd_size); 222 cmd->index = index; 223 memcpy(cmd->v, v, 3 * sizeof(GLshort)); 224} 225 226 227/* VertexAttrib4sNV: marshalled asynchronously */ 228struct marshal_cmd_VertexAttrib4sNV 229{ 230 struct marshal_cmd_base cmd_base; 231 GLshort x; 232 GLshort y; 233 GLshort z; 234 GLshort w; 235 GLuint index; 236}; 237uint32_t 238_mesa_unmarshal_VertexAttrib4sNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib4sNV *cmd, const uint64_t *last) 239{ 240 GLuint index = cmd->index; 241 GLshort x = cmd->x; 242 GLshort y = cmd->y; 243 GLshort z = cmd->z; 244 GLshort w = cmd->w; 245 CALL_VertexAttrib4sNV(ctx->CurrentServerDispatch, (index, x, y, z, w)); 246 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib4sNV), 8) / 8); 247 assert (cmd_size == cmd->cmd_base.cmd_size); 248 return cmd_size; 249} 250void GLAPIENTRY 251_mesa_marshal_VertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) 252{ 253 GET_CURRENT_CONTEXT(ctx); 254 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib4sNV); 255 struct marshal_cmd_VertexAttrib4sNV *cmd; 256 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib4sNV, cmd_size); 257 cmd->index = index; 258 cmd->x = x; 259 cmd->y = y; 260 cmd->z = z; 261 cmd->w = w; 262} 263 264 265/* VertexAttrib4svNV: marshalled asynchronously */ 266struct marshal_cmd_VertexAttrib4svNV 267{ 268 struct marshal_cmd_base cmd_base; 269 GLuint index; 270 GLshort v[4]; 271}; 272uint32_t 273_mesa_unmarshal_VertexAttrib4svNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib4svNV *cmd, const uint64_t *last) 274{ 275 GLuint index = cmd->index; 276 const GLshort * v = cmd->v; 277 CALL_VertexAttrib4svNV(ctx->CurrentServerDispatch, (index, v)); 278 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib4svNV), 8) / 8); 279 assert (cmd_size == cmd->cmd_base.cmd_size); 280 return cmd_size; 281} 282void GLAPIENTRY 283_mesa_marshal_VertexAttrib4svNV(GLuint index, const GLshort * v) 284{ 285 GET_CURRENT_CONTEXT(ctx); 286 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib4svNV); 287 struct marshal_cmd_VertexAttrib4svNV *cmd; 288 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib4svNV, cmd_size); 289 cmd->index = index; 290 memcpy(cmd->v, v, 4 * sizeof(GLshort)); 291} 292 293 294/* VertexAttrib1fNV: marshalled asynchronously */ 295struct marshal_cmd_VertexAttrib1fNV 296{ 297 struct marshal_cmd_base cmd_base; 298 GLuint index; 299 GLfloat x; 300}; 301uint32_t 302_mesa_unmarshal_VertexAttrib1fNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib1fNV *cmd, const uint64_t *last) 303{ 304 GLuint index = cmd->index; 305 GLfloat x = cmd->x; 306 CALL_VertexAttrib1fNV(ctx->CurrentServerDispatch, (index, x)); 307 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib1fNV), 8) / 8); 308 assert (cmd_size == cmd->cmd_base.cmd_size); 309 return cmd_size; 310} 311void GLAPIENTRY 312_mesa_marshal_VertexAttrib1fNV(GLuint index, GLfloat x) 313{ 314 GET_CURRENT_CONTEXT(ctx); 315 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib1fNV); 316 struct marshal_cmd_VertexAttrib1fNV *cmd; 317 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib1fNV, cmd_size); 318 cmd->index = index; 319 cmd->x = x; 320} 321 322 323/* VertexAttrib1fvNV: marshalled asynchronously */ 324struct marshal_cmd_VertexAttrib1fvNV 325{ 326 struct marshal_cmd_base cmd_base; 327 GLuint index; 328 GLfloat v[1]; 329}; 330uint32_t 331_mesa_unmarshal_VertexAttrib1fvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib1fvNV *cmd, const uint64_t *last) 332{ 333 GLuint index = cmd->index; 334 const GLfloat * v = cmd->v; 335 CALL_VertexAttrib1fvNV(ctx->CurrentServerDispatch, (index, v)); 336 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib1fvNV), 8) / 8); 337 assert (cmd_size == cmd->cmd_base.cmd_size); 338 return cmd_size; 339} 340void GLAPIENTRY 341_mesa_marshal_VertexAttrib1fvNV(GLuint index, const GLfloat * v) 342{ 343 GET_CURRENT_CONTEXT(ctx); 344 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib1fvNV); 345 struct marshal_cmd_VertexAttrib1fvNV *cmd; 346 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib1fvNV, cmd_size); 347 cmd->index = index; 348 memcpy(cmd->v, v, 1 * sizeof(GLfloat)); 349} 350 351 352/* VertexAttrib2fNV: marshalled asynchronously */ 353struct marshal_cmd_VertexAttrib2fNV 354{ 355 struct marshal_cmd_base cmd_base; 356 GLuint index; 357 GLfloat x; 358 GLfloat y; 359}; 360uint32_t 361_mesa_unmarshal_VertexAttrib2fNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib2fNV *cmd, const uint64_t *last) 362{ 363 GLuint index = cmd->index; 364 GLfloat x = cmd->x; 365 GLfloat y = cmd->y; 366 CALL_VertexAttrib2fNV(ctx->CurrentServerDispatch, (index, x, y)); 367 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib2fNV), 8) / 8); 368 assert (cmd_size == cmd->cmd_base.cmd_size); 369 return cmd_size; 370} 371void GLAPIENTRY 372_mesa_marshal_VertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y) 373{ 374 GET_CURRENT_CONTEXT(ctx); 375 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib2fNV); 376 struct marshal_cmd_VertexAttrib2fNV *cmd; 377 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib2fNV, cmd_size); 378 cmd->index = index; 379 cmd->x = x; 380 cmd->y = y; 381} 382 383 384/* VertexAttrib2fvNV: marshalled asynchronously */ 385struct marshal_cmd_VertexAttrib2fvNV 386{ 387 struct marshal_cmd_base cmd_base; 388 GLuint index; 389 GLfloat v[2]; 390}; 391uint32_t 392_mesa_unmarshal_VertexAttrib2fvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib2fvNV *cmd, const uint64_t *last) 393{ 394 GLuint index = cmd->index; 395 const GLfloat * v = cmd->v; 396 CALL_VertexAttrib2fvNV(ctx->CurrentServerDispatch, (index, v)); 397 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib2fvNV), 8) / 8); 398 assert (cmd_size == cmd->cmd_base.cmd_size); 399 return cmd_size; 400} 401void GLAPIENTRY 402_mesa_marshal_VertexAttrib2fvNV(GLuint index, const GLfloat * v) 403{ 404 GET_CURRENT_CONTEXT(ctx); 405 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib2fvNV); 406 struct marshal_cmd_VertexAttrib2fvNV *cmd; 407 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib2fvNV, cmd_size); 408 cmd->index = index; 409 memcpy(cmd->v, v, 2 * sizeof(GLfloat)); 410} 411 412 413/* VertexAttrib3fNV: marshalled asynchronously */ 414struct marshal_cmd_VertexAttrib3fNV 415{ 416 struct marshal_cmd_base cmd_base; 417 GLuint index; 418 GLfloat x; 419 GLfloat y; 420 GLfloat z; 421}; 422uint32_t 423_mesa_unmarshal_VertexAttrib3fNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib3fNV *cmd, const uint64_t *last) 424{ 425 GLuint index = cmd->index; 426 GLfloat x = cmd->x; 427 GLfloat y = cmd->y; 428 GLfloat z = cmd->z; 429 CALL_VertexAttrib3fNV(ctx->CurrentServerDispatch, (index, x, y, z)); 430 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib3fNV), 8) / 8); 431 assert (cmd_size == cmd->cmd_base.cmd_size); 432 return cmd_size; 433} 434void GLAPIENTRY 435_mesa_marshal_VertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z) 436{ 437 GET_CURRENT_CONTEXT(ctx); 438 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib3fNV); 439 struct marshal_cmd_VertexAttrib3fNV *cmd; 440 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib3fNV, cmd_size); 441 cmd->index = index; 442 cmd->x = x; 443 cmd->y = y; 444 cmd->z = z; 445} 446 447 448/* VertexAttrib3fvNV: marshalled asynchronously */ 449struct marshal_cmd_VertexAttrib3fvNV 450{ 451 struct marshal_cmd_base cmd_base; 452 GLuint index; 453 GLfloat v[3]; 454}; 455uint32_t 456_mesa_unmarshal_VertexAttrib3fvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib3fvNV *cmd, const uint64_t *last) 457{ 458 GLuint index = cmd->index; 459 const GLfloat * v = cmd->v; 460 CALL_VertexAttrib3fvNV(ctx->CurrentServerDispatch, (index, v)); 461 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib3fvNV), 8) / 8); 462 assert (cmd_size == cmd->cmd_base.cmd_size); 463 return cmd_size; 464} 465void GLAPIENTRY 466_mesa_marshal_VertexAttrib3fvNV(GLuint index, const GLfloat * v) 467{ 468 GET_CURRENT_CONTEXT(ctx); 469 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib3fvNV); 470 struct marshal_cmd_VertexAttrib3fvNV *cmd; 471 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib3fvNV, cmd_size); 472 cmd->index = index; 473 memcpy(cmd->v, v, 3 * sizeof(GLfloat)); 474} 475 476 477/* VertexAttrib4fNV: marshalled asynchronously */ 478struct marshal_cmd_VertexAttrib4fNV 479{ 480 struct marshal_cmd_base cmd_base; 481 GLuint index; 482 GLfloat x; 483 GLfloat y; 484 GLfloat z; 485 GLfloat w; 486}; 487uint32_t 488_mesa_unmarshal_VertexAttrib4fNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib4fNV *cmd, const uint64_t *last) 489{ 490 GLuint index = cmd->index; 491 GLfloat x = cmd->x; 492 GLfloat y = cmd->y; 493 GLfloat z = cmd->z; 494 GLfloat w = cmd->w; 495 CALL_VertexAttrib4fNV(ctx->CurrentServerDispatch, (index, x, y, z, w)); 496 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib4fNV), 8) / 8); 497 assert (cmd_size == cmd->cmd_base.cmd_size); 498 return cmd_size; 499} 500void GLAPIENTRY 501_mesa_marshal_VertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) 502{ 503 GET_CURRENT_CONTEXT(ctx); 504 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib4fNV); 505 struct marshal_cmd_VertexAttrib4fNV *cmd; 506 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib4fNV, cmd_size); 507 cmd->index = index; 508 cmd->x = x; 509 cmd->y = y; 510 cmd->z = z; 511 cmd->w = w; 512} 513 514 515/* VertexAttrib4fvNV: marshalled asynchronously */ 516struct marshal_cmd_VertexAttrib4fvNV 517{ 518 struct marshal_cmd_base cmd_base; 519 GLuint index; 520 GLfloat v[4]; 521}; 522uint32_t 523_mesa_unmarshal_VertexAttrib4fvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib4fvNV *cmd, const uint64_t *last) 524{ 525 GLuint index = cmd->index; 526 const GLfloat * v = cmd->v; 527 CALL_VertexAttrib4fvNV(ctx->CurrentServerDispatch, (index, v)); 528 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib4fvNV), 8) / 8); 529 assert (cmd_size == cmd->cmd_base.cmd_size); 530 return cmd_size; 531} 532void GLAPIENTRY 533_mesa_marshal_VertexAttrib4fvNV(GLuint index, const GLfloat * v) 534{ 535 GET_CURRENT_CONTEXT(ctx); 536 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib4fvNV); 537 struct marshal_cmd_VertexAttrib4fvNV *cmd; 538 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib4fvNV, cmd_size); 539 cmd->index = index; 540 memcpy(cmd->v, v, 4 * sizeof(GLfloat)); 541} 542 543 544/* VertexAttrib1dNV: marshalled asynchronously */ 545struct marshal_cmd_VertexAttrib1dNV 546{ 547 struct marshal_cmd_base cmd_base; 548 GLuint index; 549 GLdouble x; 550}; 551uint32_t 552_mesa_unmarshal_VertexAttrib1dNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib1dNV *cmd, const uint64_t *last) 553{ 554 GLuint index = cmd->index; 555 GLdouble x = cmd->x; 556 CALL_VertexAttrib1dNV(ctx->CurrentServerDispatch, (index, x)); 557 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib1dNV), 8) / 8); 558 assert (cmd_size == cmd->cmd_base.cmd_size); 559 return cmd_size; 560} 561void GLAPIENTRY 562_mesa_marshal_VertexAttrib1dNV(GLuint index, GLdouble x) 563{ 564 GET_CURRENT_CONTEXT(ctx); 565 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib1dNV); 566 struct marshal_cmd_VertexAttrib1dNV *cmd; 567 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib1dNV, cmd_size); 568 cmd->index = index; 569 cmd->x = x; 570} 571 572 573/* VertexAttrib1dvNV: marshalled asynchronously */ 574struct marshal_cmd_VertexAttrib1dvNV 575{ 576 struct marshal_cmd_base cmd_base; 577 GLuint index; 578 GLdouble v[1]; 579}; 580uint32_t 581_mesa_unmarshal_VertexAttrib1dvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib1dvNV *cmd, const uint64_t *last) 582{ 583 GLuint index = cmd->index; 584 const GLdouble * v = cmd->v; 585 CALL_VertexAttrib1dvNV(ctx->CurrentServerDispatch, (index, v)); 586 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib1dvNV), 8) / 8); 587 assert (cmd_size == cmd->cmd_base.cmd_size); 588 return cmd_size; 589} 590void GLAPIENTRY 591_mesa_marshal_VertexAttrib1dvNV(GLuint index, const GLdouble * v) 592{ 593 GET_CURRENT_CONTEXT(ctx); 594 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib1dvNV); 595 struct marshal_cmd_VertexAttrib1dvNV *cmd; 596 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib1dvNV, cmd_size); 597 cmd->index = index; 598 memcpy(cmd->v, v, 1 * sizeof(GLdouble)); 599} 600 601 602/* VertexAttrib2dNV: marshalled asynchronously */ 603struct marshal_cmd_VertexAttrib2dNV 604{ 605 struct marshal_cmd_base cmd_base; 606 GLuint index; 607 GLdouble x; 608 GLdouble y; 609}; 610uint32_t 611_mesa_unmarshal_VertexAttrib2dNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib2dNV *cmd, const uint64_t *last) 612{ 613 GLuint index = cmd->index; 614 GLdouble x = cmd->x; 615 GLdouble y = cmd->y; 616 CALL_VertexAttrib2dNV(ctx->CurrentServerDispatch, (index, x, y)); 617 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib2dNV), 8) / 8); 618 assert (cmd_size == cmd->cmd_base.cmd_size); 619 return cmd_size; 620} 621void GLAPIENTRY 622_mesa_marshal_VertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y) 623{ 624 GET_CURRENT_CONTEXT(ctx); 625 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib2dNV); 626 struct marshal_cmd_VertexAttrib2dNV *cmd; 627 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib2dNV, cmd_size); 628 cmd->index = index; 629 cmd->x = x; 630 cmd->y = y; 631} 632 633 634/* VertexAttrib2dvNV: marshalled asynchronously */ 635struct marshal_cmd_VertexAttrib2dvNV 636{ 637 struct marshal_cmd_base cmd_base; 638 GLuint index; 639 GLdouble v[2]; 640}; 641uint32_t 642_mesa_unmarshal_VertexAttrib2dvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib2dvNV *cmd, const uint64_t *last) 643{ 644 GLuint index = cmd->index; 645 const GLdouble * v = cmd->v; 646 CALL_VertexAttrib2dvNV(ctx->CurrentServerDispatch, (index, v)); 647 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib2dvNV), 8) / 8); 648 assert (cmd_size == cmd->cmd_base.cmd_size); 649 return cmd_size; 650} 651void GLAPIENTRY 652_mesa_marshal_VertexAttrib2dvNV(GLuint index, const GLdouble * v) 653{ 654 GET_CURRENT_CONTEXT(ctx); 655 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib2dvNV); 656 struct marshal_cmd_VertexAttrib2dvNV *cmd; 657 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib2dvNV, cmd_size); 658 cmd->index = index; 659 memcpy(cmd->v, v, 2 * sizeof(GLdouble)); 660} 661 662 663/* VertexAttrib3dNV: marshalled asynchronously */ 664struct marshal_cmd_VertexAttrib3dNV 665{ 666 struct marshal_cmd_base cmd_base; 667 GLuint index; 668 GLdouble x; 669 GLdouble y; 670 GLdouble z; 671}; 672uint32_t 673_mesa_unmarshal_VertexAttrib3dNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib3dNV *cmd, const uint64_t *last) 674{ 675 GLuint index = cmd->index; 676 GLdouble x = cmd->x; 677 GLdouble y = cmd->y; 678 GLdouble z = cmd->z; 679 CALL_VertexAttrib3dNV(ctx->CurrentServerDispatch, (index, x, y, z)); 680 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib3dNV), 8) / 8); 681 assert (cmd_size == cmd->cmd_base.cmd_size); 682 return cmd_size; 683} 684void GLAPIENTRY 685_mesa_marshal_VertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z) 686{ 687 GET_CURRENT_CONTEXT(ctx); 688 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib3dNV); 689 struct marshal_cmd_VertexAttrib3dNV *cmd; 690 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib3dNV, cmd_size); 691 cmd->index = index; 692 cmd->x = x; 693 cmd->y = y; 694 cmd->z = z; 695} 696 697 698/* VertexAttrib3dvNV: marshalled asynchronously */ 699struct marshal_cmd_VertexAttrib3dvNV 700{ 701 struct marshal_cmd_base cmd_base; 702 GLuint index; 703 GLdouble v[3]; 704}; 705uint32_t 706_mesa_unmarshal_VertexAttrib3dvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib3dvNV *cmd, const uint64_t *last) 707{ 708 GLuint index = cmd->index; 709 const GLdouble * v = cmd->v; 710 CALL_VertexAttrib3dvNV(ctx->CurrentServerDispatch, (index, v)); 711 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib3dvNV), 8) / 8); 712 assert (cmd_size == cmd->cmd_base.cmd_size); 713 return cmd_size; 714} 715void GLAPIENTRY 716_mesa_marshal_VertexAttrib3dvNV(GLuint index, const GLdouble * v) 717{ 718 GET_CURRENT_CONTEXT(ctx); 719 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib3dvNV); 720 struct marshal_cmd_VertexAttrib3dvNV *cmd; 721 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib3dvNV, cmd_size); 722 cmd->index = index; 723 memcpy(cmd->v, v, 3 * sizeof(GLdouble)); 724} 725 726 727/* VertexAttrib4dNV: marshalled asynchronously */ 728struct marshal_cmd_VertexAttrib4dNV 729{ 730 struct marshal_cmd_base cmd_base; 731 GLuint index; 732 GLdouble x; 733 GLdouble y; 734 GLdouble z; 735 GLdouble w; 736}; 737uint32_t 738_mesa_unmarshal_VertexAttrib4dNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib4dNV *cmd, const uint64_t *last) 739{ 740 GLuint index = cmd->index; 741 GLdouble x = cmd->x; 742 GLdouble y = cmd->y; 743 GLdouble z = cmd->z; 744 GLdouble w = cmd->w; 745 CALL_VertexAttrib4dNV(ctx->CurrentServerDispatch, (index, x, y, z, w)); 746 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib4dNV), 8) / 8); 747 assert (cmd_size == cmd->cmd_base.cmd_size); 748 return cmd_size; 749} 750void GLAPIENTRY 751_mesa_marshal_VertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) 752{ 753 GET_CURRENT_CONTEXT(ctx); 754 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib4dNV); 755 struct marshal_cmd_VertexAttrib4dNV *cmd; 756 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib4dNV, cmd_size); 757 cmd->index = index; 758 cmd->x = x; 759 cmd->y = y; 760 cmd->z = z; 761 cmd->w = w; 762} 763 764 765/* VertexAttrib4dvNV: marshalled asynchronously */ 766struct marshal_cmd_VertexAttrib4dvNV 767{ 768 struct marshal_cmd_base cmd_base; 769 GLuint index; 770 GLdouble v[4]; 771}; 772uint32_t 773_mesa_unmarshal_VertexAttrib4dvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib4dvNV *cmd, const uint64_t *last) 774{ 775 GLuint index = cmd->index; 776 const GLdouble * v = cmd->v; 777 CALL_VertexAttrib4dvNV(ctx->CurrentServerDispatch, (index, v)); 778 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib4dvNV), 8) / 8); 779 assert (cmd_size == cmd->cmd_base.cmd_size); 780 return cmd_size; 781} 782void GLAPIENTRY 783_mesa_marshal_VertexAttrib4dvNV(GLuint index, const GLdouble * v) 784{ 785 GET_CURRENT_CONTEXT(ctx); 786 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib4dvNV); 787 struct marshal_cmd_VertexAttrib4dvNV *cmd; 788 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib4dvNV, cmd_size); 789 cmd->index = index; 790 memcpy(cmd->v, v, 4 * sizeof(GLdouble)); 791} 792 793 794/* VertexAttrib4ubNV: marshalled asynchronously */ 795struct marshal_cmd_VertexAttrib4ubNV 796{ 797 struct marshal_cmd_base cmd_base; 798 GLubyte x; 799 GLubyte y; 800 GLubyte z; 801 GLubyte w; 802 GLuint index; 803}; 804uint32_t 805_mesa_unmarshal_VertexAttrib4ubNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib4ubNV *cmd, const uint64_t *last) 806{ 807 GLuint index = cmd->index; 808 GLubyte x = cmd->x; 809 GLubyte y = cmd->y; 810 GLubyte z = cmd->z; 811 GLubyte w = cmd->w; 812 CALL_VertexAttrib4ubNV(ctx->CurrentServerDispatch, (index, x, y, z, w)); 813 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib4ubNV), 8) / 8); 814 assert (cmd_size == cmd->cmd_base.cmd_size); 815 return cmd_size; 816} 817void GLAPIENTRY 818_mesa_marshal_VertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) 819{ 820 GET_CURRENT_CONTEXT(ctx); 821 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib4ubNV); 822 struct marshal_cmd_VertexAttrib4ubNV *cmd; 823 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib4ubNV, cmd_size); 824 cmd->index = index; 825 cmd->x = x; 826 cmd->y = y; 827 cmd->z = z; 828 cmd->w = w; 829} 830 831 832/* VertexAttrib4ubvNV: marshalled asynchronously */ 833struct marshal_cmd_VertexAttrib4ubvNV 834{ 835 struct marshal_cmd_base cmd_base; 836 GLuint index; 837 GLubyte v[4]; 838}; 839uint32_t 840_mesa_unmarshal_VertexAttrib4ubvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttrib4ubvNV *cmd, const uint64_t *last) 841{ 842 GLuint index = cmd->index; 843 const GLubyte * v = cmd->v; 844 CALL_VertexAttrib4ubvNV(ctx->CurrentServerDispatch, (index, v)); 845 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexAttrib4ubvNV), 8) / 8); 846 assert (cmd_size == cmd->cmd_base.cmd_size); 847 return cmd_size; 848} 849void GLAPIENTRY 850_mesa_marshal_VertexAttrib4ubvNV(GLuint index, const GLubyte * v) 851{ 852 GET_CURRENT_CONTEXT(ctx); 853 int cmd_size = sizeof(struct marshal_cmd_VertexAttrib4ubvNV); 854 struct marshal_cmd_VertexAttrib4ubvNV *cmd; 855 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttrib4ubvNV, cmd_size); 856 cmd->index = index; 857 memcpy(cmd->v, v, 4 * sizeof(GLubyte)); 858} 859 860 861/* VertexAttribs1svNV: marshalled asynchronously */ 862struct marshal_cmd_VertexAttribs1svNV 863{ 864 struct marshal_cmd_base cmd_base; 865 GLuint index; 866 GLsizei n; 867 /* Next safe_mul(n, 1 * sizeof(GLshort)) bytes are GLshort v[n] */ 868}; 869uint32_t 870_mesa_unmarshal_VertexAttribs1svNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs1svNV *cmd, const uint64_t *last) 871{ 872 GLuint index = cmd->index; 873 GLsizei n = cmd->n; 874 GLshort * v; 875 const char *variable_data = (const char *) (cmd + 1); 876 v = (GLshort *) variable_data; 877 CALL_VertexAttribs1svNV(ctx->CurrentServerDispatch, (index, n, v)); 878 return cmd->cmd_base.cmd_size; 879} 880void GLAPIENTRY 881_mesa_marshal_VertexAttribs1svNV(GLuint index, GLsizei n, const GLshort * v) 882{ 883 GET_CURRENT_CONTEXT(ctx); 884 int v_size = safe_mul(n, 1 * sizeof(GLshort)); 885 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs1svNV) + v_size; 886 struct marshal_cmd_VertexAttribs1svNV *cmd; 887 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 888 _mesa_glthread_finish_before(ctx, "VertexAttribs1svNV"); 889 CALL_VertexAttribs1svNV(ctx->CurrentServerDispatch, (index, n, v)); 890 return; 891 } 892 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs1svNV, cmd_size); 893 cmd->index = index; 894 cmd->n = n; 895 char *variable_data = (char *) (cmd + 1); 896 memcpy(variable_data, v, v_size); 897} 898 899 900/* VertexAttribs2svNV: marshalled asynchronously */ 901struct marshal_cmd_VertexAttribs2svNV 902{ 903 struct marshal_cmd_base cmd_base; 904 GLuint index; 905 GLsizei n; 906 /* Next safe_mul(n, 2 * sizeof(GLshort)) bytes are GLshort v[n][2] */ 907}; 908uint32_t 909_mesa_unmarshal_VertexAttribs2svNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs2svNV *cmd, const uint64_t *last) 910{ 911 GLuint index = cmd->index; 912 GLsizei n = cmd->n; 913 GLshort * v; 914 const char *variable_data = (const char *) (cmd + 1); 915 v = (GLshort *) variable_data; 916 CALL_VertexAttribs2svNV(ctx->CurrentServerDispatch, (index, n, v)); 917 return cmd->cmd_base.cmd_size; 918} 919void GLAPIENTRY 920_mesa_marshal_VertexAttribs2svNV(GLuint index, GLsizei n, const GLshort * v) 921{ 922 GET_CURRENT_CONTEXT(ctx); 923 int v_size = safe_mul(n, 2 * sizeof(GLshort)); 924 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs2svNV) + v_size; 925 struct marshal_cmd_VertexAttribs2svNV *cmd; 926 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 927 _mesa_glthread_finish_before(ctx, "VertexAttribs2svNV"); 928 CALL_VertexAttribs2svNV(ctx->CurrentServerDispatch, (index, n, v)); 929 return; 930 } 931 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs2svNV, cmd_size); 932 cmd->index = index; 933 cmd->n = n; 934 char *variable_data = (char *) (cmd + 1); 935 memcpy(variable_data, v, v_size); 936} 937 938 939/* VertexAttribs3svNV: marshalled asynchronously */ 940struct marshal_cmd_VertexAttribs3svNV 941{ 942 struct marshal_cmd_base cmd_base; 943 GLuint index; 944 GLsizei n; 945 /* Next safe_mul(n, 3 * sizeof(GLshort)) bytes are GLshort v[n][3] */ 946}; 947uint32_t 948_mesa_unmarshal_VertexAttribs3svNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs3svNV *cmd, const uint64_t *last) 949{ 950 GLuint index = cmd->index; 951 GLsizei n = cmd->n; 952 GLshort * v; 953 const char *variable_data = (const char *) (cmd + 1); 954 v = (GLshort *) variable_data; 955 CALL_VertexAttribs3svNV(ctx->CurrentServerDispatch, (index, n, v)); 956 return cmd->cmd_base.cmd_size; 957} 958void GLAPIENTRY 959_mesa_marshal_VertexAttribs3svNV(GLuint index, GLsizei n, const GLshort * v) 960{ 961 GET_CURRENT_CONTEXT(ctx); 962 int v_size = safe_mul(n, 3 * sizeof(GLshort)); 963 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs3svNV) + v_size; 964 struct marshal_cmd_VertexAttribs3svNV *cmd; 965 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 966 _mesa_glthread_finish_before(ctx, "VertexAttribs3svNV"); 967 CALL_VertexAttribs3svNV(ctx->CurrentServerDispatch, (index, n, v)); 968 return; 969 } 970 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs3svNV, cmd_size); 971 cmd->index = index; 972 cmd->n = n; 973 char *variable_data = (char *) (cmd + 1); 974 memcpy(variable_data, v, v_size); 975} 976 977 978/* VertexAttribs4svNV: marshalled asynchronously */ 979struct marshal_cmd_VertexAttribs4svNV 980{ 981 struct marshal_cmd_base cmd_base; 982 GLuint index; 983 GLsizei n; 984 /* Next safe_mul(n, 4 * sizeof(GLshort)) bytes are GLshort v[n][4] */ 985}; 986uint32_t 987_mesa_unmarshal_VertexAttribs4svNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs4svNV *cmd, const uint64_t *last) 988{ 989 GLuint index = cmd->index; 990 GLsizei n = cmd->n; 991 GLshort * v; 992 const char *variable_data = (const char *) (cmd + 1); 993 v = (GLshort *) variable_data; 994 CALL_VertexAttribs4svNV(ctx->CurrentServerDispatch, (index, n, v)); 995 return cmd->cmd_base.cmd_size; 996} 997void GLAPIENTRY 998_mesa_marshal_VertexAttribs4svNV(GLuint index, GLsizei n, const GLshort * v) 999{ 1000 GET_CURRENT_CONTEXT(ctx); 1001 int v_size = safe_mul(n, 4 * sizeof(GLshort)); 1002 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs4svNV) + v_size; 1003 struct marshal_cmd_VertexAttribs4svNV *cmd; 1004 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1005 _mesa_glthread_finish_before(ctx, "VertexAttribs4svNV"); 1006 CALL_VertexAttribs4svNV(ctx->CurrentServerDispatch, (index, n, v)); 1007 return; 1008 } 1009 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs4svNV, cmd_size); 1010 cmd->index = index; 1011 cmd->n = n; 1012 char *variable_data = (char *) (cmd + 1); 1013 memcpy(variable_data, v, v_size); 1014} 1015 1016 1017/* VertexAttribs1fvNV: marshalled asynchronously */ 1018struct marshal_cmd_VertexAttribs1fvNV 1019{ 1020 struct marshal_cmd_base cmd_base; 1021 GLuint index; 1022 GLsizei n; 1023 /* Next safe_mul(n, 1 * sizeof(GLfloat)) bytes are GLfloat v[n] */ 1024}; 1025uint32_t 1026_mesa_unmarshal_VertexAttribs1fvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs1fvNV *cmd, const uint64_t *last) 1027{ 1028 GLuint index = cmd->index; 1029 GLsizei n = cmd->n; 1030 GLfloat * v; 1031 const char *variable_data = (const char *) (cmd + 1); 1032 v = (GLfloat *) variable_data; 1033 CALL_VertexAttribs1fvNV(ctx->CurrentServerDispatch, (index, n, v)); 1034 return cmd->cmd_base.cmd_size; 1035} 1036void GLAPIENTRY 1037_mesa_marshal_VertexAttribs1fvNV(GLuint index, GLsizei n, const GLfloat * v) 1038{ 1039 GET_CURRENT_CONTEXT(ctx); 1040 int v_size = safe_mul(n, 1 * sizeof(GLfloat)); 1041 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs1fvNV) + v_size; 1042 struct marshal_cmd_VertexAttribs1fvNV *cmd; 1043 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1044 _mesa_glthread_finish_before(ctx, "VertexAttribs1fvNV"); 1045 CALL_VertexAttribs1fvNV(ctx->CurrentServerDispatch, (index, n, v)); 1046 return; 1047 } 1048 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs1fvNV, cmd_size); 1049 cmd->index = index; 1050 cmd->n = n; 1051 char *variable_data = (char *) (cmd + 1); 1052 memcpy(variable_data, v, v_size); 1053} 1054 1055 1056/* VertexAttribs2fvNV: marshalled asynchronously */ 1057struct marshal_cmd_VertexAttribs2fvNV 1058{ 1059 struct marshal_cmd_base cmd_base; 1060 GLuint index; 1061 GLsizei n; 1062 /* Next safe_mul(n, 2 * sizeof(GLfloat)) bytes are GLfloat v[n][2] */ 1063}; 1064uint32_t 1065_mesa_unmarshal_VertexAttribs2fvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs2fvNV *cmd, const uint64_t *last) 1066{ 1067 GLuint index = cmd->index; 1068 GLsizei n = cmd->n; 1069 GLfloat * v; 1070 const char *variable_data = (const char *) (cmd + 1); 1071 v = (GLfloat *) variable_data; 1072 CALL_VertexAttribs2fvNV(ctx->CurrentServerDispatch, (index, n, v)); 1073 return cmd->cmd_base.cmd_size; 1074} 1075void GLAPIENTRY 1076_mesa_marshal_VertexAttribs2fvNV(GLuint index, GLsizei n, const GLfloat * v) 1077{ 1078 GET_CURRENT_CONTEXT(ctx); 1079 int v_size = safe_mul(n, 2 * sizeof(GLfloat)); 1080 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs2fvNV) + v_size; 1081 struct marshal_cmd_VertexAttribs2fvNV *cmd; 1082 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1083 _mesa_glthread_finish_before(ctx, "VertexAttribs2fvNV"); 1084 CALL_VertexAttribs2fvNV(ctx->CurrentServerDispatch, (index, n, v)); 1085 return; 1086 } 1087 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs2fvNV, cmd_size); 1088 cmd->index = index; 1089 cmd->n = n; 1090 char *variable_data = (char *) (cmd + 1); 1091 memcpy(variable_data, v, v_size); 1092} 1093 1094 1095/* VertexAttribs3fvNV: marshalled asynchronously */ 1096struct marshal_cmd_VertexAttribs3fvNV 1097{ 1098 struct marshal_cmd_base cmd_base; 1099 GLuint index; 1100 GLsizei n; 1101 /* Next safe_mul(n, 3 * sizeof(GLfloat)) bytes are GLfloat v[n][3] */ 1102}; 1103uint32_t 1104_mesa_unmarshal_VertexAttribs3fvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs3fvNV *cmd, const uint64_t *last) 1105{ 1106 GLuint index = cmd->index; 1107 GLsizei n = cmd->n; 1108 GLfloat * v; 1109 const char *variable_data = (const char *) (cmd + 1); 1110 v = (GLfloat *) variable_data; 1111 CALL_VertexAttribs3fvNV(ctx->CurrentServerDispatch, (index, n, v)); 1112 return cmd->cmd_base.cmd_size; 1113} 1114void GLAPIENTRY 1115_mesa_marshal_VertexAttribs3fvNV(GLuint index, GLsizei n, const GLfloat * v) 1116{ 1117 GET_CURRENT_CONTEXT(ctx); 1118 int v_size = safe_mul(n, 3 * sizeof(GLfloat)); 1119 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs3fvNV) + v_size; 1120 struct marshal_cmd_VertexAttribs3fvNV *cmd; 1121 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1122 _mesa_glthread_finish_before(ctx, "VertexAttribs3fvNV"); 1123 CALL_VertexAttribs3fvNV(ctx->CurrentServerDispatch, (index, n, v)); 1124 return; 1125 } 1126 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs3fvNV, cmd_size); 1127 cmd->index = index; 1128 cmd->n = n; 1129 char *variable_data = (char *) (cmd + 1); 1130 memcpy(variable_data, v, v_size); 1131} 1132 1133 1134/* VertexAttribs4fvNV: marshalled asynchronously */ 1135struct marshal_cmd_VertexAttribs4fvNV 1136{ 1137 struct marshal_cmd_base cmd_base; 1138 GLuint index; 1139 GLsizei n; 1140 /* Next safe_mul(n, 4 * sizeof(GLfloat)) bytes are GLfloat v[n][4] */ 1141}; 1142uint32_t 1143_mesa_unmarshal_VertexAttribs4fvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs4fvNV *cmd, const uint64_t *last) 1144{ 1145 GLuint index = cmd->index; 1146 GLsizei n = cmd->n; 1147 GLfloat * v; 1148 const char *variable_data = (const char *) (cmd + 1); 1149 v = (GLfloat *) variable_data; 1150 CALL_VertexAttribs4fvNV(ctx->CurrentServerDispatch, (index, n, v)); 1151 return cmd->cmd_base.cmd_size; 1152} 1153void GLAPIENTRY 1154_mesa_marshal_VertexAttribs4fvNV(GLuint index, GLsizei n, const GLfloat * v) 1155{ 1156 GET_CURRENT_CONTEXT(ctx); 1157 int v_size = safe_mul(n, 4 * sizeof(GLfloat)); 1158 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs4fvNV) + v_size; 1159 struct marshal_cmd_VertexAttribs4fvNV *cmd; 1160 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1161 _mesa_glthread_finish_before(ctx, "VertexAttribs4fvNV"); 1162 CALL_VertexAttribs4fvNV(ctx->CurrentServerDispatch, (index, n, v)); 1163 return; 1164 } 1165 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs4fvNV, cmd_size); 1166 cmd->index = index; 1167 cmd->n = n; 1168 char *variable_data = (char *) (cmd + 1); 1169 memcpy(variable_data, v, v_size); 1170} 1171 1172 1173/* VertexAttribs1dvNV: marshalled asynchronously */ 1174struct marshal_cmd_VertexAttribs1dvNV 1175{ 1176 struct marshal_cmd_base cmd_base; 1177 GLuint index; 1178 GLsizei n; 1179 /* Next safe_mul(n, 1 * sizeof(GLdouble)) bytes are GLdouble v[n] */ 1180}; 1181uint32_t 1182_mesa_unmarshal_VertexAttribs1dvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs1dvNV *cmd, const uint64_t *last) 1183{ 1184 GLuint index = cmd->index; 1185 GLsizei n = cmd->n; 1186 GLdouble * v; 1187 const char *variable_data = (const char *) (cmd + 1); 1188 v = (GLdouble *) variable_data; 1189 CALL_VertexAttribs1dvNV(ctx->CurrentServerDispatch, (index, n, v)); 1190 return cmd->cmd_base.cmd_size; 1191} 1192void GLAPIENTRY 1193_mesa_marshal_VertexAttribs1dvNV(GLuint index, GLsizei n, const GLdouble * v) 1194{ 1195 GET_CURRENT_CONTEXT(ctx); 1196 int v_size = safe_mul(n, 1 * sizeof(GLdouble)); 1197 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs1dvNV) + v_size; 1198 struct marshal_cmd_VertexAttribs1dvNV *cmd; 1199 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1200 _mesa_glthread_finish_before(ctx, "VertexAttribs1dvNV"); 1201 CALL_VertexAttribs1dvNV(ctx->CurrentServerDispatch, (index, n, v)); 1202 return; 1203 } 1204 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs1dvNV, cmd_size); 1205 cmd->index = index; 1206 cmd->n = n; 1207 char *variable_data = (char *) (cmd + 1); 1208 memcpy(variable_data, v, v_size); 1209} 1210 1211 1212/* VertexAttribs2dvNV: marshalled asynchronously */ 1213struct marshal_cmd_VertexAttribs2dvNV 1214{ 1215 struct marshal_cmd_base cmd_base; 1216 GLuint index; 1217 GLsizei n; 1218 /* Next safe_mul(n, 2 * sizeof(GLdouble)) bytes are GLdouble v[n][2] */ 1219}; 1220uint32_t 1221_mesa_unmarshal_VertexAttribs2dvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs2dvNV *cmd, const uint64_t *last) 1222{ 1223 GLuint index = cmd->index; 1224 GLsizei n = cmd->n; 1225 GLdouble * v; 1226 const char *variable_data = (const char *) (cmd + 1); 1227 v = (GLdouble *) variable_data; 1228 CALL_VertexAttribs2dvNV(ctx->CurrentServerDispatch, (index, n, v)); 1229 return cmd->cmd_base.cmd_size; 1230} 1231void GLAPIENTRY 1232_mesa_marshal_VertexAttribs2dvNV(GLuint index, GLsizei n, const GLdouble * v) 1233{ 1234 GET_CURRENT_CONTEXT(ctx); 1235 int v_size = safe_mul(n, 2 * sizeof(GLdouble)); 1236 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs2dvNV) + v_size; 1237 struct marshal_cmd_VertexAttribs2dvNV *cmd; 1238 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1239 _mesa_glthread_finish_before(ctx, "VertexAttribs2dvNV"); 1240 CALL_VertexAttribs2dvNV(ctx->CurrentServerDispatch, (index, n, v)); 1241 return; 1242 } 1243 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs2dvNV, cmd_size); 1244 cmd->index = index; 1245 cmd->n = n; 1246 char *variable_data = (char *) (cmd + 1); 1247 memcpy(variable_data, v, v_size); 1248} 1249 1250 1251/* VertexAttribs3dvNV: marshalled asynchronously */ 1252struct marshal_cmd_VertexAttribs3dvNV 1253{ 1254 struct marshal_cmd_base cmd_base; 1255 GLuint index; 1256 GLsizei n; 1257 /* Next safe_mul(n, 3 * sizeof(GLdouble)) bytes are GLdouble v[n][3] */ 1258}; 1259uint32_t 1260_mesa_unmarshal_VertexAttribs3dvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs3dvNV *cmd, const uint64_t *last) 1261{ 1262 GLuint index = cmd->index; 1263 GLsizei n = cmd->n; 1264 GLdouble * v; 1265 const char *variable_data = (const char *) (cmd + 1); 1266 v = (GLdouble *) variable_data; 1267 CALL_VertexAttribs3dvNV(ctx->CurrentServerDispatch, (index, n, v)); 1268 return cmd->cmd_base.cmd_size; 1269} 1270void GLAPIENTRY 1271_mesa_marshal_VertexAttribs3dvNV(GLuint index, GLsizei n, const GLdouble * v) 1272{ 1273 GET_CURRENT_CONTEXT(ctx); 1274 int v_size = safe_mul(n, 3 * sizeof(GLdouble)); 1275 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs3dvNV) + v_size; 1276 struct marshal_cmd_VertexAttribs3dvNV *cmd; 1277 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1278 _mesa_glthread_finish_before(ctx, "VertexAttribs3dvNV"); 1279 CALL_VertexAttribs3dvNV(ctx->CurrentServerDispatch, (index, n, v)); 1280 return; 1281 } 1282 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs3dvNV, cmd_size); 1283 cmd->index = index; 1284 cmd->n = n; 1285 char *variable_data = (char *) (cmd + 1); 1286 memcpy(variable_data, v, v_size); 1287} 1288 1289 1290/* VertexAttribs4dvNV: marshalled asynchronously */ 1291struct marshal_cmd_VertexAttribs4dvNV 1292{ 1293 struct marshal_cmd_base cmd_base; 1294 GLuint index; 1295 GLsizei n; 1296 /* Next safe_mul(n, 4 * sizeof(GLdouble)) bytes are GLdouble v[n][4] */ 1297}; 1298uint32_t 1299_mesa_unmarshal_VertexAttribs4dvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs4dvNV *cmd, const uint64_t *last) 1300{ 1301 GLuint index = cmd->index; 1302 GLsizei n = cmd->n; 1303 GLdouble * v; 1304 const char *variable_data = (const char *) (cmd + 1); 1305 v = (GLdouble *) variable_data; 1306 CALL_VertexAttribs4dvNV(ctx->CurrentServerDispatch, (index, n, v)); 1307 return cmd->cmd_base.cmd_size; 1308} 1309void GLAPIENTRY 1310_mesa_marshal_VertexAttribs4dvNV(GLuint index, GLsizei n, const GLdouble * v) 1311{ 1312 GET_CURRENT_CONTEXT(ctx); 1313 int v_size = safe_mul(n, 4 * sizeof(GLdouble)); 1314 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs4dvNV) + v_size; 1315 struct marshal_cmd_VertexAttribs4dvNV *cmd; 1316 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1317 _mesa_glthread_finish_before(ctx, "VertexAttribs4dvNV"); 1318 CALL_VertexAttribs4dvNV(ctx->CurrentServerDispatch, (index, n, v)); 1319 return; 1320 } 1321 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs4dvNV, cmd_size); 1322 cmd->index = index; 1323 cmd->n = n; 1324 char *variable_data = (char *) (cmd + 1); 1325 memcpy(variable_data, v, v_size); 1326} 1327 1328 1329/* VertexAttribs4ubvNV: marshalled asynchronously */ 1330struct marshal_cmd_VertexAttribs4ubvNV 1331{ 1332 struct marshal_cmd_base cmd_base; 1333 GLuint index; 1334 GLsizei n; 1335 /* Next safe_mul(n, 4 * sizeof(GLubyte)) bytes are GLubyte v[n][4] */ 1336}; 1337uint32_t 1338_mesa_unmarshal_VertexAttribs4ubvNV(struct gl_context *ctx, const struct marshal_cmd_VertexAttribs4ubvNV *cmd, const uint64_t *last) 1339{ 1340 GLuint index = cmd->index; 1341 GLsizei n = cmd->n; 1342 GLubyte * v; 1343 const char *variable_data = (const char *) (cmd + 1); 1344 v = (GLubyte *) variable_data; 1345 CALL_VertexAttribs4ubvNV(ctx->CurrentServerDispatch, (index, n, v)); 1346 return cmd->cmd_base.cmd_size; 1347} 1348void GLAPIENTRY 1349_mesa_marshal_VertexAttribs4ubvNV(GLuint index, GLsizei n, const GLubyte * v) 1350{ 1351 GET_CURRENT_CONTEXT(ctx); 1352 int v_size = safe_mul(n, 4 * sizeof(GLubyte)); 1353 int cmd_size = sizeof(struct marshal_cmd_VertexAttribs4ubvNV) + v_size; 1354 struct marshal_cmd_VertexAttribs4ubvNV *cmd; 1355 if (unlikely(v_size < 0 || (v_size > 0 && !v) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 1356 _mesa_glthread_finish_before(ctx, "VertexAttribs4ubvNV"); 1357 CALL_VertexAttribs4ubvNV(ctx->CurrentServerDispatch, (index, n, v)); 1358 return; 1359 } 1360 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexAttribs4ubvNV, cmd_size); 1361 cmd->index = index; 1362 cmd->n = n; 1363 char *variable_data = (char *) (cmd + 1); 1364 memcpy(variable_data, v, v_size); 1365} 1366 1367 1368/* GenFragmentShadersATI: marshalled synchronously */ 1369GLuint GLAPIENTRY 1370_mesa_marshal_GenFragmentShadersATI(GLuint range) 1371{ 1372 GET_CURRENT_CONTEXT(ctx); 1373 _mesa_glthread_finish_before(ctx, "GenFragmentShadersATI"); 1374 return CALL_GenFragmentShadersATI(ctx->CurrentServerDispatch, (range)); 1375} 1376 1377 1378/* BindFragmentShaderATI: marshalled asynchronously */ 1379struct marshal_cmd_BindFragmentShaderATI 1380{ 1381 struct marshal_cmd_base cmd_base; 1382 GLuint id; 1383}; 1384uint32_t 1385_mesa_unmarshal_BindFragmentShaderATI(struct gl_context *ctx, const struct marshal_cmd_BindFragmentShaderATI *cmd, const uint64_t *last) 1386{ 1387 GLuint id = cmd->id; 1388 CALL_BindFragmentShaderATI(ctx->CurrentServerDispatch, (id)); 1389 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_BindFragmentShaderATI), 8) / 8); 1390 assert (cmd_size == cmd->cmd_base.cmd_size); 1391 return cmd_size; 1392} 1393void GLAPIENTRY 1394_mesa_marshal_BindFragmentShaderATI(GLuint id) 1395{ 1396 GET_CURRENT_CONTEXT(ctx); 1397 int cmd_size = sizeof(struct marshal_cmd_BindFragmentShaderATI); 1398 struct marshal_cmd_BindFragmentShaderATI *cmd; 1399 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_BindFragmentShaderATI, cmd_size); 1400 cmd->id = id; 1401} 1402 1403 1404/* DeleteFragmentShaderATI: marshalled asynchronously */ 1405struct marshal_cmd_DeleteFragmentShaderATI 1406{ 1407 struct marshal_cmd_base cmd_base; 1408 GLuint id; 1409}; 1410uint32_t 1411_mesa_unmarshal_DeleteFragmentShaderATI(struct gl_context *ctx, const struct marshal_cmd_DeleteFragmentShaderATI *cmd, const uint64_t *last) 1412{ 1413 GLuint id = cmd->id; 1414 CALL_DeleteFragmentShaderATI(ctx->CurrentServerDispatch, (id)); 1415 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DeleteFragmentShaderATI), 8) / 8); 1416 assert (cmd_size == cmd->cmd_base.cmd_size); 1417 return cmd_size; 1418} 1419void GLAPIENTRY 1420_mesa_marshal_DeleteFragmentShaderATI(GLuint id) 1421{ 1422 GET_CURRENT_CONTEXT(ctx); 1423 int cmd_size = sizeof(struct marshal_cmd_DeleteFragmentShaderATI); 1424 struct marshal_cmd_DeleteFragmentShaderATI *cmd; 1425 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DeleteFragmentShaderATI, cmd_size); 1426 cmd->id = id; 1427} 1428 1429 1430/* BeginFragmentShaderATI: marshalled asynchronously */ 1431struct marshal_cmd_BeginFragmentShaderATI 1432{ 1433 struct marshal_cmd_base cmd_base; 1434}; 1435uint32_t 1436_mesa_unmarshal_BeginFragmentShaderATI(struct gl_context *ctx, const struct marshal_cmd_BeginFragmentShaderATI *cmd, const uint64_t *last) 1437{ 1438 CALL_BeginFragmentShaderATI(ctx->CurrentServerDispatch, ()); 1439 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_BeginFragmentShaderATI), 8) / 8); 1440 assert (cmd_size == cmd->cmd_base.cmd_size); 1441 return cmd_size; 1442} 1443void GLAPIENTRY 1444_mesa_marshal_BeginFragmentShaderATI(void) 1445{ 1446 GET_CURRENT_CONTEXT(ctx); 1447 int cmd_size = sizeof(struct marshal_cmd_BeginFragmentShaderATI); 1448 struct marshal_cmd_BeginFragmentShaderATI *cmd; 1449 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_BeginFragmentShaderATI, cmd_size); 1450 (void) cmd; 1451} 1452 1453 1454/* EndFragmentShaderATI: marshalled asynchronously */ 1455struct marshal_cmd_EndFragmentShaderATI 1456{ 1457 struct marshal_cmd_base cmd_base; 1458}; 1459uint32_t 1460_mesa_unmarshal_EndFragmentShaderATI(struct gl_context *ctx, const struct marshal_cmd_EndFragmentShaderATI *cmd, const uint64_t *last) 1461{ 1462 CALL_EndFragmentShaderATI(ctx->CurrentServerDispatch, ()); 1463 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EndFragmentShaderATI), 8) / 8); 1464 assert (cmd_size == cmd->cmd_base.cmd_size); 1465 return cmd_size; 1466} 1467void GLAPIENTRY 1468_mesa_marshal_EndFragmentShaderATI(void) 1469{ 1470 GET_CURRENT_CONTEXT(ctx); 1471 int cmd_size = sizeof(struct marshal_cmd_EndFragmentShaderATI); 1472 struct marshal_cmd_EndFragmentShaderATI *cmd; 1473 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EndFragmentShaderATI, cmd_size); 1474 (void) cmd; 1475} 1476 1477 1478/* PassTexCoordATI: marshalled asynchronously */ 1479struct marshal_cmd_PassTexCoordATI 1480{ 1481 struct marshal_cmd_base cmd_base; 1482 GLuint dst; 1483 GLuint coord; 1484 GLenum swizzle; 1485}; 1486uint32_t 1487_mesa_unmarshal_PassTexCoordATI(struct gl_context *ctx, const struct marshal_cmd_PassTexCoordATI *cmd, const uint64_t *last) 1488{ 1489 GLuint dst = cmd->dst; 1490 GLuint coord = cmd->coord; 1491 GLenum swizzle = cmd->swizzle; 1492 CALL_PassTexCoordATI(ctx->CurrentServerDispatch, (dst, coord, swizzle)); 1493 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PassTexCoordATI), 8) / 8); 1494 assert (cmd_size == cmd->cmd_base.cmd_size); 1495 return cmd_size; 1496} 1497void GLAPIENTRY 1498_mesa_marshal_PassTexCoordATI(GLuint dst, GLuint coord, GLenum swizzle) 1499{ 1500 GET_CURRENT_CONTEXT(ctx); 1501 int cmd_size = sizeof(struct marshal_cmd_PassTexCoordATI); 1502 struct marshal_cmd_PassTexCoordATI *cmd; 1503 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PassTexCoordATI, cmd_size); 1504 cmd->dst = dst; 1505 cmd->coord = coord; 1506 cmd->swizzle = swizzle; 1507} 1508 1509 1510/* SampleMapATI: marshalled asynchronously */ 1511struct marshal_cmd_SampleMapATI 1512{ 1513 struct marshal_cmd_base cmd_base; 1514 GLuint dst; 1515 GLuint interp; 1516 GLenum swizzle; 1517}; 1518uint32_t 1519_mesa_unmarshal_SampleMapATI(struct gl_context *ctx, const struct marshal_cmd_SampleMapATI *cmd, const uint64_t *last) 1520{ 1521 GLuint dst = cmd->dst; 1522 GLuint interp = cmd->interp; 1523 GLenum swizzle = cmd->swizzle; 1524 CALL_SampleMapATI(ctx->CurrentServerDispatch, (dst, interp, swizzle)); 1525 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_SampleMapATI), 8) / 8); 1526 assert (cmd_size == cmd->cmd_base.cmd_size); 1527 return cmd_size; 1528} 1529void GLAPIENTRY 1530_mesa_marshal_SampleMapATI(GLuint dst, GLuint interp, GLenum swizzle) 1531{ 1532 GET_CURRENT_CONTEXT(ctx); 1533 int cmd_size = sizeof(struct marshal_cmd_SampleMapATI); 1534 struct marshal_cmd_SampleMapATI *cmd; 1535 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_SampleMapATI, cmd_size); 1536 cmd->dst = dst; 1537 cmd->interp = interp; 1538 cmd->swizzle = swizzle; 1539} 1540 1541 1542/* ColorFragmentOp1ATI: marshalled asynchronously */ 1543struct marshal_cmd_ColorFragmentOp1ATI 1544{ 1545 struct marshal_cmd_base cmd_base; 1546 GLenum op; 1547 GLuint dst; 1548 GLuint dstMask; 1549 GLuint dstMod; 1550 GLuint arg1; 1551 GLuint arg1Rep; 1552 GLuint arg1Mod; 1553}; 1554uint32_t 1555_mesa_unmarshal_ColorFragmentOp1ATI(struct gl_context *ctx, const struct marshal_cmd_ColorFragmentOp1ATI *cmd, const uint64_t *last) 1556{ 1557 GLenum op = cmd->op; 1558 GLuint dst = cmd->dst; 1559 GLuint dstMask = cmd->dstMask; 1560 GLuint dstMod = cmd->dstMod; 1561 GLuint arg1 = cmd->arg1; 1562 GLuint arg1Rep = cmd->arg1Rep; 1563 GLuint arg1Mod = cmd->arg1Mod; 1564 CALL_ColorFragmentOp1ATI(ctx->CurrentServerDispatch, (op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod)); 1565 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ColorFragmentOp1ATI), 8) / 8); 1566 assert (cmd_size == cmd->cmd_base.cmd_size); 1567 return cmd_size; 1568} 1569void GLAPIENTRY 1570_mesa_marshal_ColorFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) 1571{ 1572 GET_CURRENT_CONTEXT(ctx); 1573 int cmd_size = sizeof(struct marshal_cmd_ColorFragmentOp1ATI); 1574 struct marshal_cmd_ColorFragmentOp1ATI *cmd; 1575 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ColorFragmentOp1ATI, cmd_size); 1576 cmd->op = op; 1577 cmd->dst = dst; 1578 cmd->dstMask = dstMask; 1579 cmd->dstMod = dstMod; 1580 cmd->arg1 = arg1; 1581 cmd->arg1Rep = arg1Rep; 1582 cmd->arg1Mod = arg1Mod; 1583} 1584 1585 1586/* ColorFragmentOp2ATI: marshalled asynchronously */ 1587struct marshal_cmd_ColorFragmentOp2ATI 1588{ 1589 struct marshal_cmd_base cmd_base; 1590 GLenum op; 1591 GLuint dst; 1592 GLuint dstMask; 1593 GLuint dstMod; 1594 GLuint arg1; 1595 GLuint arg1Rep; 1596 GLuint arg1Mod; 1597 GLuint arg2; 1598 GLuint arg2Rep; 1599 GLuint arg2Mod; 1600}; 1601uint32_t 1602_mesa_unmarshal_ColorFragmentOp2ATI(struct gl_context *ctx, const struct marshal_cmd_ColorFragmentOp2ATI *cmd, const uint64_t *last) 1603{ 1604 GLenum op = cmd->op; 1605 GLuint dst = cmd->dst; 1606 GLuint dstMask = cmd->dstMask; 1607 GLuint dstMod = cmd->dstMod; 1608 GLuint arg1 = cmd->arg1; 1609 GLuint arg1Rep = cmd->arg1Rep; 1610 GLuint arg1Mod = cmd->arg1Mod; 1611 GLuint arg2 = cmd->arg2; 1612 GLuint arg2Rep = cmd->arg2Rep; 1613 GLuint arg2Mod = cmd->arg2Mod; 1614 CALL_ColorFragmentOp2ATI(ctx->CurrentServerDispatch, (op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod)); 1615 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ColorFragmentOp2ATI), 8) / 8); 1616 assert (cmd_size == cmd->cmd_base.cmd_size); 1617 return cmd_size; 1618} 1619void GLAPIENTRY 1620_mesa_marshal_ColorFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) 1621{ 1622 GET_CURRENT_CONTEXT(ctx); 1623 int cmd_size = sizeof(struct marshal_cmd_ColorFragmentOp2ATI); 1624 struct marshal_cmd_ColorFragmentOp2ATI *cmd; 1625 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ColorFragmentOp2ATI, cmd_size); 1626 cmd->op = op; 1627 cmd->dst = dst; 1628 cmd->dstMask = dstMask; 1629 cmd->dstMod = dstMod; 1630 cmd->arg1 = arg1; 1631 cmd->arg1Rep = arg1Rep; 1632 cmd->arg1Mod = arg1Mod; 1633 cmd->arg2 = arg2; 1634 cmd->arg2Rep = arg2Rep; 1635 cmd->arg2Mod = arg2Mod; 1636} 1637 1638 1639/* ColorFragmentOp3ATI: marshalled asynchronously */ 1640struct marshal_cmd_ColorFragmentOp3ATI 1641{ 1642 struct marshal_cmd_base cmd_base; 1643 GLenum op; 1644 GLuint dst; 1645 GLuint dstMask; 1646 GLuint dstMod; 1647 GLuint arg1; 1648 GLuint arg1Rep; 1649 GLuint arg1Mod; 1650 GLuint arg2; 1651 GLuint arg2Rep; 1652 GLuint arg2Mod; 1653 GLuint arg3; 1654 GLuint arg3Rep; 1655 GLuint arg3Mod; 1656}; 1657uint32_t 1658_mesa_unmarshal_ColorFragmentOp3ATI(struct gl_context *ctx, const struct marshal_cmd_ColorFragmentOp3ATI *cmd, const uint64_t *last) 1659{ 1660 GLenum op = cmd->op; 1661 GLuint dst = cmd->dst; 1662 GLuint dstMask = cmd->dstMask; 1663 GLuint dstMod = cmd->dstMod; 1664 GLuint arg1 = cmd->arg1; 1665 GLuint arg1Rep = cmd->arg1Rep; 1666 GLuint arg1Mod = cmd->arg1Mod; 1667 GLuint arg2 = cmd->arg2; 1668 GLuint arg2Rep = cmd->arg2Rep; 1669 GLuint arg2Mod = cmd->arg2Mod; 1670 GLuint arg3 = cmd->arg3; 1671 GLuint arg3Rep = cmd->arg3Rep; 1672 GLuint arg3Mod = cmd->arg3Mod; 1673 CALL_ColorFragmentOp3ATI(ctx->CurrentServerDispatch, (op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod)); 1674 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ColorFragmentOp3ATI), 8) / 8); 1675 assert (cmd_size == cmd->cmd_base.cmd_size); 1676 return cmd_size; 1677} 1678void GLAPIENTRY 1679_mesa_marshal_ColorFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) 1680{ 1681 GET_CURRENT_CONTEXT(ctx); 1682 int cmd_size = sizeof(struct marshal_cmd_ColorFragmentOp3ATI); 1683 struct marshal_cmd_ColorFragmentOp3ATI *cmd; 1684 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ColorFragmentOp3ATI, cmd_size); 1685 cmd->op = op; 1686 cmd->dst = dst; 1687 cmd->dstMask = dstMask; 1688 cmd->dstMod = dstMod; 1689 cmd->arg1 = arg1; 1690 cmd->arg1Rep = arg1Rep; 1691 cmd->arg1Mod = arg1Mod; 1692 cmd->arg2 = arg2; 1693 cmd->arg2Rep = arg2Rep; 1694 cmd->arg2Mod = arg2Mod; 1695 cmd->arg3 = arg3; 1696 cmd->arg3Rep = arg3Rep; 1697 cmd->arg3Mod = arg3Mod; 1698} 1699 1700 1701/* AlphaFragmentOp1ATI: marshalled asynchronously */ 1702struct marshal_cmd_AlphaFragmentOp1ATI 1703{ 1704 struct marshal_cmd_base cmd_base; 1705 GLenum op; 1706 GLuint dst; 1707 GLuint dstMod; 1708 GLuint arg1; 1709 GLuint arg1Rep; 1710 GLuint arg1Mod; 1711}; 1712uint32_t 1713_mesa_unmarshal_AlphaFragmentOp1ATI(struct gl_context *ctx, const struct marshal_cmd_AlphaFragmentOp1ATI *cmd, const uint64_t *last) 1714{ 1715 GLenum op = cmd->op; 1716 GLuint dst = cmd->dst; 1717 GLuint dstMod = cmd->dstMod; 1718 GLuint arg1 = cmd->arg1; 1719 GLuint arg1Rep = cmd->arg1Rep; 1720 GLuint arg1Mod = cmd->arg1Mod; 1721 CALL_AlphaFragmentOp1ATI(ctx->CurrentServerDispatch, (op, dst, dstMod, arg1, arg1Rep, arg1Mod)); 1722 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_AlphaFragmentOp1ATI), 8) / 8); 1723 assert (cmd_size == cmd->cmd_base.cmd_size); 1724 return cmd_size; 1725} 1726void GLAPIENTRY 1727_mesa_marshal_AlphaFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) 1728{ 1729 GET_CURRENT_CONTEXT(ctx); 1730 int cmd_size = sizeof(struct marshal_cmd_AlphaFragmentOp1ATI); 1731 struct marshal_cmd_AlphaFragmentOp1ATI *cmd; 1732 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_AlphaFragmentOp1ATI, cmd_size); 1733 cmd->op = op; 1734 cmd->dst = dst; 1735 cmd->dstMod = dstMod; 1736 cmd->arg1 = arg1; 1737 cmd->arg1Rep = arg1Rep; 1738 cmd->arg1Mod = arg1Mod; 1739} 1740 1741 1742/* AlphaFragmentOp2ATI: marshalled asynchronously */ 1743struct marshal_cmd_AlphaFragmentOp2ATI 1744{ 1745 struct marshal_cmd_base cmd_base; 1746 GLenum op; 1747 GLuint dst; 1748 GLuint dstMod; 1749 GLuint arg1; 1750 GLuint arg1Rep; 1751 GLuint arg1Mod; 1752 GLuint arg2; 1753 GLuint arg2Rep; 1754 GLuint arg2Mod; 1755}; 1756uint32_t 1757_mesa_unmarshal_AlphaFragmentOp2ATI(struct gl_context *ctx, const struct marshal_cmd_AlphaFragmentOp2ATI *cmd, const uint64_t *last) 1758{ 1759 GLenum op = cmd->op; 1760 GLuint dst = cmd->dst; 1761 GLuint dstMod = cmd->dstMod; 1762 GLuint arg1 = cmd->arg1; 1763 GLuint arg1Rep = cmd->arg1Rep; 1764 GLuint arg1Mod = cmd->arg1Mod; 1765 GLuint arg2 = cmd->arg2; 1766 GLuint arg2Rep = cmd->arg2Rep; 1767 GLuint arg2Mod = cmd->arg2Mod; 1768 CALL_AlphaFragmentOp2ATI(ctx->CurrentServerDispatch, (op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod)); 1769 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_AlphaFragmentOp2ATI), 8) / 8); 1770 assert (cmd_size == cmd->cmd_base.cmd_size); 1771 return cmd_size; 1772} 1773void GLAPIENTRY 1774_mesa_marshal_AlphaFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) 1775{ 1776 GET_CURRENT_CONTEXT(ctx); 1777 int cmd_size = sizeof(struct marshal_cmd_AlphaFragmentOp2ATI); 1778 struct marshal_cmd_AlphaFragmentOp2ATI *cmd; 1779 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_AlphaFragmentOp2ATI, cmd_size); 1780 cmd->op = op; 1781 cmd->dst = dst; 1782 cmd->dstMod = dstMod; 1783 cmd->arg1 = arg1; 1784 cmd->arg1Rep = arg1Rep; 1785 cmd->arg1Mod = arg1Mod; 1786 cmd->arg2 = arg2; 1787 cmd->arg2Rep = arg2Rep; 1788 cmd->arg2Mod = arg2Mod; 1789} 1790 1791 1792/* AlphaFragmentOp3ATI: marshalled asynchronously */ 1793struct marshal_cmd_AlphaFragmentOp3ATI 1794{ 1795 struct marshal_cmd_base cmd_base; 1796 GLenum op; 1797 GLuint dst; 1798 GLuint dstMod; 1799 GLuint arg1; 1800 GLuint arg1Rep; 1801 GLuint arg1Mod; 1802 GLuint arg2; 1803 GLuint arg2Rep; 1804 GLuint arg2Mod; 1805 GLuint arg3; 1806 GLuint arg3Rep; 1807 GLuint arg3Mod; 1808}; 1809uint32_t 1810_mesa_unmarshal_AlphaFragmentOp3ATI(struct gl_context *ctx, const struct marshal_cmd_AlphaFragmentOp3ATI *cmd, const uint64_t *last) 1811{ 1812 GLenum op = cmd->op; 1813 GLuint dst = cmd->dst; 1814 GLuint dstMod = cmd->dstMod; 1815 GLuint arg1 = cmd->arg1; 1816 GLuint arg1Rep = cmd->arg1Rep; 1817 GLuint arg1Mod = cmd->arg1Mod; 1818 GLuint arg2 = cmd->arg2; 1819 GLuint arg2Rep = cmd->arg2Rep; 1820 GLuint arg2Mod = cmd->arg2Mod; 1821 GLuint arg3 = cmd->arg3; 1822 GLuint arg3Rep = cmd->arg3Rep; 1823 GLuint arg3Mod = cmd->arg3Mod; 1824 CALL_AlphaFragmentOp3ATI(ctx->CurrentServerDispatch, (op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod)); 1825 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_AlphaFragmentOp3ATI), 8) / 8); 1826 assert (cmd_size == cmd->cmd_base.cmd_size); 1827 return cmd_size; 1828} 1829void GLAPIENTRY 1830_mesa_marshal_AlphaFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) 1831{ 1832 GET_CURRENT_CONTEXT(ctx); 1833 int cmd_size = sizeof(struct marshal_cmd_AlphaFragmentOp3ATI); 1834 struct marshal_cmd_AlphaFragmentOp3ATI *cmd; 1835 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_AlphaFragmentOp3ATI, cmd_size); 1836 cmd->op = op; 1837 cmd->dst = dst; 1838 cmd->dstMod = dstMod; 1839 cmd->arg1 = arg1; 1840 cmd->arg1Rep = arg1Rep; 1841 cmd->arg1Mod = arg1Mod; 1842 cmd->arg2 = arg2; 1843 cmd->arg2Rep = arg2Rep; 1844 cmd->arg2Mod = arg2Mod; 1845 cmd->arg3 = arg3; 1846 cmd->arg3Rep = arg3Rep; 1847 cmd->arg3Mod = arg3Mod; 1848} 1849 1850 1851/* SetFragmentShaderConstantATI: marshalled asynchronously */ 1852struct marshal_cmd_SetFragmentShaderConstantATI 1853{ 1854 struct marshal_cmd_base cmd_base; 1855 GLuint dst; 1856 GLfloat value[4]; 1857}; 1858uint32_t 1859_mesa_unmarshal_SetFragmentShaderConstantATI(struct gl_context *ctx, const struct marshal_cmd_SetFragmentShaderConstantATI *cmd, const uint64_t *last) 1860{ 1861 GLuint dst = cmd->dst; 1862 const GLfloat * value = cmd->value; 1863 CALL_SetFragmentShaderConstantATI(ctx->CurrentServerDispatch, (dst, value)); 1864 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_SetFragmentShaderConstantATI), 8) / 8); 1865 assert (cmd_size == cmd->cmd_base.cmd_size); 1866 return cmd_size; 1867} 1868void GLAPIENTRY 1869_mesa_marshal_SetFragmentShaderConstantATI(GLuint dst, const GLfloat * value) 1870{ 1871 GET_CURRENT_CONTEXT(ctx); 1872 int cmd_size = sizeof(struct marshal_cmd_SetFragmentShaderConstantATI); 1873 struct marshal_cmd_SetFragmentShaderConstantATI *cmd; 1874 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_SetFragmentShaderConstantATI, cmd_size); 1875 cmd->dst = dst; 1876 memcpy(cmd->value, value, 4 * sizeof(GLfloat)); 1877} 1878 1879 1880/* ActiveStencilFaceEXT: marshalled asynchronously */ 1881struct marshal_cmd_ActiveStencilFaceEXT 1882{ 1883 struct marshal_cmd_base cmd_base; 1884 GLenum face; 1885}; 1886uint32_t 1887_mesa_unmarshal_ActiveStencilFaceEXT(struct gl_context *ctx, const struct marshal_cmd_ActiveStencilFaceEXT *cmd, const uint64_t *last) 1888{ 1889 GLenum face = cmd->face; 1890 CALL_ActiveStencilFaceEXT(ctx->CurrentServerDispatch, (face)); 1891 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ActiveStencilFaceEXT), 8) / 8); 1892 assert (cmd_size == cmd->cmd_base.cmd_size); 1893 return cmd_size; 1894} 1895void GLAPIENTRY 1896_mesa_marshal_ActiveStencilFaceEXT(GLenum face) 1897{ 1898 GET_CURRENT_CONTEXT(ctx); 1899 int cmd_size = sizeof(struct marshal_cmd_ActiveStencilFaceEXT); 1900 struct marshal_cmd_ActiveStencilFaceEXT *cmd; 1901 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ActiveStencilFaceEXT, cmd_size); 1902 cmd->face = face; 1903} 1904 1905 1906/* ObjectPurgeableAPPLE: marshalled synchronously */ 1907GLenum GLAPIENTRY 1908_mesa_marshal_ObjectPurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) 1909{ 1910 GET_CURRENT_CONTEXT(ctx); 1911 _mesa_glthread_finish_before(ctx, "ObjectPurgeableAPPLE"); 1912 return CALL_ObjectPurgeableAPPLE(ctx->CurrentServerDispatch, (objectType, name, option)); 1913} 1914 1915 1916/* ObjectUnpurgeableAPPLE: marshalled synchronously */ 1917GLenum GLAPIENTRY 1918_mesa_marshal_ObjectUnpurgeableAPPLE(GLenum objectType, GLuint name, GLenum option) 1919{ 1920 GET_CURRENT_CONTEXT(ctx); 1921 _mesa_glthread_finish_before(ctx, "ObjectUnpurgeableAPPLE"); 1922 return CALL_ObjectUnpurgeableAPPLE(ctx->CurrentServerDispatch, (objectType, name, option)); 1923} 1924 1925 1926/* GetObjectParameterivAPPLE: marshalled synchronously */ 1927void GLAPIENTRY 1928_mesa_marshal_GetObjectParameterivAPPLE(GLenum objectType, GLuint name, GLenum pname, GLint * value) 1929{ 1930 GET_CURRENT_CONTEXT(ctx); 1931 _mesa_glthread_finish_before(ctx, "GetObjectParameterivAPPLE"); 1932 CALL_GetObjectParameterivAPPLE(ctx->CurrentServerDispatch, (objectType, name, pname, value)); 1933} 1934 1935 1936/* DepthBoundsEXT: marshalled asynchronously */ 1937struct marshal_cmd_DepthBoundsEXT 1938{ 1939 struct marshal_cmd_base cmd_base; 1940 GLclampd zmin; 1941 GLclampd zmax; 1942}; 1943uint32_t 1944_mesa_unmarshal_DepthBoundsEXT(struct gl_context *ctx, const struct marshal_cmd_DepthBoundsEXT *cmd, const uint64_t *last) 1945{ 1946 GLclampd zmin = cmd->zmin; 1947 GLclampd zmax = cmd->zmax; 1948 CALL_DepthBoundsEXT(ctx->CurrentServerDispatch, (zmin, zmax)); 1949 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DepthBoundsEXT), 8) / 8); 1950 assert (cmd_size == cmd->cmd_base.cmd_size); 1951 return cmd_size; 1952} 1953void GLAPIENTRY 1954_mesa_marshal_DepthBoundsEXT(GLclampd zmin, GLclampd zmax) 1955{ 1956 GET_CURRENT_CONTEXT(ctx); 1957 int cmd_size = sizeof(struct marshal_cmd_DepthBoundsEXT); 1958 struct marshal_cmd_DepthBoundsEXT *cmd; 1959 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DepthBoundsEXT, cmd_size); 1960 cmd->zmin = zmin; 1961 cmd->zmax = zmax; 1962} 1963 1964 1965/* BindRenderbufferEXT: marshalled asynchronously */ 1966struct marshal_cmd_BindRenderbufferEXT 1967{ 1968 struct marshal_cmd_base cmd_base; 1969 GLenum target; 1970 GLuint renderbuffer; 1971}; 1972uint32_t 1973_mesa_unmarshal_BindRenderbufferEXT(struct gl_context *ctx, const struct marshal_cmd_BindRenderbufferEXT *cmd, const uint64_t *last) 1974{ 1975 GLenum target = cmd->target; 1976 GLuint renderbuffer = cmd->renderbuffer; 1977 CALL_BindRenderbufferEXT(ctx->CurrentServerDispatch, (target, renderbuffer)); 1978 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_BindRenderbufferEXT), 8) / 8); 1979 assert (cmd_size == cmd->cmd_base.cmd_size); 1980 return cmd_size; 1981} 1982void GLAPIENTRY 1983_mesa_marshal_BindRenderbufferEXT(GLenum target, GLuint renderbuffer) 1984{ 1985 GET_CURRENT_CONTEXT(ctx); 1986 int cmd_size = sizeof(struct marshal_cmd_BindRenderbufferEXT); 1987 struct marshal_cmd_BindRenderbufferEXT *cmd; 1988 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_BindRenderbufferEXT, cmd_size); 1989 cmd->target = target; 1990 cmd->renderbuffer = renderbuffer; 1991} 1992 1993 1994/* BindFramebufferEXT: marshalled asynchronously */ 1995struct marshal_cmd_BindFramebufferEXT 1996{ 1997 struct marshal_cmd_base cmd_base; 1998 GLenum target; 1999 GLuint framebuffer; 2000}; 2001uint32_t 2002_mesa_unmarshal_BindFramebufferEXT(struct gl_context *ctx, const struct marshal_cmd_BindFramebufferEXT *cmd, const uint64_t *last) 2003{ 2004 GLenum target = cmd->target; 2005 GLuint framebuffer = cmd->framebuffer; 2006 CALL_BindFramebufferEXT(ctx->CurrentServerDispatch, (target, framebuffer)); 2007 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_BindFramebufferEXT), 8) / 8); 2008 assert (cmd_size == cmd->cmd_base.cmd_size); 2009 return cmd_size; 2010} 2011void GLAPIENTRY 2012_mesa_marshal_BindFramebufferEXT(GLenum target, GLuint framebuffer) 2013{ 2014 GET_CURRENT_CONTEXT(ctx); 2015 int cmd_size = sizeof(struct marshal_cmd_BindFramebufferEXT); 2016 struct marshal_cmd_BindFramebufferEXT *cmd; 2017 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_BindFramebufferEXT, cmd_size); 2018 cmd->target = target; 2019 cmd->framebuffer = framebuffer; 2020} 2021 2022 2023/* StringMarkerGREMEDY: marshalled synchronously */ 2024void GLAPIENTRY 2025_mesa_marshal_StringMarkerGREMEDY(GLsizei len, const GLvoid * string) 2026{ 2027 GET_CURRENT_CONTEXT(ctx); 2028 _mesa_glthread_finish_before(ctx, "StringMarkerGREMEDY"); 2029 CALL_StringMarkerGREMEDY(ctx->CurrentServerDispatch, (len, string)); 2030} 2031 2032 2033/* ProvokingVertex: marshalled asynchronously */ 2034struct marshal_cmd_ProvokingVertex 2035{ 2036 struct marshal_cmd_base cmd_base; 2037 GLenum mode; 2038}; 2039uint32_t 2040_mesa_unmarshal_ProvokingVertex(struct gl_context *ctx, const struct marshal_cmd_ProvokingVertex *cmd, const uint64_t *last) 2041{ 2042 GLenum mode = cmd->mode; 2043 CALL_ProvokingVertex(ctx->CurrentServerDispatch, (mode)); 2044 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ProvokingVertex), 8) / 8); 2045 assert (cmd_size == cmd->cmd_base.cmd_size); 2046 return cmd_size; 2047} 2048void GLAPIENTRY 2049_mesa_marshal_ProvokingVertex(GLenum mode) 2050{ 2051 GET_CURRENT_CONTEXT(ctx); 2052 int cmd_size = sizeof(struct marshal_cmd_ProvokingVertex); 2053 struct marshal_cmd_ProvokingVertex *cmd; 2054 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ProvokingVertex, cmd_size); 2055 cmd->mode = mode; 2056} 2057 2058 2059/* ColorMaski: marshalled asynchronously */ 2060struct marshal_cmd_ColorMaski 2061{ 2062 struct marshal_cmd_base cmd_base; 2063 GLboolean r; 2064 GLboolean g; 2065 GLboolean b; 2066 GLboolean a; 2067 GLuint buf; 2068}; 2069uint32_t 2070_mesa_unmarshal_ColorMaski(struct gl_context *ctx, const struct marshal_cmd_ColorMaski *cmd, const uint64_t *last) 2071{ 2072 GLuint buf = cmd->buf; 2073 GLboolean r = cmd->r; 2074 GLboolean g = cmd->g; 2075 GLboolean b = cmd->b; 2076 GLboolean a = cmd->a; 2077 CALL_ColorMaski(ctx->CurrentServerDispatch, (buf, r, g, b, a)); 2078 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ColorMaski), 8) / 8); 2079 assert (cmd_size == cmd->cmd_base.cmd_size); 2080 return cmd_size; 2081} 2082void GLAPIENTRY 2083_mesa_marshal_ColorMaski(GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a) 2084{ 2085 GET_CURRENT_CONTEXT(ctx); 2086 int cmd_size = sizeof(struct marshal_cmd_ColorMaski); 2087 struct marshal_cmd_ColorMaski *cmd; 2088 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ColorMaski, cmd_size); 2089 cmd->buf = buf; 2090 cmd->r = r; 2091 cmd->g = g; 2092 cmd->b = b; 2093 cmd->a = a; 2094} 2095 2096 2097/* GetBooleani_v: marshalled synchronously */ 2098void GLAPIENTRY 2099_mesa_marshal_GetBooleani_v(GLenum value, GLuint index, GLboolean * data) 2100{ 2101 GET_CURRENT_CONTEXT(ctx); 2102 _mesa_glthread_finish_before(ctx, "GetBooleani_v"); 2103 CALL_GetBooleani_v(ctx->CurrentServerDispatch, (value, index, data)); 2104} 2105 2106 2107/* GetIntegeri_v: marshalled synchronously */ 2108void GLAPIENTRY 2109_mesa_marshal_GetIntegeri_v(GLenum value, GLuint index, GLint * data) 2110{ 2111 GET_CURRENT_CONTEXT(ctx); 2112 _mesa_glthread_finish_before(ctx, "GetIntegeri_v"); 2113 CALL_GetIntegeri_v(ctx->CurrentServerDispatch, (value, index, data)); 2114} 2115 2116 2117/* Enablei: marshalled asynchronously */ 2118struct marshal_cmd_Enablei 2119{ 2120 struct marshal_cmd_base cmd_base; 2121 GLenum target; 2122 GLuint index; 2123}; 2124uint32_t 2125_mesa_unmarshal_Enablei(struct gl_context *ctx, const struct marshal_cmd_Enablei *cmd, const uint64_t *last) 2126{ 2127 GLenum target = cmd->target; 2128 GLuint index = cmd->index; 2129 CALL_Enablei(ctx->CurrentServerDispatch, (target, index)); 2130 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Enablei), 8) / 8); 2131 assert (cmd_size == cmd->cmd_base.cmd_size); 2132 return cmd_size; 2133} 2134void GLAPIENTRY 2135_mesa_marshal_Enablei(GLenum target, GLuint index) 2136{ 2137 GET_CURRENT_CONTEXT(ctx); 2138 int cmd_size = sizeof(struct marshal_cmd_Enablei); 2139 struct marshal_cmd_Enablei *cmd; 2140 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Enablei, cmd_size); 2141 cmd->target = target; 2142 cmd->index = index; 2143} 2144 2145 2146/* Disablei: marshalled asynchronously */ 2147struct marshal_cmd_Disablei 2148{ 2149 struct marshal_cmd_base cmd_base; 2150 GLenum target; 2151 GLuint index; 2152}; 2153uint32_t 2154_mesa_unmarshal_Disablei(struct gl_context *ctx, const struct marshal_cmd_Disablei *cmd, const uint64_t *last) 2155{ 2156 GLenum target = cmd->target; 2157 GLuint index = cmd->index; 2158 CALL_Disablei(ctx->CurrentServerDispatch, (target, index)); 2159 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Disablei), 8) / 8); 2160 assert (cmd_size == cmd->cmd_base.cmd_size); 2161 return cmd_size; 2162} 2163void GLAPIENTRY 2164_mesa_marshal_Disablei(GLenum target, GLuint index) 2165{ 2166 GET_CURRENT_CONTEXT(ctx); 2167 int cmd_size = sizeof(struct marshal_cmd_Disablei); 2168 struct marshal_cmd_Disablei *cmd; 2169 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Disablei, cmd_size); 2170 cmd->target = target; 2171 cmd->index = index; 2172} 2173 2174 2175/* IsEnabledi: marshalled synchronously */ 2176GLboolean GLAPIENTRY 2177_mesa_marshal_IsEnabledi(GLenum target, GLuint index) 2178{ 2179 GET_CURRENT_CONTEXT(ctx); 2180 _mesa_glthread_finish_before(ctx, "IsEnabledi"); 2181 return CALL_IsEnabledi(ctx->CurrentServerDispatch, (target, index)); 2182} 2183 2184 2185/* GetPerfMonitorGroupsAMD: marshalled synchronously */ 2186void GLAPIENTRY 2187_mesa_marshal_GetPerfMonitorGroupsAMD(GLint * numGroups, GLsizei groupsSize, GLuint * groups) 2188{ 2189 GET_CURRENT_CONTEXT(ctx); 2190 _mesa_glthread_finish_before(ctx, "GetPerfMonitorGroupsAMD"); 2191 CALL_GetPerfMonitorGroupsAMD(ctx->CurrentServerDispatch, (numGroups, groupsSize, groups)); 2192} 2193 2194 2195/* GetPerfMonitorCountersAMD: marshalled synchronously */ 2196void GLAPIENTRY 2197_mesa_marshal_GetPerfMonitorCountersAMD(GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei countersSize, GLuint * counters) 2198{ 2199 GET_CURRENT_CONTEXT(ctx); 2200 _mesa_glthread_finish_before(ctx, "GetPerfMonitorCountersAMD"); 2201 CALL_GetPerfMonitorCountersAMD(ctx->CurrentServerDispatch, (group, numCounters, maxActiveCounters, countersSize, counters)); 2202} 2203 2204 2205/* GetPerfMonitorGroupStringAMD: marshalled synchronously */ 2206void GLAPIENTRY 2207_mesa_marshal_GetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString) 2208{ 2209 GET_CURRENT_CONTEXT(ctx); 2210 _mesa_glthread_finish_before(ctx, "GetPerfMonitorGroupStringAMD"); 2211 CALL_GetPerfMonitorGroupStringAMD(ctx->CurrentServerDispatch, (group, bufSize, length, groupString)); 2212} 2213 2214 2215/* GetPerfMonitorCounterStringAMD: marshalled synchronously */ 2216void GLAPIENTRY 2217_mesa_marshal_GetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString) 2218{ 2219 GET_CURRENT_CONTEXT(ctx); 2220 _mesa_glthread_finish_before(ctx, "GetPerfMonitorCounterStringAMD"); 2221 CALL_GetPerfMonitorCounterStringAMD(ctx->CurrentServerDispatch, (group, counter, bufSize, length, counterString)); 2222} 2223 2224 2225/* GetPerfMonitorCounterInfoAMD: marshalled synchronously */ 2226void GLAPIENTRY 2227_mesa_marshal_GetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid * data) 2228{ 2229 GET_CURRENT_CONTEXT(ctx); 2230 _mesa_glthread_finish_before(ctx, "GetPerfMonitorCounterInfoAMD"); 2231 CALL_GetPerfMonitorCounterInfoAMD(ctx->CurrentServerDispatch, (group, counter, pname, data)); 2232} 2233 2234 2235/* GenPerfMonitorsAMD: marshalled synchronously */ 2236void GLAPIENTRY 2237_mesa_marshal_GenPerfMonitorsAMD(GLsizei n, GLuint * monitors) 2238{ 2239 GET_CURRENT_CONTEXT(ctx); 2240 _mesa_glthread_finish_before(ctx, "GenPerfMonitorsAMD"); 2241 CALL_GenPerfMonitorsAMD(ctx->CurrentServerDispatch, (n, monitors)); 2242} 2243 2244 2245/* DeletePerfMonitorsAMD: marshalled asynchronously */ 2246struct marshal_cmd_DeletePerfMonitorsAMD 2247{ 2248 struct marshal_cmd_base cmd_base; 2249 GLsizei n; 2250 /* Next safe_mul(n, 1 * sizeof(GLuint)) bytes are GLuint monitors[n] */ 2251}; 2252uint32_t 2253_mesa_unmarshal_DeletePerfMonitorsAMD(struct gl_context *ctx, const struct marshal_cmd_DeletePerfMonitorsAMD *cmd, const uint64_t *last) 2254{ 2255 GLsizei n = cmd->n; 2256 GLuint * monitors; 2257 const char *variable_data = (const char *) (cmd + 1); 2258 monitors = (GLuint *) variable_data; 2259 CALL_DeletePerfMonitorsAMD(ctx->CurrentServerDispatch, (n, monitors)); 2260 return cmd->cmd_base.cmd_size; 2261} 2262void GLAPIENTRY 2263_mesa_marshal_DeletePerfMonitorsAMD(GLsizei n, GLuint * monitors) 2264{ 2265 GET_CURRENT_CONTEXT(ctx); 2266 int monitors_size = safe_mul(n, 1 * sizeof(GLuint)); 2267 int cmd_size = sizeof(struct marshal_cmd_DeletePerfMonitorsAMD) + monitors_size; 2268 struct marshal_cmd_DeletePerfMonitorsAMD *cmd; 2269 if (unlikely(monitors_size < 0 || (monitors_size > 0 && !monitors) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 2270 _mesa_glthread_finish_before(ctx, "DeletePerfMonitorsAMD"); 2271 CALL_DeletePerfMonitorsAMD(ctx->CurrentServerDispatch, (n, monitors)); 2272 return; 2273 } 2274 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DeletePerfMonitorsAMD, cmd_size); 2275 cmd->n = n; 2276 char *variable_data = (char *) (cmd + 1); 2277 memcpy(variable_data, monitors, monitors_size); 2278} 2279 2280 2281/* SelectPerfMonitorCountersAMD: marshalled asynchronously */ 2282struct marshal_cmd_SelectPerfMonitorCountersAMD 2283{ 2284 struct marshal_cmd_base cmd_base; 2285 GLboolean enable; 2286 GLuint monitor; 2287 GLuint group; 2288 GLint numCounters; 2289 /* Next safe_mul(numCounters, 1 * sizeof(GLuint)) bytes are GLuint counterList[numCounters] */ 2290}; 2291uint32_t 2292_mesa_unmarshal_SelectPerfMonitorCountersAMD(struct gl_context *ctx, const struct marshal_cmd_SelectPerfMonitorCountersAMD *cmd, const uint64_t *last) 2293{ 2294 GLuint monitor = cmd->monitor; 2295 GLboolean enable = cmd->enable; 2296 GLuint group = cmd->group; 2297 GLint numCounters = cmd->numCounters; 2298 GLuint * counterList; 2299 const char *variable_data = (const char *) (cmd + 1); 2300 counterList = (GLuint *) variable_data; 2301 CALL_SelectPerfMonitorCountersAMD(ctx->CurrentServerDispatch, (monitor, enable, group, numCounters, counterList)); 2302 return cmd->cmd_base.cmd_size; 2303} 2304void GLAPIENTRY 2305_mesa_marshal_SelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList) 2306{ 2307 GET_CURRENT_CONTEXT(ctx); 2308 int counterList_size = safe_mul(numCounters, 1 * sizeof(GLuint)); 2309 int cmd_size = sizeof(struct marshal_cmd_SelectPerfMonitorCountersAMD) + counterList_size; 2310 struct marshal_cmd_SelectPerfMonitorCountersAMD *cmd; 2311 if (unlikely(counterList_size < 0 || (counterList_size > 0 && !counterList) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 2312 _mesa_glthread_finish_before(ctx, "SelectPerfMonitorCountersAMD"); 2313 CALL_SelectPerfMonitorCountersAMD(ctx->CurrentServerDispatch, (monitor, enable, group, numCounters, counterList)); 2314 return; 2315 } 2316 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_SelectPerfMonitorCountersAMD, cmd_size); 2317 cmd->monitor = monitor; 2318 cmd->enable = enable; 2319 cmd->group = group; 2320 cmd->numCounters = numCounters; 2321 char *variable_data = (char *) (cmd + 1); 2322 memcpy(variable_data, counterList, counterList_size); 2323} 2324 2325 2326/* BeginPerfMonitorAMD: marshalled asynchronously */ 2327struct marshal_cmd_BeginPerfMonitorAMD 2328{ 2329 struct marshal_cmd_base cmd_base; 2330 GLuint monitor; 2331}; 2332uint32_t 2333_mesa_unmarshal_BeginPerfMonitorAMD(struct gl_context *ctx, const struct marshal_cmd_BeginPerfMonitorAMD *cmd, const uint64_t *last) 2334{ 2335 GLuint monitor = cmd->monitor; 2336 CALL_BeginPerfMonitorAMD(ctx->CurrentServerDispatch, (monitor)); 2337 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_BeginPerfMonitorAMD), 8) / 8); 2338 assert (cmd_size == cmd->cmd_base.cmd_size); 2339 return cmd_size; 2340} 2341void GLAPIENTRY 2342_mesa_marshal_BeginPerfMonitorAMD(GLuint monitor) 2343{ 2344 GET_CURRENT_CONTEXT(ctx); 2345 int cmd_size = sizeof(struct marshal_cmd_BeginPerfMonitorAMD); 2346 struct marshal_cmd_BeginPerfMonitorAMD *cmd; 2347 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_BeginPerfMonitorAMD, cmd_size); 2348 cmd->monitor = monitor; 2349} 2350 2351 2352/* EndPerfMonitorAMD: marshalled asynchronously */ 2353struct marshal_cmd_EndPerfMonitorAMD 2354{ 2355 struct marshal_cmd_base cmd_base; 2356 GLuint monitor; 2357}; 2358uint32_t 2359_mesa_unmarshal_EndPerfMonitorAMD(struct gl_context *ctx, const struct marshal_cmd_EndPerfMonitorAMD *cmd, const uint64_t *last) 2360{ 2361 GLuint monitor = cmd->monitor; 2362 CALL_EndPerfMonitorAMD(ctx->CurrentServerDispatch, (monitor)); 2363 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EndPerfMonitorAMD), 8) / 8); 2364 assert (cmd_size == cmd->cmd_base.cmd_size); 2365 return cmd_size; 2366} 2367void GLAPIENTRY 2368_mesa_marshal_EndPerfMonitorAMD(GLuint monitor) 2369{ 2370 GET_CURRENT_CONTEXT(ctx); 2371 int cmd_size = sizeof(struct marshal_cmd_EndPerfMonitorAMD); 2372 struct marshal_cmd_EndPerfMonitorAMD *cmd; 2373 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EndPerfMonitorAMD, cmd_size); 2374 cmd->monitor = monitor; 2375} 2376 2377 2378/* GetPerfMonitorCounterDataAMD: marshalled synchronously */ 2379void GLAPIENTRY 2380_mesa_marshal_GetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten) 2381{ 2382 GET_CURRENT_CONTEXT(ctx); 2383 _mesa_glthread_finish_before(ctx, "GetPerfMonitorCounterDataAMD"); 2384 CALL_GetPerfMonitorCounterDataAMD(ctx->CurrentServerDispatch, (monitor, pname, dataSize, data, bytesWritten)); 2385} 2386 2387 2388/* CopyImageSubDataNV: marshalled asynchronously */ 2389struct marshal_cmd_CopyImageSubDataNV 2390{ 2391 struct marshal_cmd_base cmd_base; 2392 GLuint srcName; 2393 GLenum srcTarget; 2394 GLint srcLevel; 2395 GLint srcX; 2396 GLint srcY; 2397 GLint srcZ; 2398 GLuint dstName; 2399 GLenum dstTarget; 2400 GLint dstLevel; 2401 GLint dstX; 2402 GLint dstY; 2403 GLint dstZ; 2404 GLsizei width; 2405 GLsizei height; 2406 GLsizei depth; 2407}; 2408uint32_t 2409_mesa_unmarshal_CopyImageSubDataNV(struct gl_context *ctx, const struct marshal_cmd_CopyImageSubDataNV *cmd, const uint64_t *last) 2410{ 2411 GLuint srcName = cmd->srcName; 2412 GLenum srcTarget = cmd->srcTarget; 2413 GLint srcLevel = cmd->srcLevel; 2414 GLint srcX = cmd->srcX; 2415 GLint srcY = cmd->srcY; 2416 GLint srcZ = cmd->srcZ; 2417 GLuint dstName = cmd->dstName; 2418 GLenum dstTarget = cmd->dstTarget; 2419 GLint dstLevel = cmd->dstLevel; 2420 GLint dstX = cmd->dstX; 2421 GLint dstY = cmd->dstY; 2422 GLint dstZ = cmd->dstZ; 2423 GLsizei width = cmd->width; 2424 GLsizei height = cmd->height; 2425 GLsizei depth = cmd->depth; 2426 CALL_CopyImageSubDataNV(ctx->CurrentServerDispatch, (srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth)); 2427 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyImageSubDataNV), 8) / 8); 2428 assert (cmd_size == cmd->cmd_base.cmd_size); 2429 return cmd_size; 2430} 2431void GLAPIENTRY 2432_mesa_marshal_CopyImageSubDataNV(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth) 2433{ 2434 GET_CURRENT_CONTEXT(ctx); 2435 int cmd_size = sizeof(struct marshal_cmd_CopyImageSubDataNV); 2436 struct marshal_cmd_CopyImageSubDataNV *cmd; 2437 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyImageSubDataNV, cmd_size); 2438 cmd->srcName = srcName; 2439 cmd->srcTarget = srcTarget; 2440 cmd->srcLevel = srcLevel; 2441 cmd->srcX = srcX; 2442 cmd->srcY = srcY; 2443 cmd->srcZ = srcZ; 2444 cmd->dstName = dstName; 2445 cmd->dstTarget = dstTarget; 2446 cmd->dstLevel = dstLevel; 2447 cmd->dstX = dstX; 2448 cmd->dstY = dstY; 2449 cmd->dstZ = dstZ; 2450 cmd->width = width; 2451 cmd->height = height; 2452 cmd->depth = depth; 2453} 2454 2455 2456/* MatrixLoadfEXT: marshalled asynchronously */ 2457struct marshal_cmd_MatrixLoadfEXT 2458{ 2459 struct marshal_cmd_base cmd_base; 2460 GLenum matrixMode; 2461 GLfloat m[16]; 2462}; 2463uint32_t 2464_mesa_unmarshal_MatrixLoadfEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixLoadfEXT *cmd, const uint64_t *last) 2465{ 2466 GLenum matrixMode = cmd->matrixMode; 2467 const GLfloat * m = cmd->m; 2468 CALL_MatrixLoadfEXT(ctx->CurrentServerDispatch, (matrixMode, m)); 2469 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixLoadfEXT), 8) / 8); 2470 assert (cmd_size == cmd->cmd_base.cmd_size); 2471 return cmd_size; 2472} 2473void GLAPIENTRY 2474_mesa_marshal_MatrixLoadfEXT(GLenum matrixMode, const GLfloat * m) 2475{ 2476 GET_CURRENT_CONTEXT(ctx); 2477 int cmd_size = sizeof(struct marshal_cmd_MatrixLoadfEXT); 2478 struct marshal_cmd_MatrixLoadfEXT *cmd; 2479 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixLoadfEXT, cmd_size); 2480 cmd->matrixMode = matrixMode; 2481 memcpy(cmd->m, m, 16 * sizeof(GLfloat)); 2482} 2483 2484 2485/* MatrixLoaddEXT: marshalled asynchronously */ 2486struct marshal_cmd_MatrixLoaddEXT 2487{ 2488 struct marshal_cmd_base cmd_base; 2489 GLenum matrixMode; 2490 GLdouble m[16]; 2491}; 2492uint32_t 2493_mesa_unmarshal_MatrixLoaddEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixLoaddEXT *cmd, const uint64_t *last) 2494{ 2495 GLenum matrixMode = cmd->matrixMode; 2496 const GLdouble * m = cmd->m; 2497 CALL_MatrixLoaddEXT(ctx->CurrentServerDispatch, (matrixMode, m)); 2498 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixLoaddEXT), 8) / 8); 2499 assert (cmd_size == cmd->cmd_base.cmd_size); 2500 return cmd_size; 2501} 2502void GLAPIENTRY 2503_mesa_marshal_MatrixLoaddEXT(GLenum matrixMode, const GLdouble * m) 2504{ 2505 GET_CURRENT_CONTEXT(ctx); 2506 int cmd_size = sizeof(struct marshal_cmd_MatrixLoaddEXT); 2507 struct marshal_cmd_MatrixLoaddEXT *cmd; 2508 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixLoaddEXT, cmd_size); 2509 cmd->matrixMode = matrixMode; 2510 memcpy(cmd->m, m, 16 * sizeof(GLdouble)); 2511} 2512 2513 2514/* MatrixMultfEXT: marshalled asynchronously */ 2515struct marshal_cmd_MatrixMultfEXT 2516{ 2517 struct marshal_cmd_base cmd_base; 2518 GLenum matrixMode; 2519 GLfloat m[16]; 2520}; 2521uint32_t 2522_mesa_unmarshal_MatrixMultfEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixMultfEXT *cmd, const uint64_t *last) 2523{ 2524 GLenum matrixMode = cmd->matrixMode; 2525 const GLfloat * m = cmd->m; 2526 CALL_MatrixMultfEXT(ctx->CurrentServerDispatch, (matrixMode, m)); 2527 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixMultfEXT), 8) / 8); 2528 assert (cmd_size == cmd->cmd_base.cmd_size); 2529 return cmd_size; 2530} 2531void GLAPIENTRY 2532_mesa_marshal_MatrixMultfEXT(GLenum matrixMode, const GLfloat * m) 2533{ 2534 GET_CURRENT_CONTEXT(ctx); 2535 int cmd_size = sizeof(struct marshal_cmd_MatrixMultfEXT); 2536 struct marshal_cmd_MatrixMultfEXT *cmd; 2537 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixMultfEXT, cmd_size); 2538 cmd->matrixMode = matrixMode; 2539 memcpy(cmd->m, m, 16 * sizeof(GLfloat)); 2540} 2541 2542 2543/* MatrixMultdEXT: marshalled asynchronously */ 2544struct marshal_cmd_MatrixMultdEXT 2545{ 2546 struct marshal_cmd_base cmd_base; 2547 GLenum matrixMode; 2548 GLdouble m[16]; 2549}; 2550uint32_t 2551_mesa_unmarshal_MatrixMultdEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixMultdEXT *cmd, const uint64_t *last) 2552{ 2553 GLenum matrixMode = cmd->matrixMode; 2554 const GLdouble * m = cmd->m; 2555 CALL_MatrixMultdEXT(ctx->CurrentServerDispatch, (matrixMode, m)); 2556 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixMultdEXT), 8) / 8); 2557 assert (cmd_size == cmd->cmd_base.cmd_size); 2558 return cmd_size; 2559} 2560void GLAPIENTRY 2561_mesa_marshal_MatrixMultdEXT(GLenum matrixMode, const GLdouble * m) 2562{ 2563 GET_CURRENT_CONTEXT(ctx); 2564 int cmd_size = sizeof(struct marshal_cmd_MatrixMultdEXT); 2565 struct marshal_cmd_MatrixMultdEXT *cmd; 2566 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixMultdEXT, cmd_size); 2567 cmd->matrixMode = matrixMode; 2568 memcpy(cmd->m, m, 16 * sizeof(GLdouble)); 2569} 2570 2571 2572/* MatrixLoadIdentityEXT: marshalled asynchronously */ 2573struct marshal_cmd_MatrixLoadIdentityEXT 2574{ 2575 struct marshal_cmd_base cmd_base; 2576 GLenum matrixMode; 2577}; 2578uint32_t 2579_mesa_unmarshal_MatrixLoadIdentityEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixLoadIdentityEXT *cmd, const uint64_t *last) 2580{ 2581 GLenum matrixMode = cmd->matrixMode; 2582 CALL_MatrixLoadIdentityEXT(ctx->CurrentServerDispatch, (matrixMode)); 2583 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixLoadIdentityEXT), 8) / 8); 2584 assert (cmd_size == cmd->cmd_base.cmd_size); 2585 return cmd_size; 2586} 2587void GLAPIENTRY 2588_mesa_marshal_MatrixLoadIdentityEXT(GLenum matrixMode) 2589{ 2590 GET_CURRENT_CONTEXT(ctx); 2591 int cmd_size = sizeof(struct marshal_cmd_MatrixLoadIdentityEXT); 2592 struct marshal_cmd_MatrixLoadIdentityEXT *cmd; 2593 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixLoadIdentityEXT, cmd_size); 2594 cmd->matrixMode = matrixMode; 2595} 2596 2597 2598/* MatrixRotatefEXT: marshalled asynchronously */ 2599struct marshal_cmd_MatrixRotatefEXT 2600{ 2601 struct marshal_cmd_base cmd_base; 2602 GLenum matrixMode; 2603 GLfloat angle; 2604 GLfloat x; 2605 GLfloat y; 2606 GLfloat z; 2607}; 2608uint32_t 2609_mesa_unmarshal_MatrixRotatefEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixRotatefEXT *cmd, const uint64_t *last) 2610{ 2611 GLenum matrixMode = cmd->matrixMode; 2612 GLfloat angle = cmd->angle; 2613 GLfloat x = cmd->x; 2614 GLfloat y = cmd->y; 2615 GLfloat z = cmd->z; 2616 CALL_MatrixRotatefEXT(ctx->CurrentServerDispatch, (matrixMode, angle, x, y, z)); 2617 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixRotatefEXT), 8) / 8); 2618 assert (cmd_size == cmd->cmd_base.cmd_size); 2619 return cmd_size; 2620} 2621void GLAPIENTRY 2622_mesa_marshal_MatrixRotatefEXT(GLenum matrixMode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) 2623{ 2624 GET_CURRENT_CONTEXT(ctx); 2625 int cmd_size = sizeof(struct marshal_cmd_MatrixRotatefEXT); 2626 struct marshal_cmd_MatrixRotatefEXT *cmd; 2627 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixRotatefEXT, cmd_size); 2628 cmd->matrixMode = matrixMode; 2629 cmd->angle = angle; 2630 cmd->x = x; 2631 cmd->y = y; 2632 cmd->z = z; 2633} 2634 2635 2636/* MatrixRotatedEXT: marshalled asynchronously */ 2637struct marshal_cmd_MatrixRotatedEXT 2638{ 2639 struct marshal_cmd_base cmd_base; 2640 GLenum matrixMode; 2641 GLdouble angle; 2642 GLdouble x; 2643 GLdouble y; 2644 GLdouble z; 2645}; 2646uint32_t 2647_mesa_unmarshal_MatrixRotatedEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixRotatedEXT *cmd, const uint64_t *last) 2648{ 2649 GLenum matrixMode = cmd->matrixMode; 2650 GLdouble angle = cmd->angle; 2651 GLdouble x = cmd->x; 2652 GLdouble y = cmd->y; 2653 GLdouble z = cmd->z; 2654 CALL_MatrixRotatedEXT(ctx->CurrentServerDispatch, (matrixMode, angle, x, y, z)); 2655 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixRotatedEXT), 8) / 8); 2656 assert (cmd_size == cmd->cmd_base.cmd_size); 2657 return cmd_size; 2658} 2659void GLAPIENTRY 2660_mesa_marshal_MatrixRotatedEXT(GLenum matrixMode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z) 2661{ 2662 GET_CURRENT_CONTEXT(ctx); 2663 int cmd_size = sizeof(struct marshal_cmd_MatrixRotatedEXT); 2664 struct marshal_cmd_MatrixRotatedEXT *cmd; 2665 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixRotatedEXT, cmd_size); 2666 cmd->matrixMode = matrixMode; 2667 cmd->angle = angle; 2668 cmd->x = x; 2669 cmd->y = y; 2670 cmd->z = z; 2671} 2672 2673 2674/* MatrixScalefEXT: marshalled asynchronously */ 2675struct marshal_cmd_MatrixScalefEXT 2676{ 2677 struct marshal_cmd_base cmd_base; 2678 GLenum matrixMode; 2679 GLfloat x; 2680 GLfloat y; 2681 GLfloat z; 2682}; 2683uint32_t 2684_mesa_unmarshal_MatrixScalefEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixScalefEXT *cmd, const uint64_t *last) 2685{ 2686 GLenum matrixMode = cmd->matrixMode; 2687 GLfloat x = cmd->x; 2688 GLfloat y = cmd->y; 2689 GLfloat z = cmd->z; 2690 CALL_MatrixScalefEXT(ctx->CurrentServerDispatch, (matrixMode, x, y, z)); 2691 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixScalefEXT), 8) / 8); 2692 assert (cmd_size == cmd->cmd_base.cmd_size); 2693 return cmd_size; 2694} 2695void GLAPIENTRY 2696_mesa_marshal_MatrixScalefEXT(GLenum matrixMode, GLfloat x, GLfloat y, GLfloat z) 2697{ 2698 GET_CURRENT_CONTEXT(ctx); 2699 int cmd_size = sizeof(struct marshal_cmd_MatrixScalefEXT); 2700 struct marshal_cmd_MatrixScalefEXT *cmd; 2701 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixScalefEXT, cmd_size); 2702 cmd->matrixMode = matrixMode; 2703 cmd->x = x; 2704 cmd->y = y; 2705 cmd->z = z; 2706} 2707 2708 2709/* MatrixScaledEXT: marshalled asynchronously */ 2710struct marshal_cmd_MatrixScaledEXT 2711{ 2712 struct marshal_cmd_base cmd_base; 2713 GLenum matrixMode; 2714 GLdouble x; 2715 GLdouble y; 2716 GLdouble z; 2717}; 2718uint32_t 2719_mesa_unmarshal_MatrixScaledEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixScaledEXT *cmd, const uint64_t *last) 2720{ 2721 GLenum matrixMode = cmd->matrixMode; 2722 GLdouble x = cmd->x; 2723 GLdouble y = cmd->y; 2724 GLdouble z = cmd->z; 2725 CALL_MatrixScaledEXT(ctx->CurrentServerDispatch, (matrixMode, x, y, z)); 2726 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixScaledEXT), 8) / 8); 2727 assert (cmd_size == cmd->cmd_base.cmd_size); 2728 return cmd_size; 2729} 2730void GLAPIENTRY 2731_mesa_marshal_MatrixScaledEXT(GLenum matrixMode, GLdouble x, GLdouble y, GLdouble z) 2732{ 2733 GET_CURRENT_CONTEXT(ctx); 2734 int cmd_size = sizeof(struct marshal_cmd_MatrixScaledEXT); 2735 struct marshal_cmd_MatrixScaledEXT *cmd; 2736 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixScaledEXT, cmd_size); 2737 cmd->matrixMode = matrixMode; 2738 cmd->x = x; 2739 cmd->y = y; 2740 cmd->z = z; 2741} 2742 2743 2744/* MatrixTranslatefEXT: marshalled asynchronously */ 2745struct marshal_cmd_MatrixTranslatefEXT 2746{ 2747 struct marshal_cmd_base cmd_base; 2748 GLenum matrixMode; 2749 GLfloat x; 2750 GLfloat y; 2751 GLfloat z; 2752}; 2753uint32_t 2754_mesa_unmarshal_MatrixTranslatefEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixTranslatefEXT *cmd, const uint64_t *last) 2755{ 2756 GLenum matrixMode = cmd->matrixMode; 2757 GLfloat x = cmd->x; 2758 GLfloat y = cmd->y; 2759 GLfloat z = cmd->z; 2760 CALL_MatrixTranslatefEXT(ctx->CurrentServerDispatch, (matrixMode, x, y, z)); 2761 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixTranslatefEXT), 8) / 8); 2762 assert (cmd_size == cmd->cmd_base.cmd_size); 2763 return cmd_size; 2764} 2765void GLAPIENTRY 2766_mesa_marshal_MatrixTranslatefEXT(GLenum matrixMode, GLfloat x, GLfloat y, GLfloat z) 2767{ 2768 GET_CURRENT_CONTEXT(ctx); 2769 int cmd_size = sizeof(struct marshal_cmd_MatrixTranslatefEXT); 2770 struct marshal_cmd_MatrixTranslatefEXT *cmd; 2771 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixTranslatefEXT, cmd_size); 2772 cmd->matrixMode = matrixMode; 2773 cmd->x = x; 2774 cmd->y = y; 2775 cmd->z = z; 2776} 2777 2778 2779/* MatrixTranslatedEXT: marshalled asynchronously */ 2780struct marshal_cmd_MatrixTranslatedEXT 2781{ 2782 struct marshal_cmd_base cmd_base; 2783 GLenum matrixMode; 2784 GLdouble x; 2785 GLdouble y; 2786 GLdouble z; 2787}; 2788uint32_t 2789_mesa_unmarshal_MatrixTranslatedEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixTranslatedEXT *cmd, const uint64_t *last) 2790{ 2791 GLenum matrixMode = cmd->matrixMode; 2792 GLdouble x = cmd->x; 2793 GLdouble y = cmd->y; 2794 GLdouble z = cmd->z; 2795 CALL_MatrixTranslatedEXT(ctx->CurrentServerDispatch, (matrixMode, x, y, z)); 2796 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixTranslatedEXT), 8) / 8); 2797 assert (cmd_size == cmd->cmd_base.cmd_size); 2798 return cmd_size; 2799} 2800void GLAPIENTRY 2801_mesa_marshal_MatrixTranslatedEXT(GLenum matrixMode, GLdouble x, GLdouble y, GLdouble z) 2802{ 2803 GET_CURRENT_CONTEXT(ctx); 2804 int cmd_size = sizeof(struct marshal_cmd_MatrixTranslatedEXT); 2805 struct marshal_cmd_MatrixTranslatedEXT *cmd; 2806 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixTranslatedEXT, cmd_size); 2807 cmd->matrixMode = matrixMode; 2808 cmd->x = x; 2809 cmd->y = y; 2810 cmd->z = z; 2811} 2812 2813 2814/* MatrixOrthoEXT: marshalled asynchronously */ 2815struct marshal_cmd_MatrixOrthoEXT 2816{ 2817 struct marshal_cmd_base cmd_base; 2818 GLenum matrixMode; 2819 GLdouble l; 2820 GLdouble r; 2821 GLdouble b; 2822 GLdouble t; 2823 GLdouble n; 2824 GLdouble f; 2825}; 2826uint32_t 2827_mesa_unmarshal_MatrixOrthoEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixOrthoEXT *cmd, const uint64_t *last) 2828{ 2829 GLenum matrixMode = cmd->matrixMode; 2830 GLdouble l = cmd->l; 2831 GLdouble r = cmd->r; 2832 GLdouble b = cmd->b; 2833 GLdouble t = cmd->t; 2834 GLdouble n = cmd->n; 2835 GLdouble f = cmd->f; 2836 CALL_MatrixOrthoEXT(ctx->CurrentServerDispatch, (matrixMode, l, r, b, t, n, f)); 2837 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixOrthoEXT), 8) / 8); 2838 assert (cmd_size == cmd->cmd_base.cmd_size); 2839 return cmd_size; 2840} 2841void GLAPIENTRY 2842_mesa_marshal_MatrixOrthoEXT(GLenum matrixMode, GLdouble l, GLdouble r, GLdouble b, GLdouble t, GLdouble n, GLdouble f) 2843{ 2844 GET_CURRENT_CONTEXT(ctx); 2845 int cmd_size = sizeof(struct marshal_cmd_MatrixOrthoEXT); 2846 struct marshal_cmd_MatrixOrthoEXT *cmd; 2847 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixOrthoEXT, cmd_size); 2848 cmd->matrixMode = matrixMode; 2849 cmd->l = l; 2850 cmd->r = r; 2851 cmd->b = b; 2852 cmd->t = t; 2853 cmd->n = n; 2854 cmd->f = f; 2855} 2856 2857 2858/* MatrixFrustumEXT: marshalled asynchronously */ 2859struct marshal_cmd_MatrixFrustumEXT 2860{ 2861 struct marshal_cmd_base cmd_base; 2862 GLenum matrixMode; 2863 GLdouble l; 2864 GLdouble r; 2865 GLdouble b; 2866 GLdouble t; 2867 GLdouble n; 2868 GLdouble f; 2869}; 2870uint32_t 2871_mesa_unmarshal_MatrixFrustumEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixFrustumEXT *cmd, const uint64_t *last) 2872{ 2873 GLenum matrixMode = cmd->matrixMode; 2874 GLdouble l = cmd->l; 2875 GLdouble r = cmd->r; 2876 GLdouble b = cmd->b; 2877 GLdouble t = cmd->t; 2878 GLdouble n = cmd->n; 2879 GLdouble f = cmd->f; 2880 CALL_MatrixFrustumEXT(ctx->CurrentServerDispatch, (matrixMode, l, r, b, t, n, f)); 2881 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixFrustumEXT), 8) / 8); 2882 assert (cmd_size == cmd->cmd_base.cmd_size); 2883 return cmd_size; 2884} 2885void GLAPIENTRY 2886_mesa_marshal_MatrixFrustumEXT(GLenum matrixMode, GLdouble l, GLdouble r, GLdouble b, GLdouble t, GLdouble n, GLdouble f) 2887{ 2888 GET_CURRENT_CONTEXT(ctx); 2889 int cmd_size = sizeof(struct marshal_cmd_MatrixFrustumEXT); 2890 struct marshal_cmd_MatrixFrustumEXT *cmd; 2891 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixFrustumEXT, cmd_size); 2892 cmd->matrixMode = matrixMode; 2893 cmd->l = l; 2894 cmd->r = r; 2895 cmd->b = b; 2896 cmd->t = t; 2897 cmd->n = n; 2898 cmd->f = f; 2899} 2900 2901 2902/* MatrixPushEXT: marshalled asynchronously */ 2903struct marshal_cmd_MatrixPushEXT 2904{ 2905 struct marshal_cmd_base cmd_base; 2906 GLenum matrixMode; 2907}; 2908uint32_t 2909_mesa_unmarshal_MatrixPushEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixPushEXT *cmd, const uint64_t *last) 2910{ 2911 GLenum matrixMode = cmd->matrixMode; 2912 CALL_MatrixPushEXT(ctx->CurrentServerDispatch, (matrixMode)); 2913 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixPushEXT), 8) / 8); 2914 assert (cmd_size == cmd->cmd_base.cmd_size); 2915 return cmd_size; 2916} 2917void GLAPIENTRY 2918_mesa_marshal_MatrixPushEXT(GLenum matrixMode) 2919{ 2920 GET_CURRENT_CONTEXT(ctx); 2921 int cmd_size = sizeof(struct marshal_cmd_MatrixPushEXT); 2922 struct marshal_cmd_MatrixPushEXT *cmd; 2923 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixPushEXT, cmd_size); 2924 cmd->matrixMode = matrixMode; 2925 _mesa_glthread_MatrixPushEXT(ctx, matrixMode); 2926} 2927 2928 2929/* MatrixPopEXT: marshalled asynchronously */ 2930struct marshal_cmd_MatrixPopEXT 2931{ 2932 struct marshal_cmd_base cmd_base; 2933 GLenum matrixMode; 2934}; 2935uint32_t 2936_mesa_unmarshal_MatrixPopEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixPopEXT *cmd, const uint64_t *last) 2937{ 2938 GLenum matrixMode = cmd->matrixMode; 2939 CALL_MatrixPopEXT(ctx->CurrentServerDispatch, (matrixMode)); 2940 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixPopEXT), 8) / 8); 2941 assert (cmd_size == cmd->cmd_base.cmd_size); 2942 return cmd_size; 2943} 2944void GLAPIENTRY 2945_mesa_marshal_MatrixPopEXT(GLenum matrixMode) 2946{ 2947 GET_CURRENT_CONTEXT(ctx); 2948 int cmd_size = sizeof(struct marshal_cmd_MatrixPopEXT); 2949 struct marshal_cmd_MatrixPopEXT *cmd; 2950 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixPopEXT, cmd_size); 2951 cmd->matrixMode = matrixMode; 2952 _mesa_glthread_MatrixPopEXT(ctx, matrixMode); 2953} 2954 2955 2956/* ClientAttribDefaultEXT: marshalled asynchronously */ 2957struct marshal_cmd_ClientAttribDefaultEXT 2958{ 2959 struct marshal_cmd_base cmd_base; 2960 GLbitfield mask; 2961}; 2962uint32_t 2963_mesa_unmarshal_ClientAttribDefaultEXT(struct gl_context *ctx, const struct marshal_cmd_ClientAttribDefaultEXT *cmd, const uint64_t *last) 2964{ 2965 GLbitfield mask = cmd->mask; 2966 CALL_ClientAttribDefaultEXT(ctx->CurrentServerDispatch, (mask)); 2967 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ClientAttribDefaultEXT), 8) / 8); 2968 assert (cmd_size == cmd->cmd_base.cmd_size); 2969 return cmd_size; 2970} 2971void GLAPIENTRY 2972_mesa_marshal_ClientAttribDefaultEXT(GLbitfield mask) 2973{ 2974 GET_CURRENT_CONTEXT(ctx); 2975 int cmd_size = sizeof(struct marshal_cmd_ClientAttribDefaultEXT); 2976 struct marshal_cmd_ClientAttribDefaultEXT *cmd; 2977 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ClientAttribDefaultEXT, cmd_size); 2978 cmd->mask = mask; 2979 if (COMPAT) _mesa_glthread_ClientAttribDefault(ctx, mask); 2980} 2981 2982 2983/* PushClientAttribDefaultEXT: marshalled asynchronously */ 2984struct marshal_cmd_PushClientAttribDefaultEXT 2985{ 2986 struct marshal_cmd_base cmd_base; 2987 GLbitfield mask; 2988}; 2989uint32_t 2990_mesa_unmarshal_PushClientAttribDefaultEXT(struct gl_context *ctx, const struct marshal_cmd_PushClientAttribDefaultEXT *cmd, const uint64_t *last) 2991{ 2992 GLbitfield mask = cmd->mask; 2993 CALL_PushClientAttribDefaultEXT(ctx->CurrentServerDispatch, (mask)); 2994 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PushClientAttribDefaultEXT), 8) / 8); 2995 assert (cmd_size == cmd->cmd_base.cmd_size); 2996 return cmd_size; 2997} 2998void GLAPIENTRY 2999_mesa_marshal_PushClientAttribDefaultEXT(GLbitfield mask) 3000{ 3001 GET_CURRENT_CONTEXT(ctx); 3002 int cmd_size = sizeof(struct marshal_cmd_PushClientAttribDefaultEXT); 3003 struct marshal_cmd_PushClientAttribDefaultEXT *cmd; 3004 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PushClientAttribDefaultEXT, cmd_size); 3005 cmd->mask = mask; 3006 if (COMPAT) _mesa_glthread_PushClientAttrib(ctx, mask, true); 3007} 3008 3009 3010/* GetTextureParameterivEXT: marshalled synchronously */ 3011void GLAPIENTRY 3012_mesa_marshal_GetTextureParameterivEXT(GLuint texture, GLenum target, GLenum pname, GLint * params) 3013{ 3014 GET_CURRENT_CONTEXT(ctx); 3015 _mesa_glthread_finish_before(ctx, "GetTextureParameterivEXT"); 3016 CALL_GetTextureParameterivEXT(ctx->CurrentServerDispatch, (texture, target, pname, params)); 3017} 3018 3019 3020/* GetTextureParameterfvEXT: marshalled synchronously */ 3021void GLAPIENTRY 3022_mesa_marshal_GetTextureParameterfvEXT(GLuint texture, GLenum target, GLenum pname, float * params) 3023{ 3024 GET_CURRENT_CONTEXT(ctx); 3025 _mesa_glthread_finish_before(ctx, "GetTextureParameterfvEXT"); 3026 CALL_GetTextureParameterfvEXT(ctx->CurrentServerDispatch, (texture, target, pname, params)); 3027} 3028 3029 3030/* GetTextureLevelParameterivEXT: marshalled synchronously */ 3031void GLAPIENTRY 3032_mesa_marshal_GetTextureLevelParameterivEXT(GLuint texture, GLenum target, GLint level, GLenum pname, GLint * params) 3033{ 3034 GET_CURRENT_CONTEXT(ctx); 3035 _mesa_glthread_finish_before(ctx, "GetTextureLevelParameterivEXT"); 3036 CALL_GetTextureLevelParameterivEXT(ctx->CurrentServerDispatch, (texture, target, level, pname, params)); 3037} 3038 3039 3040/* GetTextureLevelParameterfvEXT: marshalled synchronously */ 3041void GLAPIENTRY 3042_mesa_marshal_GetTextureLevelParameterfvEXT(GLuint texture, GLenum target, GLint level, GLenum pname, float * params) 3043{ 3044 GET_CURRENT_CONTEXT(ctx); 3045 _mesa_glthread_finish_before(ctx, "GetTextureLevelParameterfvEXT"); 3046 CALL_GetTextureLevelParameterfvEXT(ctx->CurrentServerDispatch, (texture, target, level, pname, params)); 3047} 3048 3049 3050/* TextureParameteriEXT: marshalled asynchronously */ 3051struct marshal_cmd_TextureParameteriEXT 3052{ 3053 struct marshal_cmd_base cmd_base; 3054 GLuint texture; 3055 GLenum target; 3056 GLenum pname; 3057 int param; 3058}; 3059uint32_t 3060_mesa_unmarshal_TextureParameteriEXT(struct gl_context *ctx, const struct marshal_cmd_TextureParameteriEXT *cmd, const uint64_t *last) 3061{ 3062 GLuint texture = cmd->texture; 3063 GLenum target = cmd->target; 3064 GLenum pname = cmd->pname; 3065 int param = cmd->param; 3066 CALL_TextureParameteriEXT(ctx->CurrentServerDispatch, (texture, target, pname, param)); 3067 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TextureParameteriEXT), 8) / 8); 3068 assert (cmd_size == cmd->cmd_base.cmd_size); 3069 return cmd_size; 3070} 3071void GLAPIENTRY 3072_mesa_marshal_TextureParameteriEXT(GLuint texture, GLenum target, GLenum pname, int param) 3073{ 3074 GET_CURRENT_CONTEXT(ctx); 3075 int cmd_size = sizeof(struct marshal_cmd_TextureParameteriEXT); 3076 struct marshal_cmd_TextureParameteriEXT *cmd; 3077 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureParameteriEXT, cmd_size); 3078 cmd->texture = texture; 3079 cmd->target = target; 3080 cmd->pname = pname; 3081 cmd->param = param; 3082} 3083 3084 3085/* TextureParameterivEXT: marshalled asynchronously */ 3086struct marshal_cmd_TextureParameterivEXT 3087{ 3088 struct marshal_cmd_base cmd_base; 3089 GLuint texture; 3090 GLenum target; 3091 GLenum pname; 3092 /* Next safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint params[_mesa_tex_param_enum_to_count(pname)] */ 3093}; 3094uint32_t 3095_mesa_unmarshal_TextureParameterivEXT(struct gl_context *ctx, const struct marshal_cmd_TextureParameterivEXT *cmd, const uint64_t *last) 3096{ 3097 GLuint texture = cmd->texture; 3098 GLenum target = cmd->target; 3099 GLenum pname = cmd->pname; 3100 GLint * params; 3101 const char *variable_data = (const char *) (cmd + 1); 3102 params = (GLint *) variable_data; 3103 CALL_TextureParameterivEXT(ctx->CurrentServerDispatch, (texture, target, pname, params)); 3104 return cmd->cmd_base.cmd_size; 3105} 3106void GLAPIENTRY 3107_mesa_marshal_TextureParameterivEXT(GLuint texture, GLenum target, GLenum pname, const GLint * params) 3108{ 3109 GET_CURRENT_CONTEXT(ctx); 3110 int params_size = safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLint)); 3111 int cmd_size = sizeof(struct marshal_cmd_TextureParameterivEXT) + params_size; 3112 struct marshal_cmd_TextureParameterivEXT *cmd; 3113 if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 3114 _mesa_glthread_finish_before(ctx, "TextureParameterivEXT"); 3115 CALL_TextureParameterivEXT(ctx->CurrentServerDispatch, (texture, target, pname, params)); 3116 return; 3117 } 3118 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureParameterivEXT, cmd_size); 3119 cmd->texture = texture; 3120 cmd->target = target; 3121 cmd->pname = pname; 3122 char *variable_data = (char *) (cmd + 1); 3123 memcpy(variable_data, params, params_size); 3124} 3125 3126 3127/* TextureParameterfEXT: marshalled asynchronously */ 3128struct marshal_cmd_TextureParameterfEXT 3129{ 3130 struct marshal_cmd_base cmd_base; 3131 GLuint texture; 3132 GLenum target; 3133 GLenum pname; 3134 float param; 3135}; 3136uint32_t 3137_mesa_unmarshal_TextureParameterfEXT(struct gl_context *ctx, const struct marshal_cmd_TextureParameterfEXT *cmd, const uint64_t *last) 3138{ 3139 GLuint texture = cmd->texture; 3140 GLenum target = cmd->target; 3141 GLenum pname = cmd->pname; 3142 float param = cmd->param; 3143 CALL_TextureParameterfEXT(ctx->CurrentServerDispatch, (texture, target, pname, param)); 3144 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TextureParameterfEXT), 8) / 8); 3145 assert (cmd_size == cmd->cmd_base.cmd_size); 3146 return cmd_size; 3147} 3148void GLAPIENTRY 3149_mesa_marshal_TextureParameterfEXT(GLuint texture, GLenum target, GLenum pname, float param) 3150{ 3151 GET_CURRENT_CONTEXT(ctx); 3152 int cmd_size = sizeof(struct marshal_cmd_TextureParameterfEXT); 3153 struct marshal_cmd_TextureParameterfEXT *cmd; 3154 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureParameterfEXT, cmd_size); 3155 cmd->texture = texture; 3156 cmd->target = target; 3157 cmd->pname = pname; 3158 cmd->param = param; 3159} 3160 3161 3162/* TextureParameterfvEXT: marshalled asynchronously */ 3163struct marshal_cmd_TextureParameterfvEXT 3164{ 3165 struct marshal_cmd_base cmd_base; 3166 GLuint texture; 3167 GLenum target; 3168 GLenum pname; 3169 /* Next safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(float)) bytes are float params[_mesa_tex_param_enum_to_count(pname)] */ 3170}; 3171uint32_t 3172_mesa_unmarshal_TextureParameterfvEXT(struct gl_context *ctx, const struct marshal_cmd_TextureParameterfvEXT *cmd, const uint64_t *last) 3173{ 3174 GLuint texture = cmd->texture; 3175 GLenum target = cmd->target; 3176 GLenum pname = cmd->pname; 3177 float * params; 3178 const char *variable_data = (const char *) (cmd + 1); 3179 params = (float *) variable_data; 3180 CALL_TextureParameterfvEXT(ctx->CurrentServerDispatch, (texture, target, pname, params)); 3181 return cmd->cmd_base.cmd_size; 3182} 3183void GLAPIENTRY 3184_mesa_marshal_TextureParameterfvEXT(GLuint texture, GLenum target, GLenum pname, const float * params) 3185{ 3186 GET_CURRENT_CONTEXT(ctx); 3187 int params_size = safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(float)); 3188 int cmd_size = sizeof(struct marshal_cmd_TextureParameterfvEXT) + params_size; 3189 struct marshal_cmd_TextureParameterfvEXT *cmd; 3190 if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 3191 _mesa_glthread_finish_before(ctx, "TextureParameterfvEXT"); 3192 CALL_TextureParameterfvEXT(ctx->CurrentServerDispatch, (texture, target, pname, params)); 3193 return; 3194 } 3195 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureParameterfvEXT, cmd_size); 3196 cmd->texture = texture; 3197 cmd->target = target; 3198 cmd->pname = pname; 3199 char *variable_data = (char *) (cmd + 1); 3200 memcpy(variable_data, params, params_size); 3201} 3202 3203 3204/* TextureImage1DEXT: marshalled asynchronously */ 3205struct marshal_cmd_TextureImage1DEXT 3206{ 3207 struct marshal_cmd_base cmd_base; 3208 GLuint texture; 3209 GLenum target; 3210 GLint level; 3211 GLint internalFormat; 3212 GLsizei width; 3213 GLint border; 3214 GLenum format; 3215 GLenum type; 3216 const GLvoid * pixels; 3217}; 3218uint32_t 3219_mesa_unmarshal_TextureImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_TextureImage1DEXT *cmd, const uint64_t *last) 3220{ 3221 GLuint texture = cmd->texture; 3222 GLenum target = cmd->target; 3223 GLint level = cmd->level; 3224 GLint internalFormat = cmd->internalFormat; 3225 GLsizei width = cmd->width; 3226 GLint border = cmd->border; 3227 GLenum format = cmd->format; 3228 GLenum type = cmd->type; 3229 const GLvoid * pixels = cmd->pixels; 3230 CALL_TextureImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, border, format, type, pixels)); 3231 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TextureImage1DEXT), 8) / 8); 3232 assert (cmd_size == cmd->cmd_base.cmd_size); 3233 return cmd_size; 3234} 3235void GLAPIENTRY 3236_mesa_marshal_TextureImage1DEXT(GLuint texture, GLenum target, GLint level, GLint internalFormat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels) 3237{ 3238 GET_CURRENT_CONTEXT(ctx); 3239 int cmd_size = sizeof(struct marshal_cmd_TextureImage1DEXT); 3240 struct marshal_cmd_TextureImage1DEXT *cmd; 3241 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 3242 _mesa_glthread_finish_before(ctx, "TextureImage1DEXT"); 3243 CALL_TextureImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, border, format, type, pixels)); 3244 return; 3245 } 3246 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureImage1DEXT, cmd_size); 3247 cmd->texture = texture; 3248 cmd->target = target; 3249 cmd->level = level; 3250 cmd->internalFormat = internalFormat; 3251 cmd->width = width; 3252 cmd->border = border; 3253 cmd->format = format; 3254 cmd->type = type; 3255 cmd->pixels = pixels; 3256} 3257 3258 3259/* TextureImage2DEXT: marshalled asynchronously */ 3260struct marshal_cmd_TextureImage2DEXT 3261{ 3262 struct marshal_cmd_base cmd_base; 3263 GLuint texture; 3264 GLenum target; 3265 GLint level; 3266 GLint internalFormat; 3267 GLsizei width; 3268 GLsizei height; 3269 GLint border; 3270 GLenum format; 3271 GLenum type; 3272 const GLvoid * pixels; 3273}; 3274uint32_t 3275_mesa_unmarshal_TextureImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_TextureImage2DEXT *cmd, const uint64_t *last) 3276{ 3277 GLuint texture = cmd->texture; 3278 GLenum target = cmd->target; 3279 GLint level = cmd->level; 3280 GLint internalFormat = cmd->internalFormat; 3281 GLsizei width = cmd->width; 3282 GLsizei height = cmd->height; 3283 GLint border = cmd->border; 3284 GLenum format = cmd->format; 3285 GLenum type = cmd->type; 3286 const GLvoid * pixels = cmd->pixels; 3287 CALL_TextureImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, height, border, format, type, pixels)); 3288 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TextureImage2DEXT), 8) / 8); 3289 assert (cmd_size == cmd->cmd_base.cmd_size); 3290 return cmd_size; 3291} 3292void GLAPIENTRY 3293_mesa_marshal_TextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels) 3294{ 3295 GET_CURRENT_CONTEXT(ctx); 3296 int cmd_size = sizeof(struct marshal_cmd_TextureImage2DEXT); 3297 struct marshal_cmd_TextureImage2DEXT *cmd; 3298 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 3299 _mesa_glthread_finish_before(ctx, "TextureImage2DEXT"); 3300 CALL_TextureImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, height, border, format, type, pixels)); 3301 return; 3302 } 3303 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureImage2DEXT, cmd_size); 3304 cmd->texture = texture; 3305 cmd->target = target; 3306 cmd->level = level; 3307 cmd->internalFormat = internalFormat; 3308 cmd->width = width; 3309 cmd->height = height; 3310 cmd->border = border; 3311 cmd->format = format; 3312 cmd->type = type; 3313 cmd->pixels = pixels; 3314} 3315 3316 3317/* TextureImage3DEXT: marshalled asynchronously */ 3318struct marshal_cmd_TextureImage3DEXT 3319{ 3320 struct marshal_cmd_base cmd_base; 3321 GLuint texture; 3322 GLenum target; 3323 GLint level; 3324 GLint internalFormat; 3325 GLsizei width; 3326 GLsizei height; 3327 GLsizei depth; 3328 GLint border; 3329 GLenum format; 3330 GLenum type; 3331 const GLvoid * pixels; 3332}; 3333uint32_t 3334_mesa_unmarshal_TextureImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_TextureImage3DEXT *cmd, const uint64_t *last) 3335{ 3336 GLuint texture = cmd->texture; 3337 GLenum target = cmd->target; 3338 GLint level = cmd->level; 3339 GLint internalFormat = cmd->internalFormat; 3340 GLsizei width = cmd->width; 3341 GLsizei height = cmd->height; 3342 GLsizei depth = cmd->depth; 3343 GLint border = cmd->border; 3344 GLenum format = cmd->format; 3345 GLenum type = cmd->type; 3346 const GLvoid * pixels = cmd->pixels; 3347 CALL_TextureImage3DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, height, depth, border, format, type, pixels)); 3348 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TextureImage3DEXT), 8) / 8); 3349 assert (cmd_size == cmd->cmd_base.cmd_size); 3350 return cmd_size; 3351} 3352void GLAPIENTRY 3353_mesa_marshal_TextureImage3DEXT(GLuint texture, GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) 3354{ 3355 GET_CURRENT_CONTEXT(ctx); 3356 int cmd_size = sizeof(struct marshal_cmd_TextureImage3DEXT); 3357 struct marshal_cmd_TextureImage3DEXT *cmd; 3358 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 3359 _mesa_glthread_finish_before(ctx, "TextureImage3DEXT"); 3360 CALL_TextureImage3DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, height, depth, border, format, type, pixels)); 3361 return; 3362 } 3363 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureImage3DEXT, cmd_size); 3364 cmd->texture = texture; 3365 cmd->target = target; 3366 cmd->level = level; 3367 cmd->internalFormat = internalFormat; 3368 cmd->width = width; 3369 cmd->height = height; 3370 cmd->depth = depth; 3371 cmd->border = border; 3372 cmd->format = format; 3373 cmd->type = type; 3374 cmd->pixels = pixels; 3375} 3376 3377 3378/* TextureSubImage1DEXT: marshalled asynchronously */ 3379struct marshal_cmd_TextureSubImage1DEXT 3380{ 3381 struct marshal_cmd_base cmd_base; 3382 GLuint texture; 3383 GLenum target; 3384 GLint level; 3385 GLint xoffset; 3386 GLsizei width; 3387 GLenum format; 3388 GLenum type; 3389 const GLvoid * pixels; 3390}; 3391uint32_t 3392_mesa_unmarshal_TextureSubImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_TextureSubImage1DEXT *cmd, const uint64_t *last) 3393{ 3394 GLuint texture = cmd->texture; 3395 GLenum target = cmd->target; 3396 GLint level = cmd->level; 3397 GLint xoffset = cmd->xoffset; 3398 GLsizei width = cmd->width; 3399 GLenum format = cmd->format; 3400 GLenum type = cmd->type; 3401 const GLvoid * pixels = cmd->pixels; 3402 CALL_TextureSubImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, width, format, type, pixels)); 3403 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TextureSubImage1DEXT), 8) / 8); 3404 assert (cmd_size == cmd->cmd_base.cmd_size); 3405 return cmd_size; 3406} 3407void GLAPIENTRY 3408_mesa_marshal_TextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) 3409{ 3410 GET_CURRENT_CONTEXT(ctx); 3411 int cmd_size = sizeof(struct marshal_cmd_TextureSubImage1DEXT); 3412 struct marshal_cmd_TextureSubImage1DEXT *cmd; 3413 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 3414 _mesa_glthread_finish_before(ctx, "TextureSubImage1DEXT"); 3415 CALL_TextureSubImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, width, format, type, pixels)); 3416 return; 3417 } 3418 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureSubImage1DEXT, cmd_size); 3419 cmd->texture = texture; 3420 cmd->target = target; 3421 cmd->level = level; 3422 cmd->xoffset = xoffset; 3423 cmd->width = width; 3424 cmd->format = format; 3425 cmd->type = type; 3426 cmd->pixels = pixels; 3427} 3428 3429 3430/* TextureSubImage2DEXT: marshalled asynchronously */ 3431struct marshal_cmd_TextureSubImage2DEXT 3432{ 3433 struct marshal_cmd_base cmd_base; 3434 GLuint texture; 3435 GLenum target; 3436 GLint level; 3437 GLint xoffset; 3438 GLint yoffset; 3439 GLsizei width; 3440 GLsizei height; 3441 GLenum format; 3442 GLenum type; 3443 const GLvoid * pixels; 3444}; 3445uint32_t 3446_mesa_unmarshal_TextureSubImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_TextureSubImage2DEXT *cmd, const uint64_t *last) 3447{ 3448 GLuint texture = cmd->texture; 3449 GLenum target = cmd->target; 3450 GLint level = cmd->level; 3451 GLint xoffset = cmd->xoffset; 3452 GLint yoffset = cmd->yoffset; 3453 GLsizei width = cmd->width; 3454 GLsizei height = cmd->height; 3455 GLenum format = cmd->format; 3456 GLenum type = cmd->type; 3457 const GLvoid * pixels = cmd->pixels; 3458 CALL_TextureSubImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, width, height, format, type, pixels)); 3459 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TextureSubImage2DEXT), 8) / 8); 3460 assert (cmd_size == cmd->cmd_base.cmd_size); 3461 return cmd_size; 3462} 3463void GLAPIENTRY 3464_mesa_marshal_TextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) 3465{ 3466 GET_CURRENT_CONTEXT(ctx); 3467 int cmd_size = sizeof(struct marshal_cmd_TextureSubImage2DEXT); 3468 struct marshal_cmd_TextureSubImage2DEXT *cmd; 3469 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 3470 _mesa_glthread_finish_before(ctx, "TextureSubImage2DEXT"); 3471 CALL_TextureSubImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, width, height, format, type, pixels)); 3472 return; 3473 } 3474 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureSubImage2DEXT, cmd_size); 3475 cmd->texture = texture; 3476 cmd->target = target; 3477 cmd->level = level; 3478 cmd->xoffset = xoffset; 3479 cmd->yoffset = yoffset; 3480 cmd->width = width; 3481 cmd->height = height; 3482 cmd->format = format; 3483 cmd->type = type; 3484 cmd->pixels = pixels; 3485} 3486 3487 3488/* TextureSubImage3DEXT: marshalled asynchronously */ 3489struct marshal_cmd_TextureSubImage3DEXT 3490{ 3491 struct marshal_cmd_base cmd_base; 3492 GLuint texture; 3493 GLenum target; 3494 GLint level; 3495 GLint xoffset; 3496 GLint yoffset; 3497 GLint zoffset; 3498 GLsizei width; 3499 GLsizei height; 3500 GLsizei depth; 3501 GLenum format; 3502 GLenum type; 3503 const GLvoid * pixels; 3504}; 3505uint32_t 3506_mesa_unmarshal_TextureSubImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_TextureSubImage3DEXT *cmd, const uint64_t *last) 3507{ 3508 GLuint texture = cmd->texture; 3509 GLenum target = cmd->target; 3510 GLint level = cmd->level; 3511 GLint xoffset = cmd->xoffset; 3512 GLint yoffset = cmd->yoffset; 3513 GLint zoffset = cmd->zoffset; 3514 GLsizei width = cmd->width; 3515 GLsizei height = cmd->height; 3516 GLsizei depth = cmd->depth; 3517 GLenum format = cmd->format; 3518 GLenum type = cmd->type; 3519 const GLvoid * pixels = cmd->pixels; 3520 CALL_TextureSubImage3DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels)); 3521 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TextureSubImage3DEXT), 8) / 8); 3522 assert (cmd_size == cmd->cmd_base.cmd_size); 3523 return cmd_size; 3524} 3525void GLAPIENTRY 3526_mesa_marshal_TextureSubImage3DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) 3527{ 3528 GET_CURRENT_CONTEXT(ctx); 3529 int cmd_size = sizeof(struct marshal_cmd_TextureSubImage3DEXT); 3530 struct marshal_cmd_TextureSubImage3DEXT *cmd; 3531 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 3532 _mesa_glthread_finish_before(ctx, "TextureSubImage3DEXT"); 3533 CALL_TextureSubImage3DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels)); 3534 return; 3535 } 3536 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TextureSubImage3DEXT, cmd_size); 3537 cmd->texture = texture; 3538 cmd->target = target; 3539 cmd->level = level; 3540 cmd->xoffset = xoffset; 3541 cmd->yoffset = yoffset; 3542 cmd->zoffset = zoffset; 3543 cmd->width = width; 3544 cmd->height = height; 3545 cmd->depth = depth; 3546 cmd->format = format; 3547 cmd->type = type; 3548 cmd->pixels = pixels; 3549} 3550 3551 3552/* CopyTextureImage1DEXT: marshalled asynchronously */ 3553struct marshal_cmd_CopyTextureImage1DEXT 3554{ 3555 struct marshal_cmd_base cmd_base; 3556 GLuint texture; 3557 GLenum target; 3558 GLint level; 3559 GLenum internalFormat; 3560 GLint x; 3561 GLint y; 3562 GLsizei width; 3563 int border; 3564}; 3565uint32_t 3566_mesa_unmarshal_CopyTextureImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyTextureImage1DEXT *cmd, const uint64_t *last) 3567{ 3568 GLuint texture = cmd->texture; 3569 GLenum target = cmd->target; 3570 GLint level = cmd->level; 3571 GLenum internalFormat = cmd->internalFormat; 3572 GLint x = cmd->x; 3573 GLint y = cmd->y; 3574 GLsizei width = cmd->width; 3575 int border = cmd->border; 3576 CALL_CopyTextureImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, x, y, width, border)); 3577 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyTextureImage1DEXT), 8) / 8); 3578 assert (cmd_size == cmd->cmd_base.cmd_size); 3579 return cmd_size; 3580} 3581void GLAPIENTRY 3582_mesa_marshal_CopyTextureImage1DEXT(GLuint texture, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, int border) 3583{ 3584 GET_CURRENT_CONTEXT(ctx); 3585 int cmd_size = sizeof(struct marshal_cmd_CopyTextureImage1DEXT); 3586 struct marshal_cmd_CopyTextureImage1DEXT *cmd; 3587 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyTextureImage1DEXT, cmd_size); 3588 cmd->texture = texture; 3589 cmd->target = target; 3590 cmd->level = level; 3591 cmd->internalFormat = internalFormat; 3592 cmd->x = x; 3593 cmd->y = y; 3594 cmd->width = width; 3595 cmd->border = border; 3596} 3597 3598 3599/* CopyTextureImage2DEXT: marshalled asynchronously */ 3600struct marshal_cmd_CopyTextureImage2DEXT 3601{ 3602 struct marshal_cmd_base cmd_base; 3603 GLuint texture; 3604 GLenum target; 3605 GLint level; 3606 GLenum internalFormat; 3607 GLint x; 3608 GLint y; 3609 GLsizei width; 3610 GLsizei height; 3611 int border; 3612}; 3613uint32_t 3614_mesa_unmarshal_CopyTextureImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyTextureImage2DEXT *cmd, const uint64_t *last) 3615{ 3616 GLuint texture = cmd->texture; 3617 GLenum target = cmd->target; 3618 GLint level = cmd->level; 3619 GLenum internalFormat = cmd->internalFormat; 3620 GLint x = cmd->x; 3621 GLint y = cmd->y; 3622 GLsizei width = cmd->width; 3623 GLsizei height = cmd->height; 3624 int border = cmd->border; 3625 CALL_CopyTextureImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, x, y, width, height, border)); 3626 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyTextureImage2DEXT), 8) / 8); 3627 assert (cmd_size == cmd->cmd_base.cmd_size); 3628 return cmd_size; 3629} 3630void GLAPIENTRY 3631_mesa_marshal_CopyTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, int border) 3632{ 3633 GET_CURRENT_CONTEXT(ctx); 3634 int cmd_size = sizeof(struct marshal_cmd_CopyTextureImage2DEXT); 3635 struct marshal_cmd_CopyTextureImage2DEXT *cmd; 3636 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyTextureImage2DEXT, cmd_size); 3637 cmd->texture = texture; 3638 cmd->target = target; 3639 cmd->level = level; 3640 cmd->internalFormat = internalFormat; 3641 cmd->x = x; 3642 cmd->y = y; 3643 cmd->width = width; 3644 cmd->height = height; 3645 cmd->border = border; 3646} 3647 3648 3649/* CopyTextureSubImage1DEXT: marshalled asynchronously */ 3650struct marshal_cmd_CopyTextureSubImage1DEXT 3651{ 3652 struct marshal_cmd_base cmd_base; 3653 GLuint texture; 3654 GLenum target; 3655 GLint level; 3656 GLint xoffset; 3657 GLint x; 3658 GLint y; 3659 GLsizei width; 3660}; 3661uint32_t 3662_mesa_unmarshal_CopyTextureSubImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyTextureSubImage1DEXT *cmd, const uint64_t *last) 3663{ 3664 GLuint texture = cmd->texture; 3665 GLenum target = cmd->target; 3666 GLint level = cmd->level; 3667 GLint xoffset = cmd->xoffset; 3668 GLint x = cmd->x; 3669 GLint y = cmd->y; 3670 GLsizei width = cmd->width; 3671 CALL_CopyTextureSubImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, x, y, width)); 3672 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyTextureSubImage1DEXT), 8) / 8); 3673 assert (cmd_size == cmd->cmd_base.cmd_size); 3674 return cmd_size; 3675} 3676void GLAPIENTRY 3677_mesa_marshal_CopyTextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) 3678{ 3679 GET_CURRENT_CONTEXT(ctx); 3680 int cmd_size = sizeof(struct marshal_cmd_CopyTextureSubImage1DEXT); 3681 struct marshal_cmd_CopyTextureSubImage1DEXT *cmd; 3682 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyTextureSubImage1DEXT, cmd_size); 3683 cmd->texture = texture; 3684 cmd->target = target; 3685 cmd->level = level; 3686 cmd->xoffset = xoffset; 3687 cmd->x = x; 3688 cmd->y = y; 3689 cmd->width = width; 3690} 3691 3692 3693/* CopyTextureSubImage2DEXT: marshalled asynchronously */ 3694struct marshal_cmd_CopyTextureSubImage2DEXT 3695{ 3696 struct marshal_cmd_base cmd_base; 3697 GLuint texture; 3698 GLenum target; 3699 GLint level; 3700 GLint xoffset; 3701 GLint yoffset; 3702 GLint x; 3703 GLint y; 3704 GLsizei width; 3705 GLsizei height; 3706}; 3707uint32_t 3708_mesa_unmarshal_CopyTextureSubImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyTextureSubImage2DEXT *cmd, const uint64_t *last) 3709{ 3710 GLuint texture = cmd->texture; 3711 GLenum target = cmd->target; 3712 GLint level = cmd->level; 3713 GLint xoffset = cmd->xoffset; 3714 GLint yoffset = cmd->yoffset; 3715 GLint x = cmd->x; 3716 GLint y = cmd->y; 3717 GLsizei width = cmd->width; 3718 GLsizei height = cmd->height; 3719 CALL_CopyTextureSubImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, x, y, width, height)); 3720 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyTextureSubImage2DEXT), 8) / 8); 3721 assert (cmd_size == cmd->cmd_base.cmd_size); 3722 return cmd_size; 3723} 3724void GLAPIENTRY 3725_mesa_marshal_CopyTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) 3726{ 3727 GET_CURRENT_CONTEXT(ctx); 3728 int cmd_size = sizeof(struct marshal_cmd_CopyTextureSubImage2DEXT); 3729 struct marshal_cmd_CopyTextureSubImage2DEXT *cmd; 3730 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyTextureSubImage2DEXT, cmd_size); 3731 cmd->texture = texture; 3732 cmd->target = target; 3733 cmd->level = level; 3734 cmd->xoffset = xoffset; 3735 cmd->yoffset = yoffset; 3736 cmd->x = x; 3737 cmd->y = y; 3738 cmd->width = width; 3739 cmd->height = height; 3740} 3741 3742 3743/* CopyTextureSubImage3DEXT: marshalled asynchronously */ 3744struct marshal_cmd_CopyTextureSubImage3DEXT 3745{ 3746 struct marshal_cmd_base cmd_base; 3747 GLuint texture; 3748 GLenum target; 3749 GLint level; 3750 GLint xoffset; 3751 GLint yoffset; 3752 GLint zoffset; 3753 GLint x; 3754 GLint y; 3755 GLsizei width; 3756 GLsizei height; 3757}; 3758uint32_t 3759_mesa_unmarshal_CopyTextureSubImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyTextureSubImage3DEXT *cmd, const uint64_t *last) 3760{ 3761 GLuint texture = cmd->texture; 3762 GLenum target = cmd->target; 3763 GLint level = cmd->level; 3764 GLint xoffset = cmd->xoffset; 3765 GLint yoffset = cmd->yoffset; 3766 GLint zoffset = cmd->zoffset; 3767 GLint x = cmd->x; 3768 GLint y = cmd->y; 3769 GLsizei width = cmd->width; 3770 GLsizei height = cmd->height; 3771 CALL_CopyTextureSubImage3DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, zoffset, x, y, width, height)); 3772 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyTextureSubImage3DEXT), 8) / 8); 3773 assert (cmd_size == cmd->cmd_base.cmd_size); 3774 return cmd_size; 3775} 3776void GLAPIENTRY 3777_mesa_marshal_CopyTextureSubImage3DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) 3778{ 3779 GET_CURRENT_CONTEXT(ctx); 3780 int cmd_size = sizeof(struct marshal_cmd_CopyTextureSubImage3DEXT); 3781 struct marshal_cmd_CopyTextureSubImage3DEXT *cmd; 3782 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyTextureSubImage3DEXT, cmd_size); 3783 cmd->texture = texture; 3784 cmd->target = target; 3785 cmd->level = level; 3786 cmd->xoffset = xoffset; 3787 cmd->yoffset = yoffset; 3788 cmd->zoffset = zoffset; 3789 cmd->x = x; 3790 cmd->y = y; 3791 cmd->width = width; 3792 cmd->height = height; 3793} 3794 3795 3796/* GetTextureImageEXT: marshalled asynchronously */ 3797struct marshal_cmd_GetTextureImageEXT 3798{ 3799 struct marshal_cmd_base cmd_base; 3800 GLuint texture; 3801 GLenum target; 3802 GLint level; 3803 GLenum format; 3804 GLenum type; 3805 GLvoid * pixels; 3806}; 3807uint32_t 3808_mesa_unmarshal_GetTextureImageEXT(struct gl_context *ctx, const struct marshal_cmd_GetTextureImageEXT *cmd, const uint64_t *last) 3809{ 3810 GLuint texture = cmd->texture; 3811 GLenum target = cmd->target; 3812 GLint level = cmd->level; 3813 GLenum format = cmd->format; 3814 GLenum type = cmd->type; 3815 GLvoid * pixels = cmd->pixels; 3816 CALL_GetTextureImageEXT(ctx->CurrentServerDispatch, (texture, target, level, format, type, pixels)); 3817 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_GetTextureImageEXT), 8) / 8); 3818 assert (cmd_size == cmd->cmd_base.cmd_size); 3819 return cmd_size; 3820} 3821void GLAPIENTRY 3822_mesa_marshal_GetTextureImageEXT(GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels) 3823{ 3824 GET_CURRENT_CONTEXT(ctx); 3825 int cmd_size = sizeof(struct marshal_cmd_GetTextureImageEXT); 3826 struct marshal_cmd_GetTextureImageEXT *cmd; 3827 if (_mesa_glthread_has_no_pack_buffer(ctx)) { 3828 _mesa_glthread_finish_before(ctx, "GetTextureImageEXT"); 3829 CALL_GetTextureImageEXT(ctx->CurrentServerDispatch, (texture, target, level, format, type, pixels)); 3830 return; 3831 } 3832 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_GetTextureImageEXT, cmd_size); 3833 cmd->texture = texture; 3834 cmd->target = target; 3835 cmd->level = level; 3836 cmd->format = format; 3837 cmd->type = type; 3838 cmd->pixels = pixels; 3839} 3840 3841 3842/* BindMultiTextureEXT: marshalled asynchronously */ 3843struct marshal_cmd_BindMultiTextureEXT 3844{ 3845 struct marshal_cmd_base cmd_base; 3846 GLenum texunit; 3847 GLenum target; 3848 GLuint texture; 3849}; 3850uint32_t 3851_mesa_unmarshal_BindMultiTextureEXT(struct gl_context *ctx, const struct marshal_cmd_BindMultiTextureEXT *cmd, const uint64_t *last) 3852{ 3853 GLenum texunit = cmd->texunit; 3854 GLenum target = cmd->target; 3855 GLuint texture = cmd->texture; 3856 CALL_BindMultiTextureEXT(ctx->CurrentServerDispatch, (texunit, target, texture)); 3857 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_BindMultiTextureEXT), 8) / 8); 3858 assert (cmd_size == cmd->cmd_base.cmd_size); 3859 return cmd_size; 3860} 3861void GLAPIENTRY 3862_mesa_marshal_BindMultiTextureEXT(GLenum texunit, GLenum target, GLuint texture) 3863{ 3864 GET_CURRENT_CONTEXT(ctx); 3865 int cmd_size = sizeof(struct marshal_cmd_BindMultiTextureEXT); 3866 struct marshal_cmd_BindMultiTextureEXT *cmd; 3867 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_BindMultiTextureEXT, cmd_size); 3868 cmd->texunit = texunit; 3869 cmd->target = target; 3870 cmd->texture = texture; 3871} 3872 3873 3874/* EnableClientStateiEXT: marshalled asynchronously */ 3875struct marshal_cmd_EnableClientStateiEXT 3876{ 3877 struct marshal_cmd_base cmd_base; 3878 GLenum array; 3879 GLuint index; 3880}; 3881uint32_t 3882_mesa_unmarshal_EnableClientStateiEXT(struct gl_context *ctx, const struct marshal_cmd_EnableClientStateiEXT *cmd, const uint64_t *last) 3883{ 3884 GLenum array = cmd->array; 3885 GLuint index = cmd->index; 3886 CALL_EnableClientStateiEXT(ctx->CurrentServerDispatch, (array, index)); 3887 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EnableClientStateiEXT), 8) / 8); 3888 assert (cmd_size == cmd->cmd_base.cmd_size); 3889 return cmd_size; 3890} 3891void GLAPIENTRY 3892_mesa_marshal_EnableClientStateiEXT(GLenum array, GLuint index) 3893{ 3894 GET_CURRENT_CONTEXT(ctx); 3895 int cmd_size = sizeof(struct marshal_cmd_EnableClientStateiEXT); 3896 struct marshal_cmd_EnableClientStateiEXT *cmd; 3897 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EnableClientStateiEXT, cmd_size); 3898 cmd->array = array; 3899 cmd->index = index; 3900 if (COMPAT) _mesa_glthread_ClientState(ctx, NULL, VERT_ATTRIB_TEX(index), true); 3901} 3902 3903 3904/* DisableClientStateiEXT: marshalled asynchronously */ 3905struct marshal_cmd_DisableClientStateiEXT 3906{ 3907 struct marshal_cmd_base cmd_base; 3908 GLenum array; 3909 GLuint index; 3910}; 3911uint32_t 3912_mesa_unmarshal_DisableClientStateiEXT(struct gl_context *ctx, const struct marshal_cmd_DisableClientStateiEXT *cmd, const uint64_t *last) 3913{ 3914 GLenum array = cmd->array; 3915 GLuint index = cmd->index; 3916 CALL_DisableClientStateiEXT(ctx->CurrentServerDispatch, (array, index)); 3917 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DisableClientStateiEXT), 8) / 8); 3918 assert (cmd_size == cmd->cmd_base.cmd_size); 3919 return cmd_size; 3920} 3921void GLAPIENTRY 3922_mesa_marshal_DisableClientStateiEXT(GLenum array, GLuint index) 3923{ 3924 GET_CURRENT_CONTEXT(ctx); 3925 int cmd_size = sizeof(struct marshal_cmd_DisableClientStateiEXT); 3926 struct marshal_cmd_DisableClientStateiEXT *cmd; 3927 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DisableClientStateiEXT, cmd_size); 3928 cmd->array = array; 3929 cmd->index = index; 3930 if (COMPAT) _mesa_glthread_ClientState(ctx, NULL, VERT_ATTRIB_TEX(index), false); 3931} 3932 3933 3934/* GetPointerIndexedvEXT: marshalled synchronously */ 3935void GLAPIENTRY 3936_mesa_marshal_GetPointerIndexedvEXT(GLenum target, GLuint index, GLvoid** params) 3937{ 3938 GET_CURRENT_CONTEXT(ctx); 3939 _mesa_glthread_finish_before(ctx, "GetPointerIndexedvEXT"); 3940 CALL_GetPointerIndexedvEXT(ctx->CurrentServerDispatch, (target, index, params)); 3941} 3942 3943 3944/* MultiTexEnviEXT: marshalled asynchronously */ 3945struct marshal_cmd_MultiTexEnviEXT 3946{ 3947 struct marshal_cmd_base cmd_base; 3948 GLenum texunit; 3949 GLenum target; 3950 GLenum pname; 3951 GLint param; 3952}; 3953uint32_t 3954_mesa_unmarshal_MultiTexEnviEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexEnviEXT *cmd, const uint64_t *last) 3955{ 3956 GLenum texunit = cmd->texunit; 3957 GLenum target = cmd->target; 3958 GLenum pname = cmd->pname; 3959 GLint param = cmd->param; 3960 CALL_MultiTexEnviEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 3961 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexEnviEXT), 8) / 8); 3962 assert (cmd_size == cmd->cmd_base.cmd_size); 3963 return cmd_size; 3964} 3965void GLAPIENTRY 3966_mesa_marshal_MultiTexEnviEXT(GLenum texunit, GLenum target, GLenum pname, GLint param) 3967{ 3968 GET_CURRENT_CONTEXT(ctx); 3969 int cmd_size = sizeof(struct marshal_cmd_MultiTexEnviEXT); 3970 struct marshal_cmd_MultiTexEnviEXT *cmd; 3971 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexEnviEXT, cmd_size); 3972 cmd->texunit = texunit; 3973 cmd->target = target; 3974 cmd->pname = pname; 3975 cmd->param = param; 3976} 3977 3978 3979/* MultiTexEnvivEXT: marshalled asynchronously */ 3980struct marshal_cmd_MultiTexEnvivEXT 3981{ 3982 struct marshal_cmd_base cmd_base; 3983 GLenum texunit; 3984 GLenum target; 3985 GLenum pname; 3986 /* Next safe_mul(_mesa_texenv_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint param[_mesa_texenv_enum_to_count(pname)] */ 3987}; 3988uint32_t 3989_mesa_unmarshal_MultiTexEnvivEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexEnvivEXT *cmd, const uint64_t *last) 3990{ 3991 GLenum texunit = cmd->texunit; 3992 GLenum target = cmd->target; 3993 GLenum pname = cmd->pname; 3994 GLint * param; 3995 const char *variable_data = (const char *) (cmd + 1); 3996 param = (GLint *) variable_data; 3997 CALL_MultiTexEnvivEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 3998 return cmd->cmd_base.cmd_size; 3999} 4000void GLAPIENTRY 4001_mesa_marshal_MultiTexEnvivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint * param) 4002{ 4003 GET_CURRENT_CONTEXT(ctx); 4004 int param_size = safe_mul(_mesa_texenv_enum_to_count(pname), 1 * sizeof(GLint)); 4005 int cmd_size = sizeof(struct marshal_cmd_MultiTexEnvivEXT) + param_size; 4006 struct marshal_cmd_MultiTexEnvivEXT *cmd; 4007 if (unlikely(param_size < 0 || (param_size > 0 && !param) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 4008 _mesa_glthread_finish_before(ctx, "MultiTexEnvivEXT"); 4009 CALL_MultiTexEnvivEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4010 return; 4011 } 4012 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexEnvivEXT, cmd_size); 4013 cmd->texunit = texunit; 4014 cmd->target = target; 4015 cmd->pname = pname; 4016 char *variable_data = (char *) (cmd + 1); 4017 memcpy(variable_data, param, param_size); 4018} 4019 4020 4021/* MultiTexEnvfEXT: marshalled asynchronously */ 4022struct marshal_cmd_MultiTexEnvfEXT 4023{ 4024 struct marshal_cmd_base cmd_base; 4025 GLenum texunit; 4026 GLenum target; 4027 GLenum pname; 4028 GLfloat param; 4029}; 4030uint32_t 4031_mesa_unmarshal_MultiTexEnvfEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexEnvfEXT *cmd, const uint64_t *last) 4032{ 4033 GLenum texunit = cmd->texunit; 4034 GLenum target = cmd->target; 4035 GLenum pname = cmd->pname; 4036 GLfloat param = cmd->param; 4037 CALL_MultiTexEnvfEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4038 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexEnvfEXT), 8) / 8); 4039 assert (cmd_size == cmd->cmd_base.cmd_size); 4040 return cmd_size; 4041} 4042void GLAPIENTRY 4043_mesa_marshal_MultiTexEnvfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param) 4044{ 4045 GET_CURRENT_CONTEXT(ctx); 4046 int cmd_size = sizeof(struct marshal_cmd_MultiTexEnvfEXT); 4047 struct marshal_cmd_MultiTexEnvfEXT *cmd; 4048 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexEnvfEXT, cmd_size); 4049 cmd->texunit = texunit; 4050 cmd->target = target; 4051 cmd->pname = pname; 4052 cmd->param = param; 4053} 4054 4055 4056/* MultiTexEnvfvEXT: marshalled asynchronously */ 4057struct marshal_cmd_MultiTexEnvfvEXT 4058{ 4059 struct marshal_cmd_base cmd_base; 4060 GLenum texunit; 4061 GLenum target; 4062 GLenum pname; 4063 /* Next safe_mul(_mesa_texenv_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat param[_mesa_texenv_enum_to_count(pname)] */ 4064}; 4065uint32_t 4066_mesa_unmarshal_MultiTexEnvfvEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexEnvfvEXT *cmd, const uint64_t *last) 4067{ 4068 GLenum texunit = cmd->texunit; 4069 GLenum target = cmd->target; 4070 GLenum pname = cmd->pname; 4071 GLfloat * param; 4072 const char *variable_data = (const char *) (cmd + 1); 4073 param = (GLfloat *) variable_data; 4074 CALL_MultiTexEnvfvEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4075 return cmd->cmd_base.cmd_size; 4076} 4077void GLAPIENTRY 4078_mesa_marshal_MultiTexEnvfvEXT(GLenum texunit, GLenum target, GLenum pname, const GLfloat * param) 4079{ 4080 GET_CURRENT_CONTEXT(ctx); 4081 int param_size = safe_mul(_mesa_texenv_enum_to_count(pname), 1 * sizeof(GLfloat)); 4082 int cmd_size = sizeof(struct marshal_cmd_MultiTexEnvfvEXT) + param_size; 4083 struct marshal_cmd_MultiTexEnvfvEXT *cmd; 4084 if (unlikely(param_size < 0 || (param_size > 0 && !param) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 4085 _mesa_glthread_finish_before(ctx, "MultiTexEnvfvEXT"); 4086 CALL_MultiTexEnvfvEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4087 return; 4088 } 4089 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexEnvfvEXT, cmd_size); 4090 cmd->texunit = texunit; 4091 cmd->target = target; 4092 cmd->pname = pname; 4093 char *variable_data = (char *) (cmd + 1); 4094 memcpy(variable_data, param, param_size); 4095} 4096 4097 4098/* GetMultiTexEnvivEXT: marshalled synchronously */ 4099void GLAPIENTRY 4100_mesa_marshal_GetMultiTexEnvivEXT(GLenum texunit, GLenum target, GLenum pname, GLint * param) 4101{ 4102 GET_CURRENT_CONTEXT(ctx); 4103 _mesa_glthread_finish_before(ctx, "GetMultiTexEnvivEXT"); 4104 CALL_GetMultiTexEnvivEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4105} 4106 4107 4108/* GetMultiTexEnvfvEXT: marshalled synchronously */ 4109void GLAPIENTRY 4110_mesa_marshal_GetMultiTexEnvfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat * param) 4111{ 4112 GET_CURRENT_CONTEXT(ctx); 4113 _mesa_glthread_finish_before(ctx, "GetMultiTexEnvfvEXT"); 4114 CALL_GetMultiTexEnvfvEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4115} 4116 4117 4118/* MultiTexParameteriEXT: marshalled asynchronously */ 4119struct marshal_cmd_MultiTexParameteriEXT 4120{ 4121 struct marshal_cmd_base cmd_base; 4122 GLenum texunit; 4123 GLenum target; 4124 GLenum pname; 4125 GLint param; 4126}; 4127uint32_t 4128_mesa_unmarshal_MultiTexParameteriEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexParameteriEXT *cmd, const uint64_t *last) 4129{ 4130 GLenum texunit = cmd->texunit; 4131 GLenum target = cmd->target; 4132 GLenum pname = cmd->pname; 4133 GLint param = cmd->param; 4134 CALL_MultiTexParameteriEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4135 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexParameteriEXT), 8) / 8); 4136 assert (cmd_size == cmd->cmd_base.cmd_size); 4137 return cmd_size; 4138} 4139void GLAPIENTRY 4140_mesa_marshal_MultiTexParameteriEXT(GLenum texunit, GLenum target, GLenum pname, GLint param) 4141{ 4142 GET_CURRENT_CONTEXT(ctx); 4143 int cmd_size = sizeof(struct marshal_cmd_MultiTexParameteriEXT); 4144 struct marshal_cmd_MultiTexParameteriEXT *cmd; 4145 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexParameteriEXT, cmd_size); 4146 cmd->texunit = texunit; 4147 cmd->target = target; 4148 cmd->pname = pname; 4149 cmd->param = param; 4150} 4151 4152 4153/* MultiTexParameterivEXT: marshalled asynchronously */ 4154struct marshal_cmd_MultiTexParameterivEXT 4155{ 4156 struct marshal_cmd_base cmd_base; 4157 GLenum texunit; 4158 GLenum target; 4159 GLenum pname; 4160 /* Next safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint param[_mesa_tex_param_enum_to_count(pname)] */ 4161}; 4162uint32_t 4163_mesa_unmarshal_MultiTexParameterivEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexParameterivEXT *cmd, const uint64_t *last) 4164{ 4165 GLenum texunit = cmd->texunit; 4166 GLenum target = cmd->target; 4167 GLenum pname = cmd->pname; 4168 GLint * param; 4169 const char *variable_data = (const char *) (cmd + 1); 4170 param = (GLint *) variable_data; 4171 CALL_MultiTexParameterivEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4172 return cmd->cmd_base.cmd_size; 4173} 4174void GLAPIENTRY 4175_mesa_marshal_MultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, const GLint* param) 4176{ 4177 GET_CURRENT_CONTEXT(ctx); 4178 int param_size = safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLint)); 4179 int cmd_size = sizeof(struct marshal_cmd_MultiTexParameterivEXT) + param_size; 4180 struct marshal_cmd_MultiTexParameterivEXT *cmd; 4181 if (unlikely(param_size < 0 || (param_size > 0 && !param) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 4182 _mesa_glthread_finish_before(ctx, "MultiTexParameterivEXT"); 4183 CALL_MultiTexParameterivEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4184 return; 4185 } 4186 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexParameterivEXT, cmd_size); 4187 cmd->texunit = texunit; 4188 cmd->target = target; 4189 cmd->pname = pname; 4190 char *variable_data = (char *) (cmd + 1); 4191 memcpy(variable_data, param, param_size); 4192} 4193 4194 4195/* MultiTexParameterfEXT: marshalled asynchronously */ 4196struct marshal_cmd_MultiTexParameterfEXT 4197{ 4198 struct marshal_cmd_base cmd_base; 4199 GLenum texunit; 4200 GLenum target; 4201 GLenum pname; 4202 GLfloat param; 4203}; 4204uint32_t 4205_mesa_unmarshal_MultiTexParameterfEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexParameterfEXT *cmd, const uint64_t *last) 4206{ 4207 GLenum texunit = cmd->texunit; 4208 GLenum target = cmd->target; 4209 GLenum pname = cmd->pname; 4210 GLfloat param = cmd->param; 4211 CALL_MultiTexParameterfEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4212 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexParameterfEXT), 8) / 8); 4213 assert (cmd_size == cmd->cmd_base.cmd_size); 4214 return cmd_size; 4215} 4216void GLAPIENTRY 4217_mesa_marshal_MultiTexParameterfEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat param) 4218{ 4219 GET_CURRENT_CONTEXT(ctx); 4220 int cmd_size = sizeof(struct marshal_cmd_MultiTexParameterfEXT); 4221 struct marshal_cmd_MultiTexParameterfEXT *cmd; 4222 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexParameterfEXT, cmd_size); 4223 cmd->texunit = texunit; 4224 cmd->target = target; 4225 cmd->pname = pname; 4226 cmd->param = param; 4227} 4228 4229 4230/* MultiTexParameterfvEXT: marshalled asynchronously */ 4231struct marshal_cmd_MultiTexParameterfvEXT 4232{ 4233 struct marshal_cmd_base cmd_base; 4234 GLenum texunit; 4235 GLenum target; 4236 GLenum pname; 4237 /* Next safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat param[_mesa_tex_param_enum_to_count(pname)] */ 4238}; 4239uint32_t 4240_mesa_unmarshal_MultiTexParameterfvEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexParameterfvEXT *cmd, const uint64_t *last) 4241{ 4242 GLenum texunit = cmd->texunit; 4243 GLenum target = cmd->target; 4244 GLenum pname = cmd->pname; 4245 GLfloat * param; 4246 const char *variable_data = (const char *) (cmd + 1); 4247 param = (GLfloat *) variable_data; 4248 CALL_MultiTexParameterfvEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4249 return cmd->cmd_base.cmd_size; 4250} 4251void GLAPIENTRY 4252_mesa_marshal_MultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname, const GLfloat* param) 4253{ 4254 GET_CURRENT_CONTEXT(ctx); 4255 int param_size = safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLfloat)); 4256 int cmd_size = sizeof(struct marshal_cmd_MultiTexParameterfvEXT) + param_size; 4257 struct marshal_cmd_MultiTexParameterfvEXT *cmd; 4258 if (unlikely(param_size < 0 || (param_size > 0 && !param) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 4259 _mesa_glthread_finish_before(ctx, "MultiTexParameterfvEXT"); 4260 CALL_MultiTexParameterfvEXT(ctx->CurrentServerDispatch, (texunit, target, pname, param)); 4261 return; 4262 } 4263 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexParameterfvEXT, cmd_size); 4264 cmd->texunit = texunit; 4265 cmd->target = target; 4266 cmd->pname = pname; 4267 char *variable_data = (char *) (cmd + 1); 4268 memcpy(variable_data, param, param_size); 4269} 4270 4271 4272/* GetMultiTexParameterivEXT: marshalled synchronously */ 4273void GLAPIENTRY 4274_mesa_marshal_GetMultiTexParameterivEXT(GLenum texunit, GLenum target, GLenum pname, GLint* params) 4275{ 4276 GET_CURRENT_CONTEXT(ctx); 4277 _mesa_glthread_finish_before(ctx, "GetMultiTexParameterivEXT"); 4278 CALL_GetMultiTexParameterivEXT(ctx->CurrentServerDispatch, (texunit, target, pname, params)); 4279} 4280 4281 4282/* GetMultiTexParameterfvEXT: marshalled synchronously */ 4283void GLAPIENTRY 4284_mesa_marshal_GetMultiTexParameterfvEXT(GLenum texunit, GLenum target, GLenum pname, GLfloat* params) 4285{ 4286 GET_CURRENT_CONTEXT(ctx); 4287 _mesa_glthread_finish_before(ctx, "GetMultiTexParameterfvEXT"); 4288 CALL_GetMultiTexParameterfvEXT(ctx->CurrentServerDispatch, (texunit, target, pname, params)); 4289} 4290 4291 4292/* GetMultiTexImageEXT: marshalled asynchronously */ 4293struct marshal_cmd_GetMultiTexImageEXT 4294{ 4295 struct marshal_cmd_base cmd_base; 4296 GLenum texunit; 4297 GLenum target; 4298 GLint level; 4299 GLenum format; 4300 GLenum type; 4301 GLvoid* pixels; 4302}; 4303uint32_t 4304_mesa_unmarshal_GetMultiTexImageEXT(struct gl_context *ctx, const struct marshal_cmd_GetMultiTexImageEXT *cmd, const uint64_t *last) 4305{ 4306 GLenum texunit = cmd->texunit; 4307 GLenum target = cmd->target; 4308 GLint level = cmd->level; 4309 GLenum format = cmd->format; 4310 GLenum type = cmd->type; 4311 GLvoid* pixels = cmd->pixels; 4312 CALL_GetMultiTexImageEXT(ctx->CurrentServerDispatch, (texunit, target, level, format, type, pixels)); 4313 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_GetMultiTexImageEXT), 8) / 8); 4314 assert (cmd_size == cmd->cmd_base.cmd_size); 4315 return cmd_size; 4316} 4317void GLAPIENTRY 4318_mesa_marshal_GetMultiTexImageEXT(GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels) 4319{ 4320 GET_CURRENT_CONTEXT(ctx); 4321 int cmd_size = sizeof(struct marshal_cmd_GetMultiTexImageEXT); 4322 struct marshal_cmd_GetMultiTexImageEXT *cmd; 4323 if (_mesa_glthread_has_no_pack_buffer(ctx)) { 4324 _mesa_glthread_finish_before(ctx, "GetMultiTexImageEXT"); 4325 CALL_GetMultiTexImageEXT(ctx->CurrentServerDispatch, (texunit, target, level, format, type, pixels)); 4326 return; 4327 } 4328 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_GetMultiTexImageEXT, cmd_size); 4329 cmd->texunit = texunit; 4330 cmd->target = target; 4331 cmd->level = level; 4332 cmd->format = format; 4333 cmd->type = type; 4334 cmd->pixels = pixels; 4335} 4336 4337 4338/* GetMultiTexLevelParameterivEXT: marshalled synchronously */ 4339void GLAPIENTRY 4340_mesa_marshal_GetMultiTexLevelParameterivEXT(GLenum texunit, GLenum target, GLint level, GLenum pname, GLint* params) 4341{ 4342 GET_CURRENT_CONTEXT(ctx); 4343 _mesa_glthread_finish_before(ctx, "GetMultiTexLevelParameterivEXT"); 4344 CALL_GetMultiTexLevelParameterivEXT(ctx->CurrentServerDispatch, (texunit, target, level, pname, params)); 4345} 4346 4347 4348/* GetMultiTexLevelParameterfvEXT: marshalled synchronously */ 4349void GLAPIENTRY 4350_mesa_marshal_GetMultiTexLevelParameterfvEXT(GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat* params) 4351{ 4352 GET_CURRENT_CONTEXT(ctx); 4353 _mesa_glthread_finish_before(ctx, "GetMultiTexLevelParameterfvEXT"); 4354 CALL_GetMultiTexLevelParameterfvEXT(ctx->CurrentServerDispatch, (texunit, target, level, pname, params)); 4355} 4356 4357 4358/* MultiTexImage1DEXT: marshalled asynchronously */ 4359struct marshal_cmd_MultiTexImage1DEXT 4360{ 4361 struct marshal_cmd_base cmd_base; 4362 GLenum texunit; 4363 GLenum target; 4364 GLint level; 4365 GLint internalformat; 4366 GLsizei width; 4367 GLint border; 4368 GLenum format; 4369 GLenum type; 4370 const GLvoid* pixels; 4371}; 4372uint32_t 4373_mesa_unmarshal_MultiTexImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexImage1DEXT *cmd, const uint64_t *last) 4374{ 4375 GLenum texunit = cmd->texunit; 4376 GLenum target = cmd->target; 4377 GLint level = cmd->level; 4378 GLint internalformat = cmd->internalformat; 4379 GLsizei width = cmd->width; 4380 GLint border = cmd->border; 4381 GLenum format = cmd->format; 4382 GLenum type = cmd->type; 4383 const GLvoid* pixels = cmd->pixels; 4384 CALL_MultiTexImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalformat, width, border, format, type, pixels)); 4385 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexImage1DEXT), 8) / 8); 4386 assert (cmd_size == cmd->cmd_base.cmd_size); 4387 return cmd_size; 4388} 4389void GLAPIENTRY 4390_mesa_marshal_MultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid* pixels) 4391{ 4392 GET_CURRENT_CONTEXT(ctx); 4393 int cmd_size = sizeof(struct marshal_cmd_MultiTexImage1DEXT); 4394 struct marshal_cmd_MultiTexImage1DEXT *cmd; 4395 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 4396 _mesa_glthread_finish_before(ctx, "MultiTexImage1DEXT"); 4397 CALL_MultiTexImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalformat, width, border, format, type, pixels)); 4398 return; 4399 } 4400 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexImage1DEXT, cmd_size); 4401 cmd->texunit = texunit; 4402 cmd->target = target; 4403 cmd->level = level; 4404 cmd->internalformat = internalformat; 4405 cmd->width = width; 4406 cmd->border = border; 4407 cmd->format = format; 4408 cmd->type = type; 4409 cmd->pixels = pixels; 4410} 4411 4412 4413/* MultiTexImage2DEXT: marshalled asynchronously */ 4414struct marshal_cmd_MultiTexImage2DEXT 4415{ 4416 struct marshal_cmd_base cmd_base; 4417 GLenum texunit; 4418 GLenum target; 4419 GLint level; 4420 GLint internalformat; 4421 GLsizei width; 4422 GLsizei height; 4423 GLint border; 4424 GLenum format; 4425 GLenum type; 4426 const GLvoid* pixels; 4427}; 4428uint32_t 4429_mesa_unmarshal_MultiTexImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexImage2DEXT *cmd, const uint64_t *last) 4430{ 4431 GLenum texunit = cmd->texunit; 4432 GLenum target = cmd->target; 4433 GLint level = cmd->level; 4434 GLint internalformat = cmd->internalformat; 4435 GLsizei width = cmd->width; 4436 GLsizei height = cmd->height; 4437 GLint border = cmd->border; 4438 GLenum format = cmd->format; 4439 GLenum type = cmd->type; 4440 const GLvoid* pixels = cmd->pixels; 4441 CALL_MultiTexImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalformat, width, height, border, format, type, pixels)); 4442 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexImage2DEXT), 8) / 8); 4443 assert (cmd_size == cmd->cmd_base.cmd_size); 4444 return cmd_size; 4445} 4446void GLAPIENTRY 4447_mesa_marshal_MultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) 4448{ 4449 GET_CURRENT_CONTEXT(ctx); 4450 int cmd_size = sizeof(struct marshal_cmd_MultiTexImage2DEXT); 4451 struct marshal_cmd_MultiTexImage2DEXT *cmd; 4452 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 4453 _mesa_glthread_finish_before(ctx, "MultiTexImage2DEXT"); 4454 CALL_MultiTexImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalformat, width, height, border, format, type, pixels)); 4455 return; 4456 } 4457 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexImage2DEXT, cmd_size); 4458 cmd->texunit = texunit; 4459 cmd->target = target; 4460 cmd->level = level; 4461 cmd->internalformat = internalformat; 4462 cmd->width = width; 4463 cmd->height = height; 4464 cmd->border = border; 4465 cmd->format = format; 4466 cmd->type = type; 4467 cmd->pixels = pixels; 4468} 4469 4470 4471/* MultiTexImage3DEXT: marshalled asynchronously */ 4472struct marshal_cmd_MultiTexImage3DEXT 4473{ 4474 struct marshal_cmd_base cmd_base; 4475 GLenum texunit; 4476 GLenum target; 4477 GLint level; 4478 GLint internalformat; 4479 GLsizei width; 4480 GLsizei height; 4481 GLsizei depth; 4482 GLint border; 4483 GLenum format; 4484 GLenum type; 4485 const GLvoid* pixels; 4486}; 4487uint32_t 4488_mesa_unmarshal_MultiTexImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexImage3DEXT *cmd, const uint64_t *last) 4489{ 4490 GLenum texunit = cmd->texunit; 4491 GLenum target = cmd->target; 4492 GLint level = cmd->level; 4493 GLint internalformat = cmd->internalformat; 4494 GLsizei width = cmd->width; 4495 GLsizei height = cmd->height; 4496 GLsizei depth = cmd->depth; 4497 GLint border = cmd->border; 4498 GLenum format = cmd->format; 4499 GLenum type = cmd->type; 4500 const GLvoid* pixels = cmd->pixels; 4501 CALL_MultiTexImage3DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalformat, width, height, depth, border, format, type, pixels)); 4502 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexImage3DEXT), 8) / 8); 4503 assert (cmd_size == cmd->cmd_base.cmd_size); 4504 return cmd_size; 4505} 4506void GLAPIENTRY 4507_mesa_marshal_MultiTexImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) 4508{ 4509 GET_CURRENT_CONTEXT(ctx); 4510 int cmd_size = sizeof(struct marshal_cmd_MultiTexImage3DEXT); 4511 struct marshal_cmd_MultiTexImage3DEXT *cmd; 4512 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 4513 _mesa_glthread_finish_before(ctx, "MultiTexImage3DEXT"); 4514 CALL_MultiTexImage3DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalformat, width, height, depth, border, format, type, pixels)); 4515 return; 4516 } 4517 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexImage3DEXT, cmd_size); 4518 cmd->texunit = texunit; 4519 cmd->target = target; 4520 cmd->level = level; 4521 cmd->internalformat = internalformat; 4522 cmd->width = width; 4523 cmd->height = height; 4524 cmd->depth = depth; 4525 cmd->border = border; 4526 cmd->format = format; 4527 cmd->type = type; 4528 cmd->pixels = pixels; 4529} 4530 4531 4532/* MultiTexSubImage1DEXT: marshalled asynchronously */ 4533struct marshal_cmd_MultiTexSubImage1DEXT 4534{ 4535 struct marshal_cmd_base cmd_base; 4536 GLenum texunit; 4537 GLenum target; 4538 GLint level; 4539 GLint xoffset; 4540 GLsizei width; 4541 GLenum format; 4542 GLenum type; 4543 const GLvoid* pixels; 4544}; 4545uint32_t 4546_mesa_unmarshal_MultiTexSubImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexSubImage1DEXT *cmd, const uint64_t *last) 4547{ 4548 GLenum texunit = cmd->texunit; 4549 GLenum target = cmd->target; 4550 GLint level = cmd->level; 4551 GLint xoffset = cmd->xoffset; 4552 GLsizei width = cmd->width; 4553 GLenum format = cmd->format; 4554 GLenum type = cmd->type; 4555 const GLvoid* pixels = cmd->pixels; 4556 CALL_MultiTexSubImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, width, format, type, pixels)); 4557 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexSubImage1DEXT), 8) / 8); 4558 assert (cmd_size == cmd->cmd_base.cmd_size); 4559 return cmd_size; 4560} 4561void GLAPIENTRY 4562_mesa_marshal_MultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid* pixels) 4563{ 4564 GET_CURRENT_CONTEXT(ctx); 4565 int cmd_size = sizeof(struct marshal_cmd_MultiTexSubImage1DEXT); 4566 struct marshal_cmd_MultiTexSubImage1DEXT *cmd; 4567 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 4568 _mesa_glthread_finish_before(ctx, "MultiTexSubImage1DEXT"); 4569 CALL_MultiTexSubImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, width, format, type, pixels)); 4570 return; 4571 } 4572 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexSubImage1DEXT, cmd_size); 4573 cmd->texunit = texunit; 4574 cmd->target = target; 4575 cmd->level = level; 4576 cmd->xoffset = xoffset; 4577 cmd->width = width; 4578 cmd->format = format; 4579 cmd->type = type; 4580 cmd->pixels = pixels; 4581} 4582 4583 4584/* MultiTexSubImage2DEXT: marshalled asynchronously */ 4585struct marshal_cmd_MultiTexSubImage2DEXT 4586{ 4587 struct marshal_cmd_base cmd_base; 4588 GLenum texunit; 4589 GLenum target; 4590 GLint level; 4591 GLint xoffset; 4592 GLint yoffset; 4593 GLsizei width; 4594 GLsizei height; 4595 GLenum format; 4596 GLenum type; 4597 const GLvoid* pixels; 4598}; 4599uint32_t 4600_mesa_unmarshal_MultiTexSubImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexSubImage2DEXT *cmd, const uint64_t *last) 4601{ 4602 GLenum texunit = cmd->texunit; 4603 GLenum target = cmd->target; 4604 GLint level = cmd->level; 4605 GLint xoffset = cmd->xoffset; 4606 GLint yoffset = cmd->yoffset; 4607 GLsizei width = cmd->width; 4608 GLsizei height = cmd->height; 4609 GLenum format = cmd->format; 4610 GLenum type = cmd->type; 4611 const GLvoid* pixels = cmd->pixels; 4612 CALL_MultiTexSubImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, width, height, format, type, pixels)); 4613 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexSubImage2DEXT), 8) / 8); 4614 assert (cmd_size == cmd->cmd_base.cmd_size); 4615 return cmd_size; 4616} 4617void GLAPIENTRY 4618_mesa_marshal_MultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) 4619{ 4620 GET_CURRENT_CONTEXT(ctx); 4621 int cmd_size = sizeof(struct marshal_cmd_MultiTexSubImage2DEXT); 4622 struct marshal_cmd_MultiTexSubImage2DEXT *cmd; 4623 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 4624 _mesa_glthread_finish_before(ctx, "MultiTexSubImage2DEXT"); 4625 CALL_MultiTexSubImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, width, height, format, type, pixels)); 4626 return; 4627 } 4628 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexSubImage2DEXT, cmd_size); 4629 cmd->texunit = texunit; 4630 cmd->target = target; 4631 cmd->level = level; 4632 cmd->xoffset = xoffset; 4633 cmd->yoffset = yoffset; 4634 cmd->width = width; 4635 cmd->height = height; 4636 cmd->format = format; 4637 cmd->type = type; 4638 cmd->pixels = pixels; 4639} 4640 4641 4642/* MultiTexSubImage3DEXT: marshalled asynchronously */ 4643struct marshal_cmd_MultiTexSubImage3DEXT 4644{ 4645 struct marshal_cmd_base cmd_base; 4646 GLenum texunit; 4647 GLenum target; 4648 GLint level; 4649 GLint xoffset; 4650 GLint yoffset; 4651 GLint zoffset; 4652 GLsizei width; 4653 GLsizei height; 4654 GLsizei depth; 4655 GLenum format; 4656 GLenum type; 4657 const GLvoid* pixels; 4658}; 4659uint32_t 4660_mesa_unmarshal_MultiTexSubImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexSubImage3DEXT *cmd, const uint64_t *last) 4661{ 4662 GLenum texunit = cmd->texunit; 4663 GLenum target = cmd->target; 4664 GLint level = cmd->level; 4665 GLint xoffset = cmd->xoffset; 4666 GLint yoffset = cmd->yoffset; 4667 GLint zoffset = cmd->zoffset; 4668 GLsizei width = cmd->width; 4669 GLsizei height = cmd->height; 4670 GLsizei depth = cmd->depth; 4671 GLenum format = cmd->format; 4672 GLenum type = cmd->type; 4673 const GLvoid* pixels = cmd->pixels; 4674 CALL_MultiTexSubImage3DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels)); 4675 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexSubImage3DEXT), 8) / 8); 4676 assert (cmd_size == cmd->cmd_base.cmd_size); 4677 return cmd_size; 4678} 4679void GLAPIENTRY 4680_mesa_marshal_MultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) 4681{ 4682 GET_CURRENT_CONTEXT(ctx); 4683 int cmd_size = sizeof(struct marshal_cmd_MultiTexSubImage3DEXT); 4684 struct marshal_cmd_MultiTexSubImage3DEXT *cmd; 4685 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 4686 _mesa_glthread_finish_before(ctx, "MultiTexSubImage3DEXT"); 4687 CALL_MultiTexSubImage3DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels)); 4688 return; 4689 } 4690 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexSubImage3DEXT, cmd_size); 4691 cmd->texunit = texunit; 4692 cmd->target = target; 4693 cmd->level = level; 4694 cmd->xoffset = xoffset; 4695 cmd->yoffset = yoffset; 4696 cmd->zoffset = zoffset; 4697 cmd->width = width; 4698 cmd->height = height; 4699 cmd->depth = depth; 4700 cmd->format = format; 4701 cmd->type = type; 4702 cmd->pixels = pixels; 4703} 4704 4705 4706/* CopyMultiTexImage1DEXT: marshalled asynchronously */ 4707struct marshal_cmd_CopyMultiTexImage1DEXT 4708{ 4709 struct marshal_cmd_base cmd_base; 4710 GLenum texunit; 4711 GLenum target; 4712 GLint level; 4713 GLenum internalformat; 4714 GLint x; 4715 GLint y; 4716 GLsizei width; 4717 GLint border; 4718}; 4719uint32_t 4720_mesa_unmarshal_CopyMultiTexImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyMultiTexImage1DEXT *cmd, const uint64_t *last) 4721{ 4722 GLenum texunit = cmd->texunit; 4723 GLenum target = cmd->target; 4724 GLint level = cmd->level; 4725 GLenum internalformat = cmd->internalformat; 4726 GLint x = cmd->x; 4727 GLint y = cmd->y; 4728 GLsizei width = cmd->width; 4729 GLint border = cmd->border; 4730 CALL_CopyMultiTexImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalformat, x, y, width, border)); 4731 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyMultiTexImage1DEXT), 8) / 8); 4732 assert (cmd_size == cmd->cmd_base.cmd_size); 4733 return cmd_size; 4734} 4735void GLAPIENTRY 4736_mesa_marshal_CopyMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) 4737{ 4738 GET_CURRENT_CONTEXT(ctx); 4739 int cmd_size = sizeof(struct marshal_cmd_CopyMultiTexImage1DEXT); 4740 struct marshal_cmd_CopyMultiTexImage1DEXT *cmd; 4741 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyMultiTexImage1DEXT, cmd_size); 4742 cmd->texunit = texunit; 4743 cmd->target = target; 4744 cmd->level = level; 4745 cmd->internalformat = internalformat; 4746 cmd->x = x; 4747 cmd->y = y; 4748 cmd->width = width; 4749 cmd->border = border; 4750} 4751 4752 4753/* CopyMultiTexImage2DEXT: marshalled asynchronously */ 4754struct marshal_cmd_CopyMultiTexImage2DEXT 4755{ 4756 struct marshal_cmd_base cmd_base; 4757 GLenum texunit; 4758 GLenum target; 4759 GLint level; 4760 GLenum internalformat; 4761 GLint x; 4762 GLint y; 4763 GLsizei width; 4764 GLsizei height; 4765 GLint border; 4766}; 4767uint32_t 4768_mesa_unmarshal_CopyMultiTexImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyMultiTexImage2DEXT *cmd, const uint64_t *last) 4769{ 4770 GLenum texunit = cmd->texunit; 4771 GLenum target = cmd->target; 4772 GLint level = cmd->level; 4773 GLenum internalformat = cmd->internalformat; 4774 GLint x = cmd->x; 4775 GLint y = cmd->y; 4776 GLsizei width = cmd->width; 4777 GLsizei height = cmd->height; 4778 GLint border = cmd->border; 4779 CALL_CopyMultiTexImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalformat, x, y, width, height, border)); 4780 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyMultiTexImage2DEXT), 8) / 8); 4781 assert (cmd_size == cmd->cmd_base.cmd_size); 4782 return cmd_size; 4783} 4784void GLAPIENTRY 4785_mesa_marshal_CopyMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) 4786{ 4787 GET_CURRENT_CONTEXT(ctx); 4788 int cmd_size = sizeof(struct marshal_cmd_CopyMultiTexImage2DEXT); 4789 struct marshal_cmd_CopyMultiTexImage2DEXT *cmd; 4790 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyMultiTexImage2DEXT, cmd_size); 4791 cmd->texunit = texunit; 4792 cmd->target = target; 4793 cmd->level = level; 4794 cmd->internalformat = internalformat; 4795 cmd->x = x; 4796 cmd->y = y; 4797 cmd->width = width; 4798 cmd->height = height; 4799 cmd->border = border; 4800} 4801 4802 4803/* CopyMultiTexSubImage1DEXT: marshalled asynchronously */ 4804struct marshal_cmd_CopyMultiTexSubImage1DEXT 4805{ 4806 struct marshal_cmd_base cmd_base; 4807 GLenum texunit; 4808 GLenum target; 4809 GLint level; 4810 GLint xoffset; 4811 GLint x; 4812 GLint y; 4813 GLsizei width; 4814}; 4815uint32_t 4816_mesa_unmarshal_CopyMultiTexSubImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyMultiTexSubImage1DEXT *cmd, const uint64_t *last) 4817{ 4818 GLenum texunit = cmd->texunit; 4819 GLenum target = cmd->target; 4820 GLint level = cmd->level; 4821 GLint xoffset = cmd->xoffset; 4822 GLint x = cmd->x; 4823 GLint y = cmd->y; 4824 GLsizei width = cmd->width; 4825 CALL_CopyMultiTexSubImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, x, y, width)); 4826 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyMultiTexSubImage1DEXT), 8) / 8); 4827 assert (cmd_size == cmd->cmd_base.cmd_size); 4828 return cmd_size; 4829} 4830void GLAPIENTRY 4831_mesa_marshal_CopyMultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) 4832{ 4833 GET_CURRENT_CONTEXT(ctx); 4834 int cmd_size = sizeof(struct marshal_cmd_CopyMultiTexSubImage1DEXT); 4835 struct marshal_cmd_CopyMultiTexSubImage1DEXT *cmd; 4836 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyMultiTexSubImage1DEXT, cmd_size); 4837 cmd->texunit = texunit; 4838 cmd->target = target; 4839 cmd->level = level; 4840 cmd->xoffset = xoffset; 4841 cmd->x = x; 4842 cmd->y = y; 4843 cmd->width = width; 4844} 4845 4846 4847/* CopyMultiTexSubImage2DEXT: marshalled asynchronously */ 4848struct marshal_cmd_CopyMultiTexSubImage2DEXT 4849{ 4850 struct marshal_cmd_base cmd_base; 4851 GLenum texunit; 4852 GLenum target; 4853 GLint level; 4854 GLint xoffset; 4855 GLint yoffset; 4856 GLint x; 4857 GLint y; 4858 GLsizei width; 4859 GLsizei height; 4860}; 4861uint32_t 4862_mesa_unmarshal_CopyMultiTexSubImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyMultiTexSubImage2DEXT *cmd, const uint64_t *last) 4863{ 4864 GLenum texunit = cmd->texunit; 4865 GLenum target = cmd->target; 4866 GLint level = cmd->level; 4867 GLint xoffset = cmd->xoffset; 4868 GLint yoffset = cmd->yoffset; 4869 GLint x = cmd->x; 4870 GLint y = cmd->y; 4871 GLsizei width = cmd->width; 4872 GLsizei height = cmd->height; 4873 CALL_CopyMultiTexSubImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, x, y, width, height)); 4874 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyMultiTexSubImage2DEXT), 8) / 8); 4875 assert (cmd_size == cmd->cmd_base.cmd_size); 4876 return cmd_size; 4877} 4878void GLAPIENTRY 4879_mesa_marshal_CopyMultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) 4880{ 4881 GET_CURRENT_CONTEXT(ctx); 4882 int cmd_size = sizeof(struct marshal_cmd_CopyMultiTexSubImage2DEXT); 4883 struct marshal_cmd_CopyMultiTexSubImage2DEXT *cmd; 4884 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyMultiTexSubImage2DEXT, cmd_size); 4885 cmd->texunit = texunit; 4886 cmd->target = target; 4887 cmd->level = level; 4888 cmd->xoffset = xoffset; 4889 cmd->yoffset = yoffset; 4890 cmd->x = x; 4891 cmd->y = y; 4892 cmd->width = width; 4893 cmd->height = height; 4894} 4895 4896 4897/* CopyMultiTexSubImage3DEXT: marshalled asynchronously */ 4898struct marshal_cmd_CopyMultiTexSubImage3DEXT 4899{ 4900 struct marshal_cmd_base cmd_base; 4901 GLenum texunit; 4902 GLenum target; 4903 GLint level; 4904 GLint xoffset; 4905 GLint yoffset; 4906 GLint zoffset; 4907 GLint x; 4908 GLint y; 4909 GLsizei width; 4910 GLsizei height; 4911}; 4912uint32_t 4913_mesa_unmarshal_CopyMultiTexSubImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_CopyMultiTexSubImage3DEXT *cmd, const uint64_t *last) 4914{ 4915 GLenum texunit = cmd->texunit; 4916 GLenum target = cmd->target; 4917 GLint level = cmd->level; 4918 GLint xoffset = cmd->xoffset; 4919 GLint yoffset = cmd->yoffset; 4920 GLint zoffset = cmd->zoffset; 4921 GLint x = cmd->x; 4922 GLint y = cmd->y; 4923 GLsizei width = cmd->width; 4924 GLsizei height = cmd->height; 4925 CALL_CopyMultiTexSubImage3DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height)); 4926 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyMultiTexSubImage3DEXT), 8) / 8); 4927 assert (cmd_size == cmd->cmd_base.cmd_size); 4928 return cmd_size; 4929} 4930void GLAPIENTRY 4931_mesa_marshal_CopyMultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) 4932{ 4933 GET_CURRENT_CONTEXT(ctx); 4934 int cmd_size = sizeof(struct marshal_cmd_CopyMultiTexSubImage3DEXT); 4935 struct marshal_cmd_CopyMultiTexSubImage3DEXT *cmd; 4936 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyMultiTexSubImage3DEXT, cmd_size); 4937 cmd->texunit = texunit; 4938 cmd->target = target; 4939 cmd->level = level; 4940 cmd->xoffset = xoffset; 4941 cmd->yoffset = yoffset; 4942 cmd->zoffset = zoffset; 4943 cmd->x = x; 4944 cmd->y = y; 4945 cmd->width = width; 4946 cmd->height = height; 4947} 4948 4949 4950/* MultiTexGendEXT: marshalled asynchronously */ 4951struct marshal_cmd_MultiTexGendEXT 4952{ 4953 struct marshal_cmd_base cmd_base; 4954 GLenum texunit; 4955 GLenum coord; 4956 GLenum pname; 4957 GLdouble param; 4958}; 4959uint32_t 4960_mesa_unmarshal_MultiTexGendEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexGendEXT *cmd, const uint64_t *last) 4961{ 4962 GLenum texunit = cmd->texunit; 4963 GLenum coord = cmd->coord; 4964 GLenum pname = cmd->pname; 4965 GLdouble param = cmd->param; 4966 CALL_MultiTexGendEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 4967 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexGendEXT), 8) / 8); 4968 assert (cmd_size == cmd->cmd_base.cmd_size); 4969 return cmd_size; 4970} 4971void GLAPIENTRY 4972_mesa_marshal_MultiTexGendEXT(GLenum texunit, GLenum coord, GLenum pname, GLdouble param) 4973{ 4974 GET_CURRENT_CONTEXT(ctx); 4975 int cmd_size = sizeof(struct marshal_cmd_MultiTexGendEXT); 4976 struct marshal_cmd_MultiTexGendEXT *cmd; 4977 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexGendEXT, cmd_size); 4978 cmd->texunit = texunit; 4979 cmd->coord = coord; 4980 cmd->pname = pname; 4981 cmd->param = param; 4982} 4983 4984 4985/* MultiTexGendvEXT: marshalled asynchronously */ 4986struct marshal_cmd_MultiTexGendvEXT 4987{ 4988 struct marshal_cmd_base cmd_base; 4989 GLenum texunit; 4990 GLenum coord; 4991 GLenum pname; 4992 /* Next safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLdouble)) bytes are GLdouble param[_mesa_texgen_enum_to_count(pname)] */ 4993}; 4994uint32_t 4995_mesa_unmarshal_MultiTexGendvEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexGendvEXT *cmd, const uint64_t *last) 4996{ 4997 GLenum texunit = cmd->texunit; 4998 GLenum coord = cmd->coord; 4999 GLenum pname = cmd->pname; 5000 GLdouble * param; 5001 const char *variable_data = (const char *) (cmd + 1); 5002 param = (GLdouble *) variable_data; 5003 CALL_MultiTexGendvEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5004 return cmd->cmd_base.cmd_size; 5005} 5006void GLAPIENTRY 5007_mesa_marshal_MultiTexGendvEXT(GLenum texunit, GLenum coord, GLenum pname, const GLdouble* param) 5008{ 5009 GET_CURRENT_CONTEXT(ctx); 5010 int param_size = safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLdouble)); 5011 int cmd_size = sizeof(struct marshal_cmd_MultiTexGendvEXT) + param_size; 5012 struct marshal_cmd_MultiTexGendvEXT *cmd; 5013 if (unlikely(param_size < 0 || (param_size > 0 && !param) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 5014 _mesa_glthread_finish_before(ctx, "MultiTexGendvEXT"); 5015 CALL_MultiTexGendvEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5016 return; 5017 } 5018 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexGendvEXT, cmd_size); 5019 cmd->texunit = texunit; 5020 cmd->coord = coord; 5021 cmd->pname = pname; 5022 char *variable_data = (char *) (cmd + 1); 5023 memcpy(variable_data, param, param_size); 5024} 5025 5026 5027/* MultiTexGenfEXT: marshalled asynchronously */ 5028struct marshal_cmd_MultiTexGenfEXT 5029{ 5030 struct marshal_cmd_base cmd_base; 5031 GLenum texunit; 5032 GLenum coord; 5033 GLenum pname; 5034 GLfloat param; 5035}; 5036uint32_t 5037_mesa_unmarshal_MultiTexGenfEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexGenfEXT *cmd, const uint64_t *last) 5038{ 5039 GLenum texunit = cmd->texunit; 5040 GLenum coord = cmd->coord; 5041 GLenum pname = cmd->pname; 5042 GLfloat param = cmd->param; 5043 CALL_MultiTexGenfEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5044 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexGenfEXT), 8) / 8); 5045 assert (cmd_size == cmd->cmd_base.cmd_size); 5046 return cmd_size; 5047} 5048void GLAPIENTRY 5049_mesa_marshal_MultiTexGenfEXT(GLenum texunit, GLenum coord, GLenum pname, GLfloat param) 5050{ 5051 GET_CURRENT_CONTEXT(ctx); 5052 int cmd_size = sizeof(struct marshal_cmd_MultiTexGenfEXT); 5053 struct marshal_cmd_MultiTexGenfEXT *cmd; 5054 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexGenfEXT, cmd_size); 5055 cmd->texunit = texunit; 5056 cmd->coord = coord; 5057 cmd->pname = pname; 5058 cmd->param = param; 5059} 5060 5061 5062/* MultiTexGenfvEXT: marshalled asynchronously */ 5063struct marshal_cmd_MultiTexGenfvEXT 5064{ 5065 struct marshal_cmd_base cmd_base; 5066 GLenum texunit; 5067 GLenum coord; 5068 GLenum pname; 5069 /* Next safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat param[_mesa_texgen_enum_to_count(pname)] */ 5070}; 5071uint32_t 5072_mesa_unmarshal_MultiTexGenfvEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexGenfvEXT *cmd, const uint64_t *last) 5073{ 5074 GLenum texunit = cmd->texunit; 5075 GLenum coord = cmd->coord; 5076 GLenum pname = cmd->pname; 5077 GLfloat * param; 5078 const char *variable_data = (const char *) (cmd + 1); 5079 param = (GLfloat *) variable_data; 5080 CALL_MultiTexGenfvEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5081 return cmd->cmd_base.cmd_size; 5082} 5083void GLAPIENTRY 5084_mesa_marshal_MultiTexGenfvEXT(GLenum texunit, GLenum coord, GLenum pname, const GLfloat * param) 5085{ 5086 GET_CURRENT_CONTEXT(ctx); 5087 int param_size = safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLfloat)); 5088 int cmd_size = sizeof(struct marshal_cmd_MultiTexGenfvEXT) + param_size; 5089 struct marshal_cmd_MultiTexGenfvEXT *cmd; 5090 if (unlikely(param_size < 0 || (param_size > 0 && !param) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 5091 _mesa_glthread_finish_before(ctx, "MultiTexGenfvEXT"); 5092 CALL_MultiTexGenfvEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5093 return; 5094 } 5095 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexGenfvEXT, cmd_size); 5096 cmd->texunit = texunit; 5097 cmd->coord = coord; 5098 cmd->pname = pname; 5099 char *variable_data = (char *) (cmd + 1); 5100 memcpy(variable_data, param, param_size); 5101} 5102 5103 5104/* MultiTexGeniEXT: marshalled asynchronously */ 5105struct marshal_cmd_MultiTexGeniEXT 5106{ 5107 struct marshal_cmd_base cmd_base; 5108 GLenum texunit; 5109 GLenum coord; 5110 GLenum pname; 5111 GLint param; 5112}; 5113uint32_t 5114_mesa_unmarshal_MultiTexGeniEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexGeniEXT *cmd, const uint64_t *last) 5115{ 5116 GLenum texunit = cmd->texunit; 5117 GLenum coord = cmd->coord; 5118 GLenum pname = cmd->pname; 5119 GLint param = cmd->param; 5120 CALL_MultiTexGeniEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5121 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexGeniEXT), 8) / 8); 5122 assert (cmd_size == cmd->cmd_base.cmd_size); 5123 return cmd_size; 5124} 5125void GLAPIENTRY 5126_mesa_marshal_MultiTexGeniEXT(GLenum texunit, GLenum coord, GLenum pname, GLint param) 5127{ 5128 GET_CURRENT_CONTEXT(ctx); 5129 int cmd_size = sizeof(struct marshal_cmd_MultiTexGeniEXT); 5130 struct marshal_cmd_MultiTexGeniEXT *cmd; 5131 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexGeniEXT, cmd_size); 5132 cmd->texunit = texunit; 5133 cmd->coord = coord; 5134 cmd->pname = pname; 5135 cmd->param = param; 5136} 5137 5138 5139/* MultiTexGenivEXT: marshalled asynchronously */ 5140struct marshal_cmd_MultiTexGenivEXT 5141{ 5142 struct marshal_cmd_base cmd_base; 5143 GLenum texunit; 5144 GLenum coord; 5145 GLenum pname; 5146 /* Next safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint param[_mesa_texgen_enum_to_count(pname)] */ 5147}; 5148uint32_t 5149_mesa_unmarshal_MultiTexGenivEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexGenivEXT *cmd, const uint64_t *last) 5150{ 5151 GLenum texunit = cmd->texunit; 5152 GLenum coord = cmd->coord; 5153 GLenum pname = cmd->pname; 5154 GLint * param; 5155 const char *variable_data = (const char *) (cmd + 1); 5156 param = (GLint *) variable_data; 5157 CALL_MultiTexGenivEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5158 return cmd->cmd_base.cmd_size; 5159} 5160void GLAPIENTRY 5161_mesa_marshal_MultiTexGenivEXT(GLenum texunit, GLenum coord, GLenum pname, const GLint * param) 5162{ 5163 GET_CURRENT_CONTEXT(ctx); 5164 int param_size = safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLint)); 5165 int cmd_size = sizeof(struct marshal_cmd_MultiTexGenivEXT) + param_size; 5166 struct marshal_cmd_MultiTexGenivEXT *cmd; 5167 if (unlikely(param_size < 0 || (param_size > 0 && !param) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 5168 _mesa_glthread_finish_before(ctx, "MultiTexGenivEXT"); 5169 CALL_MultiTexGenivEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5170 return; 5171 } 5172 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexGenivEXT, cmd_size); 5173 cmd->texunit = texunit; 5174 cmd->coord = coord; 5175 cmd->pname = pname; 5176 char *variable_data = (char *) (cmd + 1); 5177 memcpy(variable_data, param, param_size); 5178} 5179 5180 5181/* GetMultiTexGendvEXT: marshalled synchronously */ 5182void GLAPIENTRY 5183_mesa_marshal_GetMultiTexGendvEXT(GLenum texunit, GLenum coord, GLenum pname, GLdouble * param) 5184{ 5185 GET_CURRENT_CONTEXT(ctx); 5186 _mesa_glthread_finish_before(ctx, "GetMultiTexGendvEXT"); 5187 CALL_GetMultiTexGendvEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5188} 5189 5190 5191/* GetMultiTexGenfvEXT: marshalled synchronously */ 5192void GLAPIENTRY 5193_mesa_marshal_GetMultiTexGenfvEXT(GLenum texunit, GLenum coord, GLenum pname, GLfloat * param) 5194{ 5195 GET_CURRENT_CONTEXT(ctx); 5196 _mesa_glthread_finish_before(ctx, "GetMultiTexGenfvEXT"); 5197 CALL_GetMultiTexGenfvEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5198} 5199 5200 5201/* GetMultiTexGenivEXT: marshalled synchronously */ 5202void GLAPIENTRY 5203_mesa_marshal_GetMultiTexGenivEXT(GLenum texunit, GLenum coord, GLenum pname, GLint * param) 5204{ 5205 GET_CURRENT_CONTEXT(ctx); 5206 _mesa_glthread_finish_before(ctx, "GetMultiTexGenivEXT"); 5207 CALL_GetMultiTexGenivEXT(ctx->CurrentServerDispatch, (texunit, coord, pname, param)); 5208} 5209 5210 5211/* MultiTexCoordPointerEXT: marshalled asynchronously */ 5212struct marshal_cmd_MultiTexCoordPointerEXT 5213{ 5214 struct marshal_cmd_base cmd_base; 5215 GLenum texunit; 5216 GLint size; 5217 GLenum type; 5218 GLsizei stride; 5219 const GLvoid * pointer; 5220}; 5221uint32_t 5222_mesa_unmarshal_MultiTexCoordPointerEXT(struct gl_context *ctx, const struct marshal_cmd_MultiTexCoordPointerEXT *cmd, const uint64_t *last) 5223{ 5224 GLenum texunit = cmd->texunit; 5225 GLint size = cmd->size; 5226 GLenum type = cmd->type; 5227 GLsizei stride = cmd->stride; 5228 const GLvoid * pointer = cmd->pointer; 5229 CALL_MultiTexCoordPointerEXT(ctx->CurrentServerDispatch, (texunit, size, type, stride, pointer)); 5230 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MultiTexCoordPointerEXT), 8) / 8); 5231 assert (cmd_size == cmd->cmd_base.cmd_size); 5232 return cmd_size; 5233} 5234void GLAPIENTRY 5235_mesa_marshal_MultiTexCoordPointerEXT(GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) 5236{ 5237 GET_CURRENT_CONTEXT(ctx); 5238 int cmd_size = sizeof(struct marshal_cmd_MultiTexCoordPointerEXT); 5239 struct marshal_cmd_MultiTexCoordPointerEXT *cmd; 5240 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MultiTexCoordPointerEXT, cmd_size); 5241 cmd->texunit = texunit; 5242 cmd->size = size; 5243 cmd->type = type; 5244 cmd->stride = stride; 5245 cmd->pointer = pointer; 5246 if (COMPAT) _mesa_glthread_AttribPointer(ctx, VERT_ATTRIB_TEX(texunit - GL_TEXTURE0), size, type, stride, pointer); 5247} 5248 5249 5250/* MatrixLoadTransposefEXT: marshalled asynchronously */ 5251struct marshal_cmd_MatrixLoadTransposefEXT 5252{ 5253 struct marshal_cmd_base cmd_base; 5254 GLenum matrixMode; 5255 GLfloat m[16]; 5256}; 5257uint32_t 5258_mesa_unmarshal_MatrixLoadTransposefEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixLoadTransposefEXT *cmd, const uint64_t *last) 5259{ 5260 GLenum matrixMode = cmd->matrixMode; 5261 const GLfloat * m = cmd->m; 5262 CALL_MatrixLoadTransposefEXT(ctx->CurrentServerDispatch, (matrixMode, m)); 5263 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixLoadTransposefEXT), 8) / 8); 5264 assert (cmd_size == cmd->cmd_base.cmd_size); 5265 return cmd_size; 5266} 5267void GLAPIENTRY 5268_mesa_marshal_MatrixLoadTransposefEXT(GLenum matrixMode, const GLfloat * m) 5269{ 5270 GET_CURRENT_CONTEXT(ctx); 5271 int cmd_size = sizeof(struct marshal_cmd_MatrixLoadTransposefEXT); 5272 struct marshal_cmd_MatrixLoadTransposefEXT *cmd; 5273 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixLoadTransposefEXT, cmd_size); 5274 cmd->matrixMode = matrixMode; 5275 memcpy(cmd->m, m, 16 * sizeof(GLfloat)); 5276} 5277 5278 5279/* MatrixLoadTransposedEXT: marshalled asynchronously */ 5280struct marshal_cmd_MatrixLoadTransposedEXT 5281{ 5282 struct marshal_cmd_base cmd_base; 5283 GLenum matrixMode; 5284 GLdouble m[16]; 5285}; 5286uint32_t 5287_mesa_unmarshal_MatrixLoadTransposedEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixLoadTransposedEXT *cmd, const uint64_t *last) 5288{ 5289 GLenum matrixMode = cmd->matrixMode; 5290 const GLdouble * m = cmd->m; 5291 CALL_MatrixLoadTransposedEXT(ctx->CurrentServerDispatch, (matrixMode, m)); 5292 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixLoadTransposedEXT), 8) / 8); 5293 assert (cmd_size == cmd->cmd_base.cmd_size); 5294 return cmd_size; 5295} 5296void GLAPIENTRY 5297_mesa_marshal_MatrixLoadTransposedEXT(GLenum matrixMode, const GLdouble * m) 5298{ 5299 GET_CURRENT_CONTEXT(ctx); 5300 int cmd_size = sizeof(struct marshal_cmd_MatrixLoadTransposedEXT); 5301 struct marshal_cmd_MatrixLoadTransposedEXT *cmd; 5302 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixLoadTransposedEXT, cmd_size); 5303 cmd->matrixMode = matrixMode; 5304 memcpy(cmd->m, m, 16 * sizeof(GLdouble)); 5305} 5306 5307 5308/* MatrixMultTransposefEXT: marshalled asynchronously */ 5309struct marshal_cmd_MatrixMultTransposefEXT 5310{ 5311 struct marshal_cmd_base cmd_base; 5312 GLenum matrixMode; 5313 GLfloat m[16]; 5314}; 5315uint32_t 5316_mesa_unmarshal_MatrixMultTransposefEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixMultTransposefEXT *cmd, const uint64_t *last) 5317{ 5318 GLenum matrixMode = cmd->matrixMode; 5319 const GLfloat * m = cmd->m; 5320 CALL_MatrixMultTransposefEXT(ctx->CurrentServerDispatch, (matrixMode, m)); 5321 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixMultTransposefEXT), 8) / 8); 5322 assert (cmd_size == cmd->cmd_base.cmd_size); 5323 return cmd_size; 5324} 5325void GLAPIENTRY 5326_mesa_marshal_MatrixMultTransposefEXT(GLenum matrixMode, const GLfloat * m) 5327{ 5328 GET_CURRENT_CONTEXT(ctx); 5329 int cmd_size = sizeof(struct marshal_cmd_MatrixMultTransposefEXT); 5330 struct marshal_cmd_MatrixMultTransposefEXT *cmd; 5331 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixMultTransposefEXT, cmd_size); 5332 cmd->matrixMode = matrixMode; 5333 memcpy(cmd->m, m, 16 * sizeof(GLfloat)); 5334} 5335 5336 5337/* MatrixMultTransposedEXT: marshalled asynchronously */ 5338struct marshal_cmd_MatrixMultTransposedEXT 5339{ 5340 struct marshal_cmd_base cmd_base; 5341 GLenum matrixMode; 5342 GLdouble m[16]; 5343}; 5344uint32_t 5345_mesa_unmarshal_MatrixMultTransposedEXT(struct gl_context *ctx, const struct marshal_cmd_MatrixMultTransposedEXT *cmd, const uint64_t *last) 5346{ 5347 GLenum matrixMode = cmd->matrixMode; 5348 const GLdouble * m = cmd->m; 5349 CALL_MatrixMultTransposedEXT(ctx->CurrentServerDispatch, (matrixMode, m)); 5350 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MatrixMultTransposedEXT), 8) / 8); 5351 assert (cmd_size == cmd->cmd_base.cmd_size); 5352 return cmd_size; 5353} 5354void GLAPIENTRY 5355_mesa_marshal_MatrixMultTransposedEXT(GLenum matrixMode, const GLdouble * m) 5356{ 5357 GET_CURRENT_CONTEXT(ctx); 5358 int cmd_size = sizeof(struct marshal_cmd_MatrixMultTransposedEXT); 5359 struct marshal_cmd_MatrixMultTransposedEXT *cmd; 5360 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MatrixMultTransposedEXT, cmd_size); 5361 cmd->matrixMode = matrixMode; 5362 memcpy(cmd->m, m, 16 * sizeof(GLdouble)); 5363} 5364 5365 5366/* CompressedTextureImage1DEXT: marshalled asynchronously */ 5367struct marshal_cmd_CompressedTextureImage1DEXT 5368{ 5369 struct marshal_cmd_base cmd_base; 5370 GLuint texture; 5371 GLenum target; 5372 GLint level; 5373 GLenum internalFormat; 5374 GLsizei width; 5375 GLsizei border; 5376 GLsizei imageSize; 5377 const GLvoid * data; 5378}; 5379uint32_t 5380_mesa_unmarshal_CompressedTextureImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedTextureImage1DEXT *cmd, const uint64_t *last) 5381{ 5382 GLuint texture = cmd->texture; 5383 GLenum target = cmd->target; 5384 GLint level = cmd->level; 5385 GLenum internalFormat = cmd->internalFormat; 5386 GLsizei width = cmd->width; 5387 GLsizei border = cmd->border; 5388 GLsizei imageSize = cmd->imageSize; 5389 const GLvoid * data = cmd->data; 5390 CALL_CompressedTextureImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, border, imageSize, data)); 5391 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedTextureImage1DEXT), 8) / 8); 5392 assert (cmd_size == cmd->cmd_base.cmd_size); 5393 return cmd_size; 5394} 5395void GLAPIENTRY 5396_mesa_marshal_CompressedTextureImage1DEXT(GLuint texture, GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei border, GLsizei imageSize, const GLvoid * data) 5397{ 5398 GET_CURRENT_CONTEXT(ctx); 5399 int cmd_size = sizeof(struct marshal_cmd_CompressedTextureImage1DEXT); 5400 struct marshal_cmd_CompressedTextureImage1DEXT *cmd; 5401 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5402 _mesa_glthread_finish_before(ctx, "CompressedTextureImage1DEXT"); 5403 CALL_CompressedTextureImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, border, imageSize, data)); 5404 return; 5405 } 5406 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedTextureImage1DEXT, cmd_size); 5407 cmd->texture = texture; 5408 cmd->target = target; 5409 cmd->level = level; 5410 cmd->internalFormat = internalFormat; 5411 cmd->width = width; 5412 cmd->border = border; 5413 cmd->imageSize = imageSize; 5414 cmd->data = data; 5415} 5416 5417 5418/* CompressedTextureImage2DEXT: marshalled asynchronously */ 5419struct marshal_cmd_CompressedTextureImage2DEXT 5420{ 5421 struct marshal_cmd_base cmd_base; 5422 GLuint texture; 5423 GLenum target; 5424 GLint level; 5425 GLenum internalFormat; 5426 GLsizei width; 5427 GLsizei height; 5428 GLsizei border; 5429 GLsizei imageSize; 5430 const GLvoid * data; 5431}; 5432uint32_t 5433_mesa_unmarshal_CompressedTextureImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedTextureImage2DEXT *cmd, const uint64_t *last) 5434{ 5435 GLuint texture = cmd->texture; 5436 GLenum target = cmd->target; 5437 GLint level = cmd->level; 5438 GLenum internalFormat = cmd->internalFormat; 5439 GLsizei width = cmd->width; 5440 GLsizei height = cmd->height; 5441 GLsizei border = cmd->border; 5442 GLsizei imageSize = cmd->imageSize; 5443 const GLvoid * data = cmd->data; 5444 CALL_CompressedTextureImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, height, border, imageSize, data)); 5445 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedTextureImage2DEXT), 8) / 8); 5446 assert (cmd_size == cmd->cmd_base.cmd_size); 5447 return cmd_size; 5448} 5449void GLAPIENTRY 5450_mesa_marshal_CompressedTextureImage2DEXT(GLuint texture, GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei border, GLsizei imageSize, const GLvoid * data) 5451{ 5452 GET_CURRENT_CONTEXT(ctx); 5453 int cmd_size = sizeof(struct marshal_cmd_CompressedTextureImage2DEXT); 5454 struct marshal_cmd_CompressedTextureImage2DEXT *cmd; 5455 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5456 _mesa_glthread_finish_before(ctx, "CompressedTextureImage2DEXT"); 5457 CALL_CompressedTextureImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, height, border, imageSize, data)); 5458 return; 5459 } 5460 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedTextureImage2DEXT, cmd_size); 5461 cmd->texture = texture; 5462 cmd->target = target; 5463 cmd->level = level; 5464 cmd->internalFormat = internalFormat; 5465 cmd->width = width; 5466 cmd->height = height; 5467 cmd->border = border; 5468 cmd->imageSize = imageSize; 5469 cmd->data = data; 5470} 5471 5472 5473/* CompressedTextureImage3DEXT: marshalled asynchronously */ 5474struct marshal_cmd_CompressedTextureImage3DEXT 5475{ 5476 struct marshal_cmd_base cmd_base; 5477 GLuint texture; 5478 GLenum target; 5479 GLint level; 5480 GLenum internalFormat; 5481 GLsizei width; 5482 GLsizei height; 5483 GLsizei depth; 5484 GLsizei border; 5485 GLsizei imageSize; 5486 const GLvoid * data; 5487}; 5488uint32_t 5489_mesa_unmarshal_CompressedTextureImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedTextureImage3DEXT *cmd, const uint64_t *last) 5490{ 5491 GLuint texture = cmd->texture; 5492 GLenum target = cmd->target; 5493 GLint level = cmd->level; 5494 GLenum internalFormat = cmd->internalFormat; 5495 GLsizei width = cmd->width; 5496 GLsizei height = cmd->height; 5497 GLsizei depth = cmd->depth; 5498 GLsizei border = cmd->border; 5499 GLsizei imageSize = cmd->imageSize; 5500 const GLvoid * data = cmd->data; 5501 CALL_CompressedTextureImage3DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, height, depth, border, imageSize, data)); 5502 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedTextureImage3DEXT), 8) / 8); 5503 assert (cmd_size == cmd->cmd_base.cmd_size); 5504 return cmd_size; 5505} 5506void GLAPIENTRY 5507_mesa_marshal_CompressedTextureImage3DEXT(GLuint texture, GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei border, GLsizei imageSize, const GLvoid * data) 5508{ 5509 GET_CURRENT_CONTEXT(ctx); 5510 int cmd_size = sizeof(struct marshal_cmd_CompressedTextureImage3DEXT); 5511 struct marshal_cmd_CompressedTextureImage3DEXT *cmd; 5512 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5513 _mesa_glthread_finish_before(ctx, "CompressedTextureImage3DEXT"); 5514 CALL_CompressedTextureImage3DEXT(ctx->CurrentServerDispatch, (texture, target, level, internalFormat, width, height, depth, border, imageSize, data)); 5515 return; 5516 } 5517 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedTextureImage3DEXT, cmd_size); 5518 cmd->texture = texture; 5519 cmd->target = target; 5520 cmd->level = level; 5521 cmd->internalFormat = internalFormat; 5522 cmd->width = width; 5523 cmd->height = height; 5524 cmd->depth = depth; 5525 cmd->border = border; 5526 cmd->imageSize = imageSize; 5527 cmd->data = data; 5528} 5529 5530 5531/* CompressedTextureSubImage1DEXT: marshalled asynchronously */ 5532struct marshal_cmd_CompressedTextureSubImage1DEXT 5533{ 5534 struct marshal_cmd_base cmd_base; 5535 GLuint texture; 5536 GLenum target; 5537 GLint level; 5538 GLint xoffset; 5539 GLsizei width; 5540 GLenum format; 5541 GLsizei imageSize; 5542 const GLvoid * data; 5543}; 5544uint32_t 5545_mesa_unmarshal_CompressedTextureSubImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedTextureSubImage1DEXT *cmd, const uint64_t *last) 5546{ 5547 GLuint texture = cmd->texture; 5548 GLenum target = cmd->target; 5549 GLint level = cmd->level; 5550 GLint xoffset = cmd->xoffset; 5551 GLsizei width = cmd->width; 5552 GLenum format = cmd->format; 5553 GLsizei imageSize = cmd->imageSize; 5554 const GLvoid * data = cmd->data; 5555 CALL_CompressedTextureSubImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, width, format, imageSize, data)); 5556 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedTextureSubImage1DEXT), 8) / 8); 5557 assert (cmd_size == cmd->cmd_base.cmd_size); 5558 return cmd_size; 5559} 5560void GLAPIENTRY 5561_mesa_marshal_CompressedTextureSubImage1DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) 5562{ 5563 GET_CURRENT_CONTEXT(ctx); 5564 int cmd_size = sizeof(struct marshal_cmd_CompressedTextureSubImage1DEXT); 5565 struct marshal_cmd_CompressedTextureSubImage1DEXT *cmd; 5566 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5567 _mesa_glthread_finish_before(ctx, "CompressedTextureSubImage1DEXT"); 5568 CALL_CompressedTextureSubImage1DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, width, format, imageSize, data)); 5569 return; 5570 } 5571 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedTextureSubImage1DEXT, cmd_size); 5572 cmd->texture = texture; 5573 cmd->target = target; 5574 cmd->level = level; 5575 cmd->xoffset = xoffset; 5576 cmd->width = width; 5577 cmd->format = format; 5578 cmd->imageSize = imageSize; 5579 cmd->data = data; 5580} 5581 5582 5583/* CompressedTextureSubImage2DEXT: marshalled asynchronously */ 5584struct marshal_cmd_CompressedTextureSubImage2DEXT 5585{ 5586 struct marshal_cmd_base cmd_base; 5587 GLuint texture; 5588 GLenum target; 5589 GLint level; 5590 GLint xoffset; 5591 GLint yoffset; 5592 GLsizei width; 5593 GLsizei height; 5594 GLenum format; 5595 GLsizei imageSize; 5596 const GLvoid * data; 5597}; 5598uint32_t 5599_mesa_unmarshal_CompressedTextureSubImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedTextureSubImage2DEXT *cmd, const uint64_t *last) 5600{ 5601 GLuint texture = cmd->texture; 5602 GLenum target = cmd->target; 5603 GLint level = cmd->level; 5604 GLint xoffset = cmd->xoffset; 5605 GLint yoffset = cmd->yoffset; 5606 GLsizei width = cmd->width; 5607 GLsizei height = cmd->height; 5608 GLenum format = cmd->format; 5609 GLsizei imageSize = cmd->imageSize; 5610 const GLvoid * data = cmd->data; 5611 CALL_CompressedTextureSubImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, width, height, format, imageSize, data)); 5612 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedTextureSubImage2DEXT), 8) / 8); 5613 assert (cmd_size == cmd->cmd_base.cmd_size); 5614 return cmd_size; 5615} 5616void GLAPIENTRY 5617_mesa_marshal_CompressedTextureSubImage2DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) 5618{ 5619 GET_CURRENT_CONTEXT(ctx); 5620 int cmd_size = sizeof(struct marshal_cmd_CompressedTextureSubImage2DEXT); 5621 struct marshal_cmd_CompressedTextureSubImage2DEXT *cmd; 5622 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5623 _mesa_glthread_finish_before(ctx, "CompressedTextureSubImage2DEXT"); 5624 CALL_CompressedTextureSubImage2DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, width, height, format, imageSize, data)); 5625 return; 5626 } 5627 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedTextureSubImage2DEXT, cmd_size); 5628 cmd->texture = texture; 5629 cmd->target = target; 5630 cmd->level = level; 5631 cmd->xoffset = xoffset; 5632 cmd->yoffset = yoffset; 5633 cmd->width = width; 5634 cmd->height = height; 5635 cmd->format = format; 5636 cmd->imageSize = imageSize; 5637 cmd->data = data; 5638} 5639 5640 5641/* CompressedTextureSubImage3DEXT: marshalled asynchronously */ 5642struct marshal_cmd_CompressedTextureSubImage3DEXT 5643{ 5644 struct marshal_cmd_base cmd_base; 5645 GLuint texture; 5646 GLenum target; 5647 GLint level; 5648 GLint xoffset; 5649 GLint yoffset; 5650 GLint zoffset; 5651 GLsizei width; 5652 GLsizei height; 5653 GLsizei depth; 5654 GLenum format; 5655 GLsizei imageSize; 5656 const GLvoid * data; 5657}; 5658uint32_t 5659_mesa_unmarshal_CompressedTextureSubImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedTextureSubImage3DEXT *cmd, const uint64_t *last) 5660{ 5661 GLuint texture = cmd->texture; 5662 GLenum target = cmd->target; 5663 GLint level = cmd->level; 5664 GLint xoffset = cmd->xoffset; 5665 GLint yoffset = cmd->yoffset; 5666 GLint zoffset = cmd->zoffset; 5667 GLsizei width = cmd->width; 5668 GLsizei height = cmd->height; 5669 GLsizei depth = cmd->depth; 5670 GLenum format = cmd->format; 5671 GLsizei imageSize = cmd->imageSize; 5672 const GLvoid * data = cmd->data; 5673 CALL_CompressedTextureSubImage3DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data)); 5674 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedTextureSubImage3DEXT), 8) / 8); 5675 assert (cmd_size == cmd->cmd_base.cmd_size); 5676 return cmd_size; 5677} 5678void GLAPIENTRY 5679_mesa_marshal_CompressedTextureSubImage3DEXT(GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) 5680{ 5681 GET_CURRENT_CONTEXT(ctx); 5682 int cmd_size = sizeof(struct marshal_cmd_CompressedTextureSubImage3DEXT); 5683 struct marshal_cmd_CompressedTextureSubImage3DEXT *cmd; 5684 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5685 _mesa_glthread_finish_before(ctx, "CompressedTextureSubImage3DEXT"); 5686 CALL_CompressedTextureSubImage3DEXT(ctx->CurrentServerDispatch, (texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data)); 5687 return; 5688 } 5689 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedTextureSubImage3DEXT, cmd_size); 5690 cmd->texture = texture; 5691 cmd->target = target; 5692 cmd->level = level; 5693 cmd->xoffset = xoffset; 5694 cmd->yoffset = yoffset; 5695 cmd->zoffset = zoffset; 5696 cmd->width = width; 5697 cmd->height = height; 5698 cmd->depth = depth; 5699 cmd->format = format; 5700 cmd->imageSize = imageSize; 5701 cmd->data = data; 5702} 5703 5704 5705/* GetCompressedTextureImageEXT: marshalled asynchronously */ 5706struct marshal_cmd_GetCompressedTextureImageEXT 5707{ 5708 struct marshal_cmd_base cmd_base; 5709 GLuint texture; 5710 GLenum target; 5711 GLint level; 5712 GLvoid * img; 5713}; 5714uint32_t 5715_mesa_unmarshal_GetCompressedTextureImageEXT(struct gl_context *ctx, const struct marshal_cmd_GetCompressedTextureImageEXT *cmd, const uint64_t *last) 5716{ 5717 GLuint texture = cmd->texture; 5718 GLenum target = cmd->target; 5719 GLint level = cmd->level; 5720 GLvoid * img = cmd->img; 5721 CALL_GetCompressedTextureImageEXT(ctx->CurrentServerDispatch, (texture, target, level, img)); 5722 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_GetCompressedTextureImageEXT), 8) / 8); 5723 assert (cmd_size == cmd->cmd_base.cmd_size); 5724 return cmd_size; 5725} 5726void GLAPIENTRY 5727_mesa_marshal_GetCompressedTextureImageEXT(GLuint texture, GLenum target, GLint level, GLvoid * img) 5728{ 5729 GET_CURRENT_CONTEXT(ctx); 5730 int cmd_size = sizeof(struct marshal_cmd_GetCompressedTextureImageEXT); 5731 struct marshal_cmd_GetCompressedTextureImageEXT *cmd; 5732 if (_mesa_glthread_has_no_pack_buffer(ctx)) { 5733 _mesa_glthread_finish_before(ctx, "GetCompressedTextureImageEXT"); 5734 CALL_GetCompressedTextureImageEXT(ctx->CurrentServerDispatch, (texture, target, level, img)); 5735 return; 5736 } 5737 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_GetCompressedTextureImageEXT, cmd_size); 5738 cmd->texture = texture; 5739 cmd->target = target; 5740 cmd->level = level; 5741 cmd->img = img; 5742} 5743 5744 5745/* CompressedMultiTexImage1DEXT: marshalled asynchronously */ 5746struct marshal_cmd_CompressedMultiTexImage1DEXT 5747{ 5748 struct marshal_cmd_base cmd_base; 5749 GLenum texunit; 5750 GLenum target; 5751 GLint level; 5752 GLenum internalFormat; 5753 GLsizei width; 5754 GLsizei border; 5755 GLsizei imageSize; 5756 const GLvoid * data; 5757}; 5758uint32_t 5759_mesa_unmarshal_CompressedMultiTexImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedMultiTexImage1DEXT *cmd, const uint64_t *last) 5760{ 5761 GLenum texunit = cmd->texunit; 5762 GLenum target = cmd->target; 5763 GLint level = cmd->level; 5764 GLenum internalFormat = cmd->internalFormat; 5765 GLsizei width = cmd->width; 5766 GLsizei border = cmd->border; 5767 GLsizei imageSize = cmd->imageSize; 5768 const GLvoid * data = cmd->data; 5769 CALL_CompressedMultiTexImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalFormat, width, border, imageSize, data)); 5770 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedMultiTexImage1DEXT), 8) / 8); 5771 assert (cmd_size == cmd->cmd_base.cmd_size); 5772 return cmd_size; 5773} 5774void GLAPIENTRY 5775_mesa_marshal_CompressedMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei border, GLsizei imageSize, const GLvoid * data) 5776{ 5777 GET_CURRENT_CONTEXT(ctx); 5778 int cmd_size = sizeof(struct marshal_cmd_CompressedMultiTexImage1DEXT); 5779 struct marshal_cmd_CompressedMultiTexImage1DEXT *cmd; 5780 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5781 _mesa_glthread_finish_before(ctx, "CompressedMultiTexImage1DEXT"); 5782 CALL_CompressedMultiTexImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalFormat, width, border, imageSize, data)); 5783 return; 5784 } 5785 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedMultiTexImage1DEXT, cmd_size); 5786 cmd->texunit = texunit; 5787 cmd->target = target; 5788 cmd->level = level; 5789 cmd->internalFormat = internalFormat; 5790 cmd->width = width; 5791 cmd->border = border; 5792 cmd->imageSize = imageSize; 5793 cmd->data = data; 5794} 5795 5796 5797/* CompressedMultiTexImage2DEXT: marshalled asynchronously */ 5798struct marshal_cmd_CompressedMultiTexImage2DEXT 5799{ 5800 struct marshal_cmd_base cmd_base; 5801 GLenum texunit; 5802 GLenum target; 5803 GLint level; 5804 GLenum internalFormat; 5805 GLsizei width; 5806 GLsizei height; 5807 GLsizei border; 5808 GLsizei imageSize; 5809 const GLvoid * data; 5810}; 5811uint32_t 5812_mesa_unmarshal_CompressedMultiTexImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedMultiTexImage2DEXT *cmd, const uint64_t *last) 5813{ 5814 GLenum texunit = cmd->texunit; 5815 GLenum target = cmd->target; 5816 GLint level = cmd->level; 5817 GLenum internalFormat = cmd->internalFormat; 5818 GLsizei width = cmd->width; 5819 GLsizei height = cmd->height; 5820 GLsizei border = cmd->border; 5821 GLsizei imageSize = cmd->imageSize; 5822 const GLvoid * data = cmd->data; 5823 CALL_CompressedMultiTexImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalFormat, width, height, border, imageSize, data)); 5824 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedMultiTexImage2DEXT), 8) / 8); 5825 assert (cmd_size == cmd->cmd_base.cmd_size); 5826 return cmd_size; 5827} 5828void GLAPIENTRY 5829_mesa_marshal_CompressedMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei border, GLsizei imageSize, const GLvoid * data) 5830{ 5831 GET_CURRENT_CONTEXT(ctx); 5832 int cmd_size = sizeof(struct marshal_cmd_CompressedMultiTexImage2DEXT); 5833 struct marshal_cmd_CompressedMultiTexImage2DEXT *cmd; 5834 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5835 _mesa_glthread_finish_before(ctx, "CompressedMultiTexImage2DEXT"); 5836 CALL_CompressedMultiTexImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalFormat, width, height, border, imageSize, data)); 5837 return; 5838 } 5839 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedMultiTexImage2DEXT, cmd_size); 5840 cmd->texunit = texunit; 5841 cmd->target = target; 5842 cmd->level = level; 5843 cmd->internalFormat = internalFormat; 5844 cmd->width = width; 5845 cmd->height = height; 5846 cmd->border = border; 5847 cmd->imageSize = imageSize; 5848 cmd->data = data; 5849} 5850 5851 5852/* CompressedMultiTexImage3DEXT: marshalled asynchronously */ 5853struct marshal_cmd_CompressedMultiTexImage3DEXT 5854{ 5855 struct marshal_cmd_base cmd_base; 5856 GLenum texunit; 5857 GLenum target; 5858 GLint level; 5859 GLenum internalFormat; 5860 GLsizei width; 5861 GLsizei height; 5862 GLsizei depth; 5863 GLsizei border; 5864 GLsizei imageSize; 5865 const GLvoid * data; 5866}; 5867uint32_t 5868_mesa_unmarshal_CompressedMultiTexImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedMultiTexImage3DEXT *cmd, const uint64_t *last) 5869{ 5870 GLenum texunit = cmd->texunit; 5871 GLenum target = cmd->target; 5872 GLint level = cmd->level; 5873 GLenum internalFormat = cmd->internalFormat; 5874 GLsizei width = cmd->width; 5875 GLsizei height = cmd->height; 5876 GLsizei depth = cmd->depth; 5877 GLsizei border = cmd->border; 5878 GLsizei imageSize = cmd->imageSize; 5879 const GLvoid * data = cmd->data; 5880 CALL_CompressedMultiTexImage3DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalFormat, width, height, depth, border, imageSize, data)); 5881 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedMultiTexImage3DEXT), 8) / 8); 5882 assert (cmd_size == cmd->cmd_base.cmd_size); 5883 return cmd_size; 5884} 5885void GLAPIENTRY 5886_mesa_marshal_CompressedMultiTexImage3DEXT(GLenum texunit, GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei border, GLsizei imageSize, const GLvoid * data) 5887{ 5888 GET_CURRENT_CONTEXT(ctx); 5889 int cmd_size = sizeof(struct marshal_cmd_CompressedMultiTexImage3DEXT); 5890 struct marshal_cmd_CompressedMultiTexImage3DEXT *cmd; 5891 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5892 _mesa_glthread_finish_before(ctx, "CompressedMultiTexImage3DEXT"); 5893 CALL_CompressedMultiTexImage3DEXT(ctx->CurrentServerDispatch, (texunit, target, level, internalFormat, width, height, depth, border, imageSize, data)); 5894 return; 5895 } 5896 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedMultiTexImage3DEXT, cmd_size); 5897 cmd->texunit = texunit; 5898 cmd->target = target; 5899 cmd->level = level; 5900 cmd->internalFormat = internalFormat; 5901 cmd->width = width; 5902 cmd->height = height; 5903 cmd->depth = depth; 5904 cmd->border = border; 5905 cmd->imageSize = imageSize; 5906 cmd->data = data; 5907} 5908 5909 5910/* CompressedMultiTexSubImage1DEXT: marshalled asynchronously */ 5911struct marshal_cmd_CompressedMultiTexSubImage1DEXT 5912{ 5913 struct marshal_cmd_base cmd_base; 5914 GLenum texunit; 5915 GLenum target; 5916 GLint level; 5917 GLint xoffset; 5918 GLsizei width; 5919 GLenum format; 5920 GLsizei imageSize; 5921 const GLvoid * data; 5922}; 5923uint32_t 5924_mesa_unmarshal_CompressedMultiTexSubImage1DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedMultiTexSubImage1DEXT *cmd, const uint64_t *last) 5925{ 5926 GLenum texunit = cmd->texunit; 5927 GLenum target = cmd->target; 5928 GLint level = cmd->level; 5929 GLint xoffset = cmd->xoffset; 5930 GLsizei width = cmd->width; 5931 GLenum format = cmd->format; 5932 GLsizei imageSize = cmd->imageSize; 5933 const GLvoid * data = cmd->data; 5934 CALL_CompressedMultiTexSubImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, width, format, imageSize, data)); 5935 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedMultiTexSubImage1DEXT), 8) / 8); 5936 assert (cmd_size == cmd->cmd_base.cmd_size); 5937 return cmd_size; 5938} 5939void GLAPIENTRY 5940_mesa_marshal_CompressedMultiTexSubImage1DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) 5941{ 5942 GET_CURRENT_CONTEXT(ctx); 5943 int cmd_size = sizeof(struct marshal_cmd_CompressedMultiTexSubImage1DEXT); 5944 struct marshal_cmd_CompressedMultiTexSubImage1DEXT *cmd; 5945 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 5946 _mesa_glthread_finish_before(ctx, "CompressedMultiTexSubImage1DEXT"); 5947 CALL_CompressedMultiTexSubImage1DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, width, format, imageSize, data)); 5948 return; 5949 } 5950 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedMultiTexSubImage1DEXT, cmd_size); 5951 cmd->texunit = texunit; 5952 cmd->target = target; 5953 cmd->level = level; 5954 cmd->xoffset = xoffset; 5955 cmd->width = width; 5956 cmd->format = format; 5957 cmd->imageSize = imageSize; 5958 cmd->data = data; 5959} 5960 5961 5962/* CompressedMultiTexSubImage2DEXT: marshalled asynchronously */ 5963struct marshal_cmd_CompressedMultiTexSubImage2DEXT 5964{ 5965 struct marshal_cmd_base cmd_base; 5966 GLenum texunit; 5967 GLenum target; 5968 GLint level; 5969 GLint xoffset; 5970 GLint yoffset; 5971 GLsizei width; 5972 GLsizei height; 5973 GLenum format; 5974 GLsizei imageSize; 5975 const GLvoid * data; 5976}; 5977uint32_t 5978_mesa_unmarshal_CompressedMultiTexSubImage2DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedMultiTexSubImage2DEXT *cmd, const uint64_t *last) 5979{ 5980 GLenum texunit = cmd->texunit; 5981 GLenum target = cmd->target; 5982 GLint level = cmd->level; 5983 GLint xoffset = cmd->xoffset; 5984 GLint yoffset = cmd->yoffset; 5985 GLsizei width = cmd->width; 5986 GLsizei height = cmd->height; 5987 GLenum format = cmd->format; 5988 GLsizei imageSize = cmd->imageSize; 5989 const GLvoid * data = cmd->data; 5990 CALL_CompressedMultiTexSubImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, width, height, format, imageSize, data)); 5991 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedMultiTexSubImage2DEXT), 8) / 8); 5992 assert (cmd_size == cmd->cmd_base.cmd_size); 5993 return cmd_size; 5994} 5995void GLAPIENTRY 5996_mesa_marshal_CompressedMultiTexSubImage2DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) 5997{ 5998 GET_CURRENT_CONTEXT(ctx); 5999 int cmd_size = sizeof(struct marshal_cmd_CompressedMultiTexSubImage2DEXT); 6000 struct marshal_cmd_CompressedMultiTexSubImage2DEXT *cmd; 6001 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 6002 _mesa_glthread_finish_before(ctx, "CompressedMultiTexSubImage2DEXT"); 6003 CALL_CompressedMultiTexSubImage2DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, width, height, format, imageSize, data)); 6004 return; 6005 } 6006 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedMultiTexSubImage2DEXT, cmd_size); 6007 cmd->texunit = texunit; 6008 cmd->target = target; 6009 cmd->level = level; 6010 cmd->xoffset = xoffset; 6011 cmd->yoffset = yoffset; 6012 cmd->width = width; 6013 cmd->height = height; 6014 cmd->format = format; 6015 cmd->imageSize = imageSize; 6016 cmd->data = data; 6017} 6018 6019 6020/* CompressedMultiTexSubImage3DEXT: marshalled asynchronously */ 6021struct marshal_cmd_CompressedMultiTexSubImage3DEXT 6022{ 6023 struct marshal_cmd_base cmd_base; 6024 GLenum texunit; 6025 GLenum target; 6026 GLint level; 6027 GLint xoffset; 6028 GLint yoffset; 6029 GLint zoffset; 6030 GLsizei width; 6031 GLsizei height; 6032 GLsizei depth; 6033 GLenum format; 6034 GLsizei imageSize; 6035 const GLvoid * data; 6036}; 6037uint32_t 6038_mesa_unmarshal_CompressedMultiTexSubImage3DEXT(struct gl_context *ctx, const struct marshal_cmd_CompressedMultiTexSubImage3DEXT *cmd, const uint64_t *last) 6039{ 6040 GLenum texunit = cmd->texunit; 6041 GLenum target = cmd->target; 6042 GLint level = cmd->level; 6043 GLint xoffset = cmd->xoffset; 6044 GLint yoffset = cmd->yoffset; 6045 GLint zoffset = cmd->zoffset; 6046 GLsizei width = cmd->width; 6047 GLsizei height = cmd->height; 6048 GLsizei depth = cmd->depth; 6049 GLenum format = cmd->format; 6050 GLsizei imageSize = cmd->imageSize; 6051 const GLvoid * data = cmd->data; 6052 CALL_CompressedMultiTexSubImage3DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data)); 6053 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CompressedMultiTexSubImage3DEXT), 8) / 8); 6054 assert (cmd_size == cmd->cmd_base.cmd_size); 6055 return cmd_size; 6056} 6057void GLAPIENTRY 6058_mesa_marshal_CompressedMultiTexSubImage3DEXT(GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) 6059{ 6060 GET_CURRENT_CONTEXT(ctx); 6061 int cmd_size = sizeof(struct marshal_cmd_CompressedMultiTexSubImage3DEXT); 6062 struct marshal_cmd_CompressedMultiTexSubImage3DEXT *cmd; 6063 if (_mesa_glthread_has_no_unpack_buffer(ctx)) { 6064 _mesa_glthread_finish_before(ctx, "CompressedMultiTexSubImage3DEXT"); 6065 CALL_CompressedMultiTexSubImage3DEXT(ctx->CurrentServerDispatch, (texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data)); 6066 return; 6067 } 6068 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CompressedMultiTexSubImage3DEXT, cmd_size); 6069 cmd->texunit = texunit; 6070 cmd->target = target; 6071 cmd->level = level; 6072 cmd->xoffset = xoffset; 6073 cmd->yoffset = yoffset; 6074 cmd->zoffset = zoffset; 6075 cmd->width = width; 6076 cmd->height = height; 6077 cmd->depth = depth; 6078 cmd->format = format; 6079 cmd->imageSize = imageSize; 6080 cmd->data = data; 6081} 6082 6083 6084/* GetCompressedMultiTexImageEXT: marshalled asynchronously */ 6085struct marshal_cmd_GetCompressedMultiTexImageEXT 6086{ 6087 struct marshal_cmd_base cmd_base; 6088 GLenum texunit; 6089 GLenum target; 6090 GLint level; 6091 GLvoid * img; 6092}; 6093uint32_t 6094_mesa_unmarshal_GetCompressedMultiTexImageEXT(struct gl_context *ctx, const struct marshal_cmd_GetCompressedMultiTexImageEXT *cmd, const uint64_t *last) 6095{ 6096 GLenum texunit = cmd->texunit; 6097 GLenum target = cmd->target; 6098 GLint level = cmd->level; 6099 GLvoid * img = cmd->img; 6100 CALL_GetCompressedMultiTexImageEXT(ctx->CurrentServerDispatch, (texunit, target, level, img)); 6101 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_GetCompressedMultiTexImageEXT), 8) / 8); 6102 assert (cmd_size == cmd->cmd_base.cmd_size); 6103 return cmd_size; 6104} 6105void GLAPIENTRY 6106_mesa_marshal_GetCompressedMultiTexImageEXT(GLenum texunit, GLenum target, GLint level, GLvoid * img) 6107{ 6108 GET_CURRENT_CONTEXT(ctx); 6109 int cmd_size = sizeof(struct marshal_cmd_GetCompressedMultiTexImageEXT); 6110 struct marshal_cmd_GetCompressedMultiTexImageEXT *cmd; 6111 if (_mesa_glthread_has_no_pack_buffer(ctx)) { 6112 _mesa_glthread_finish_before(ctx, "GetCompressedMultiTexImageEXT"); 6113 CALL_GetCompressedMultiTexImageEXT(ctx->CurrentServerDispatch, (texunit, target, level, img)); 6114 return; 6115 } 6116 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_GetCompressedMultiTexImageEXT, cmd_size); 6117 cmd->texunit = texunit; 6118 cmd->target = target; 6119 cmd->level = level; 6120 cmd->img = img; 6121} 6122 6123 6124/* MapNamedBufferEXT: marshalled synchronously */ 6125GLvoid * GLAPIENTRY 6126_mesa_marshal_MapNamedBufferEXT(GLuint buffer, GLenum access) 6127{ 6128 GET_CURRENT_CONTEXT(ctx); 6129 _mesa_glthread_finish_before(ctx, "MapNamedBufferEXT"); 6130 return CALL_MapNamedBufferEXT(ctx->CurrentServerDispatch, (buffer, access)); 6131} 6132 6133 6134/* GetNamedBufferSubDataEXT: marshalled synchronously */ 6135void GLAPIENTRY 6136_mesa_marshal_GetNamedBufferSubDataEXT(GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid * data) 6137{ 6138 GET_CURRENT_CONTEXT(ctx); 6139 _mesa_glthread_finish_before(ctx, "GetNamedBufferSubDataEXT"); 6140 CALL_GetNamedBufferSubDataEXT(ctx->CurrentServerDispatch, (buffer, offset, size, data)); 6141} 6142 6143 6144/* GetNamedBufferPointervEXT: marshalled synchronously */ 6145void GLAPIENTRY 6146_mesa_marshal_GetNamedBufferPointervEXT(GLuint buffer, GLenum pname, GLvoid ** params) 6147{ 6148 GET_CURRENT_CONTEXT(ctx); 6149 _mesa_glthread_finish_before(ctx, "GetNamedBufferPointervEXT"); 6150 CALL_GetNamedBufferPointervEXT(ctx->CurrentServerDispatch, (buffer, pname, params)); 6151} 6152 6153 6154/* GetNamedBufferParameterivEXT: marshalled synchronously */ 6155void GLAPIENTRY 6156_mesa_marshal_GetNamedBufferParameterivEXT(GLuint buffer, GLenum pname, GLint * params) 6157{ 6158 GET_CURRENT_CONTEXT(ctx); 6159 _mesa_glthread_finish_before(ctx, "GetNamedBufferParameterivEXT"); 6160 CALL_GetNamedBufferParameterivEXT(ctx->CurrentServerDispatch, (buffer, pname, params)); 6161} 6162 6163 6164/* FlushMappedNamedBufferRangeEXT: marshalled asynchronously */ 6165struct marshal_cmd_FlushMappedNamedBufferRangeEXT 6166{ 6167 struct marshal_cmd_base cmd_base; 6168 GLuint buffer; 6169 GLintptr offset; 6170 GLsizeiptr length; 6171}; 6172uint32_t 6173_mesa_unmarshal_FlushMappedNamedBufferRangeEXT(struct gl_context *ctx, const struct marshal_cmd_FlushMappedNamedBufferRangeEXT *cmd, const uint64_t *last) 6174{ 6175 GLuint buffer = cmd->buffer; 6176 GLintptr offset = cmd->offset; 6177 GLsizeiptr length = cmd->length; 6178 CALL_FlushMappedNamedBufferRangeEXT(ctx->CurrentServerDispatch, (buffer, offset, length)); 6179 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_FlushMappedNamedBufferRangeEXT), 8) / 8); 6180 assert (cmd_size == cmd->cmd_base.cmd_size); 6181 return cmd_size; 6182} 6183void GLAPIENTRY 6184_mesa_marshal_FlushMappedNamedBufferRangeEXT(GLuint buffer, GLintptr offset, GLsizeiptr length) 6185{ 6186 GET_CURRENT_CONTEXT(ctx); 6187 int cmd_size = sizeof(struct marshal_cmd_FlushMappedNamedBufferRangeEXT); 6188 struct marshal_cmd_FlushMappedNamedBufferRangeEXT *cmd; 6189 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_FlushMappedNamedBufferRangeEXT, cmd_size); 6190 cmd->buffer = buffer; 6191 cmd->offset = offset; 6192 cmd->length = length; 6193} 6194 6195 6196/* MapNamedBufferRangeEXT: marshalled synchronously */ 6197GLvoid * GLAPIENTRY 6198_mesa_marshal_MapNamedBufferRangeEXT(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access) 6199{ 6200 GET_CURRENT_CONTEXT(ctx); 6201 _mesa_glthread_finish_before(ctx, "MapNamedBufferRangeEXT"); 6202 return CALL_MapNamedBufferRangeEXT(ctx->CurrentServerDispatch, (buffer, offset, length, access)); 6203} 6204 6205 6206/* FramebufferDrawBufferEXT: marshalled asynchronously */ 6207struct marshal_cmd_FramebufferDrawBufferEXT 6208{ 6209 struct marshal_cmd_base cmd_base; 6210 GLuint framebuffer; 6211 GLenum mode; 6212}; 6213uint32_t 6214_mesa_unmarshal_FramebufferDrawBufferEXT(struct gl_context *ctx, const struct marshal_cmd_FramebufferDrawBufferEXT *cmd, const uint64_t *last) 6215{ 6216 GLuint framebuffer = cmd->framebuffer; 6217 GLenum mode = cmd->mode; 6218 CALL_FramebufferDrawBufferEXT(ctx->CurrentServerDispatch, (framebuffer, mode)); 6219 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_FramebufferDrawBufferEXT), 8) / 8); 6220 assert (cmd_size == cmd->cmd_base.cmd_size); 6221 return cmd_size; 6222} 6223void GLAPIENTRY 6224_mesa_marshal_FramebufferDrawBufferEXT(GLuint framebuffer, GLenum mode) 6225{ 6226 GET_CURRENT_CONTEXT(ctx); 6227 int cmd_size = sizeof(struct marshal_cmd_FramebufferDrawBufferEXT); 6228 struct marshal_cmd_FramebufferDrawBufferEXT *cmd; 6229 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_FramebufferDrawBufferEXT, cmd_size); 6230 cmd->framebuffer = framebuffer; 6231 cmd->mode = mode; 6232} 6233 6234 6235/* FramebufferDrawBuffersEXT: marshalled asynchronously */ 6236struct marshal_cmd_FramebufferDrawBuffersEXT 6237{ 6238 struct marshal_cmd_base cmd_base; 6239 GLuint framebuffer; 6240 GLsizei n; 6241 /* Next safe_mul(n, 1 * sizeof(GLenum)) bytes are GLenum bufs[n] */ 6242}; 6243uint32_t 6244_mesa_unmarshal_FramebufferDrawBuffersEXT(struct gl_context *ctx, const struct marshal_cmd_FramebufferDrawBuffersEXT *cmd, const uint64_t *last) 6245{ 6246 GLuint framebuffer = cmd->framebuffer; 6247 GLsizei n = cmd->n; 6248 GLenum * bufs; 6249 const char *variable_data = (const char *) (cmd + 1); 6250 bufs = (GLenum *) variable_data; 6251 CALL_FramebufferDrawBuffersEXT(ctx->CurrentServerDispatch, (framebuffer, n, bufs)); 6252 return cmd->cmd_base.cmd_size; 6253} 6254void GLAPIENTRY 6255_mesa_marshal_FramebufferDrawBuffersEXT(GLuint framebuffer, GLsizei n, const GLenum * bufs) 6256{ 6257 GET_CURRENT_CONTEXT(ctx); 6258 int bufs_size = safe_mul(n, 1 * sizeof(GLenum)); 6259 int cmd_size = sizeof(struct marshal_cmd_FramebufferDrawBuffersEXT) + bufs_size; 6260 struct marshal_cmd_FramebufferDrawBuffersEXT *cmd; 6261 if (unlikely(bufs_size < 0 || (bufs_size > 0 && !bufs) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 6262 _mesa_glthread_finish_before(ctx, "FramebufferDrawBuffersEXT"); 6263 CALL_FramebufferDrawBuffersEXT(ctx->CurrentServerDispatch, (framebuffer, n, bufs)); 6264 return; 6265 } 6266 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_FramebufferDrawBuffersEXT, cmd_size); 6267 cmd->framebuffer = framebuffer; 6268 cmd->n = n; 6269 char *variable_data = (char *) (cmd + 1); 6270 memcpy(variable_data, bufs, bufs_size); 6271} 6272 6273 6274/* FramebufferReadBufferEXT: marshalled asynchronously */ 6275struct marshal_cmd_FramebufferReadBufferEXT 6276{ 6277 struct marshal_cmd_base cmd_base; 6278 GLuint framebuffer; 6279 GLenum mode; 6280}; 6281uint32_t 6282_mesa_unmarshal_FramebufferReadBufferEXT(struct gl_context *ctx, const struct marshal_cmd_FramebufferReadBufferEXT *cmd, const uint64_t *last) 6283{ 6284 GLuint framebuffer = cmd->framebuffer; 6285 GLenum mode = cmd->mode; 6286 CALL_FramebufferReadBufferEXT(ctx->CurrentServerDispatch, (framebuffer, mode)); 6287 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_FramebufferReadBufferEXT), 8) / 8); 6288 assert (cmd_size == cmd->cmd_base.cmd_size); 6289 return cmd_size; 6290} 6291void GLAPIENTRY 6292_mesa_marshal_FramebufferReadBufferEXT(GLuint framebuffer, GLenum mode) 6293{ 6294 GET_CURRENT_CONTEXT(ctx); 6295 int cmd_size = sizeof(struct marshal_cmd_FramebufferReadBufferEXT); 6296 struct marshal_cmd_FramebufferReadBufferEXT *cmd; 6297 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_FramebufferReadBufferEXT, cmd_size); 6298 cmd->framebuffer = framebuffer; 6299 cmd->mode = mode; 6300} 6301 6302 6303/* GetFramebufferParameterivEXT: marshalled synchronously */ 6304void GLAPIENTRY 6305_mesa_marshal_GetFramebufferParameterivEXT(GLuint framebuffer, GLenum pname, GLint * param) 6306{ 6307 GET_CURRENT_CONTEXT(ctx); 6308 _mesa_glthread_finish_before(ctx, "GetFramebufferParameterivEXT"); 6309 CALL_GetFramebufferParameterivEXT(ctx->CurrentServerDispatch, (framebuffer, pname, param)); 6310} 6311 6312 6313/* CheckNamedFramebufferStatusEXT: marshalled synchronously */ 6314GLenum GLAPIENTRY 6315_mesa_marshal_CheckNamedFramebufferStatusEXT(GLuint framebuffer, GLenum target) 6316{ 6317 GET_CURRENT_CONTEXT(ctx); 6318 _mesa_glthread_finish_before(ctx, "CheckNamedFramebufferStatusEXT"); 6319 return CALL_CheckNamedFramebufferStatusEXT(ctx->CurrentServerDispatch, (framebuffer, target)); 6320} 6321 6322 6323/* NamedFramebufferTexture1DEXT: marshalled asynchronously */ 6324struct marshal_cmd_NamedFramebufferTexture1DEXT 6325{ 6326 struct marshal_cmd_base cmd_base; 6327 GLuint framebuffer; 6328 GLenum attachment; 6329 GLenum textarget; 6330 GLuint texture; 6331 GLint level; 6332}; 6333uint32_t 6334_mesa_unmarshal_NamedFramebufferTexture1DEXT(struct gl_context *ctx, const struct marshal_cmd_NamedFramebufferTexture1DEXT *cmd, const uint64_t *last) 6335{ 6336 GLuint framebuffer = cmd->framebuffer; 6337 GLenum attachment = cmd->attachment; 6338 GLenum textarget = cmd->textarget; 6339 GLuint texture = cmd->texture; 6340 GLint level = cmd->level; 6341 CALL_NamedFramebufferTexture1DEXT(ctx->CurrentServerDispatch, (framebuffer, attachment, textarget, texture, level)); 6342 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_NamedFramebufferTexture1DEXT), 8) / 8); 6343 assert (cmd_size == cmd->cmd_base.cmd_size); 6344 return cmd_size; 6345} 6346void GLAPIENTRY 6347_mesa_marshal_NamedFramebufferTexture1DEXT(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) 6348{ 6349 GET_CURRENT_CONTEXT(ctx); 6350 int cmd_size = sizeof(struct marshal_cmd_NamedFramebufferTexture1DEXT); 6351 struct marshal_cmd_NamedFramebufferTexture1DEXT *cmd; 6352 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NamedFramebufferTexture1DEXT, cmd_size); 6353 cmd->framebuffer = framebuffer; 6354 cmd->attachment = attachment; 6355 cmd->textarget = textarget; 6356 cmd->texture = texture; 6357 cmd->level = level; 6358} 6359 6360 6361/* NamedFramebufferTexture2DEXT: marshalled asynchronously */ 6362struct marshal_cmd_NamedFramebufferTexture2DEXT 6363{ 6364 struct marshal_cmd_base cmd_base; 6365 GLuint framebuffer; 6366 GLenum attachment; 6367 GLenum textarget; 6368 GLuint texture; 6369 GLint level; 6370}; 6371uint32_t 6372_mesa_unmarshal_NamedFramebufferTexture2DEXT(struct gl_context *ctx, const struct marshal_cmd_NamedFramebufferTexture2DEXT *cmd, const uint64_t *last) 6373{ 6374 GLuint framebuffer = cmd->framebuffer; 6375 GLenum attachment = cmd->attachment; 6376 GLenum textarget = cmd->textarget; 6377 GLuint texture = cmd->texture; 6378 GLint level = cmd->level; 6379 CALL_NamedFramebufferTexture2DEXT(ctx->CurrentServerDispatch, (framebuffer, attachment, textarget, texture, level)); 6380 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_NamedFramebufferTexture2DEXT), 8) / 8); 6381 assert (cmd_size == cmd->cmd_base.cmd_size); 6382 return cmd_size; 6383} 6384void GLAPIENTRY 6385_mesa_marshal_NamedFramebufferTexture2DEXT(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level) 6386{ 6387 GET_CURRENT_CONTEXT(ctx); 6388 int cmd_size = sizeof(struct marshal_cmd_NamedFramebufferTexture2DEXT); 6389 struct marshal_cmd_NamedFramebufferTexture2DEXT *cmd; 6390 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NamedFramebufferTexture2DEXT, cmd_size); 6391 cmd->framebuffer = framebuffer; 6392 cmd->attachment = attachment; 6393 cmd->textarget = textarget; 6394 cmd->texture = texture; 6395 cmd->level = level; 6396} 6397 6398 6399/* NamedFramebufferTexture3DEXT: marshalled asynchronously */ 6400struct marshal_cmd_NamedFramebufferTexture3DEXT 6401{ 6402 struct marshal_cmd_base cmd_base; 6403 GLuint framebuffer; 6404 GLenum attachment; 6405 GLenum textarget; 6406 GLuint texture; 6407 GLint level; 6408 GLint zoffset; 6409}; 6410uint32_t 6411_mesa_unmarshal_NamedFramebufferTexture3DEXT(struct gl_context *ctx, const struct marshal_cmd_NamedFramebufferTexture3DEXT *cmd, const uint64_t *last) 6412{ 6413 GLuint framebuffer = cmd->framebuffer; 6414 GLenum attachment = cmd->attachment; 6415 GLenum textarget = cmd->textarget; 6416 GLuint texture = cmd->texture; 6417 GLint level = cmd->level; 6418 GLint zoffset = cmd->zoffset; 6419 CALL_NamedFramebufferTexture3DEXT(ctx->CurrentServerDispatch, (framebuffer, attachment, textarget, texture, level, zoffset)); 6420 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_NamedFramebufferTexture3DEXT), 8) / 8); 6421 assert (cmd_size == cmd->cmd_base.cmd_size); 6422 return cmd_size; 6423} 6424void GLAPIENTRY 6425_mesa_marshal_NamedFramebufferTexture3DEXT(GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) 6426{ 6427 GET_CURRENT_CONTEXT(ctx); 6428 int cmd_size = sizeof(struct marshal_cmd_NamedFramebufferTexture3DEXT); 6429 struct marshal_cmd_NamedFramebufferTexture3DEXT *cmd; 6430 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NamedFramebufferTexture3DEXT, cmd_size); 6431 cmd->framebuffer = framebuffer; 6432 cmd->attachment = attachment; 6433 cmd->textarget = textarget; 6434 cmd->texture = texture; 6435 cmd->level = level; 6436 cmd->zoffset = zoffset; 6437} 6438 6439 6440/* NamedFramebufferRenderbufferEXT: marshalled asynchronously */ 6441struct marshal_cmd_NamedFramebufferRenderbufferEXT 6442{ 6443 struct marshal_cmd_base cmd_base; 6444 GLuint framebuffer; 6445 GLenum attachment; 6446 GLenum renderbuffertarget; 6447 GLuint renderbuffer; 6448}; 6449uint32_t 6450_mesa_unmarshal_NamedFramebufferRenderbufferEXT(struct gl_context *ctx, const struct marshal_cmd_NamedFramebufferRenderbufferEXT *cmd, const uint64_t *last) 6451{ 6452 GLuint framebuffer = cmd->framebuffer; 6453 GLenum attachment = cmd->attachment; 6454 GLenum renderbuffertarget = cmd->renderbuffertarget; 6455 GLuint renderbuffer = cmd->renderbuffer; 6456 CALL_NamedFramebufferRenderbufferEXT(ctx->CurrentServerDispatch, (framebuffer, attachment, renderbuffertarget, renderbuffer)); 6457 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_NamedFramebufferRenderbufferEXT), 8) / 8); 6458 assert (cmd_size == cmd->cmd_base.cmd_size); 6459 return cmd_size; 6460} 6461void GLAPIENTRY 6462_mesa_marshal_NamedFramebufferRenderbufferEXT(GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) 6463{ 6464 GET_CURRENT_CONTEXT(ctx); 6465 int cmd_size = sizeof(struct marshal_cmd_NamedFramebufferRenderbufferEXT); 6466 struct marshal_cmd_NamedFramebufferRenderbufferEXT *cmd; 6467 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NamedFramebufferRenderbufferEXT, cmd_size); 6468 cmd->framebuffer = framebuffer; 6469 cmd->attachment = attachment; 6470 cmd->renderbuffertarget = renderbuffertarget; 6471 cmd->renderbuffer = renderbuffer; 6472} 6473 6474 6475/* GetNamedFramebufferAttachmentParameterivEXT: marshalled synchronously */ 6476void GLAPIENTRY 6477_mesa_marshal_GetNamedFramebufferAttachmentParameterivEXT(GLuint framebuffer, GLenum attachment, GLenum pname, GLint * params) 6478{ 6479 GET_CURRENT_CONTEXT(ctx); 6480 _mesa_glthread_finish_before(ctx, "GetNamedFramebufferAttachmentParameterivEXT"); 6481 CALL_GetNamedFramebufferAttachmentParameterivEXT(ctx->CurrentServerDispatch, (framebuffer, attachment, pname, params)); 6482} 6483 6484 6485/* NamedRenderbufferStorageEXT: marshalled asynchronously */ 6486struct marshal_cmd_NamedRenderbufferStorageEXT 6487{ 6488 struct marshal_cmd_base cmd_base; 6489 GLuint renderbuffer; 6490 GLenum internalformat; 6491 GLsizei width; 6492 GLsizei height; 6493}; 6494uint32_t 6495_mesa_unmarshal_NamedRenderbufferStorageEXT(struct gl_context *ctx, const struct marshal_cmd_NamedRenderbufferStorageEXT *cmd, const uint64_t *last) 6496{ 6497 GLuint renderbuffer = cmd->renderbuffer; 6498 GLenum internalformat = cmd->internalformat; 6499 GLsizei width = cmd->width; 6500 GLsizei height = cmd->height; 6501 CALL_NamedRenderbufferStorageEXT(ctx->CurrentServerDispatch, (renderbuffer, internalformat, width, height)); 6502 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_NamedRenderbufferStorageEXT), 8) / 8); 6503 assert (cmd_size == cmd->cmd_base.cmd_size); 6504 return cmd_size; 6505} 6506void GLAPIENTRY 6507_mesa_marshal_NamedRenderbufferStorageEXT(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) 6508{ 6509 GET_CURRENT_CONTEXT(ctx); 6510 int cmd_size = sizeof(struct marshal_cmd_NamedRenderbufferStorageEXT); 6511 struct marshal_cmd_NamedRenderbufferStorageEXT *cmd; 6512 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NamedRenderbufferStorageEXT, cmd_size); 6513 cmd->renderbuffer = renderbuffer; 6514 cmd->internalformat = internalformat; 6515 cmd->width = width; 6516 cmd->height = height; 6517} 6518 6519 6520/* GetNamedRenderbufferParameterivEXT: marshalled synchronously */ 6521void GLAPIENTRY 6522_mesa_marshal_GetNamedRenderbufferParameterivEXT(GLuint renderbuffer, GLenum pname, GLint * params) 6523{ 6524 GET_CURRENT_CONTEXT(ctx); 6525 _mesa_glthread_finish_before(ctx, "GetNamedRenderbufferParameterivEXT"); 6526 CALL_GetNamedRenderbufferParameterivEXT(ctx->CurrentServerDispatch, (renderbuffer, pname, params)); 6527} 6528 6529 6530/* GenerateTextureMipmapEXT: marshalled asynchronously */ 6531struct marshal_cmd_GenerateTextureMipmapEXT 6532{ 6533 struct marshal_cmd_base cmd_base; 6534 GLuint texture; 6535 GLenum target; 6536}; 6537uint32_t 6538_mesa_unmarshal_GenerateTextureMipmapEXT(struct gl_context *ctx, const struct marshal_cmd_GenerateTextureMipmapEXT *cmd, const uint64_t *last) 6539{ 6540 GLuint texture = cmd->texture; 6541 GLenum target = cmd->target; 6542 CALL_GenerateTextureMipmapEXT(ctx->CurrentServerDispatch, (texture, target)); 6543 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_GenerateTextureMipmapEXT), 8) / 8); 6544 assert (cmd_size == cmd->cmd_base.cmd_size); 6545 return cmd_size; 6546} 6547void GLAPIENTRY 6548_mesa_marshal_GenerateTextureMipmapEXT(GLuint texture, GLenum target) 6549{ 6550 GET_CURRENT_CONTEXT(ctx); 6551 int cmd_size = sizeof(struct marshal_cmd_GenerateTextureMipmapEXT); 6552 struct marshal_cmd_GenerateTextureMipmapEXT *cmd; 6553 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_GenerateTextureMipmapEXT, cmd_size); 6554 cmd->texture = texture; 6555 cmd->target = target; 6556} 6557 6558 6559/* GenerateMultiTexMipmapEXT: marshalled asynchronously */ 6560struct marshal_cmd_GenerateMultiTexMipmapEXT 6561{ 6562 struct marshal_cmd_base cmd_base; 6563 GLenum texunit; 6564 GLenum target; 6565}; 6566uint32_t 6567_mesa_unmarshal_GenerateMultiTexMipmapEXT(struct gl_context *ctx, const struct marshal_cmd_GenerateMultiTexMipmapEXT *cmd, const uint64_t *last) 6568{ 6569 GLenum texunit = cmd->texunit; 6570 GLenum target = cmd->target; 6571 CALL_GenerateMultiTexMipmapEXT(ctx->CurrentServerDispatch, (texunit, target)); 6572 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_GenerateMultiTexMipmapEXT), 8) / 8); 6573 assert (cmd_size == cmd->cmd_base.cmd_size); 6574 return cmd_size; 6575} 6576void GLAPIENTRY 6577_mesa_marshal_GenerateMultiTexMipmapEXT(GLenum texunit, GLenum target) 6578{ 6579 GET_CURRENT_CONTEXT(ctx); 6580 int cmd_size = sizeof(struct marshal_cmd_GenerateMultiTexMipmapEXT); 6581 struct marshal_cmd_GenerateMultiTexMipmapEXT *cmd; 6582 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_GenerateMultiTexMipmapEXT, cmd_size); 6583 cmd->texunit = texunit; 6584 cmd->target = target; 6585} 6586 6587 6588/* NamedRenderbufferStorageMultisampleEXT: marshalled asynchronously */ 6589struct marshal_cmd_NamedRenderbufferStorageMultisampleEXT 6590{ 6591 struct marshal_cmd_base cmd_base; 6592 GLuint renderbuffer; 6593 GLsizei samples; 6594 GLenum internalformat; 6595 GLsizei width; 6596 GLsizei height; 6597}; 6598uint32_t 6599_mesa_unmarshal_NamedRenderbufferStorageMultisampleEXT(struct gl_context *ctx, const struct marshal_cmd_NamedRenderbufferStorageMultisampleEXT *cmd, const uint64_t *last) 6600{ 6601 GLuint renderbuffer = cmd->renderbuffer; 6602 GLsizei samples = cmd->samples; 6603 GLenum internalformat = cmd->internalformat; 6604 GLsizei width = cmd->width; 6605 GLsizei height = cmd->height; 6606 CALL_NamedRenderbufferStorageMultisampleEXT(ctx->CurrentServerDispatch, (renderbuffer, samples, internalformat, width, height)); 6607 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_NamedRenderbufferStorageMultisampleEXT), 8) / 8); 6608 assert (cmd_size == cmd->cmd_base.cmd_size); 6609 return cmd_size; 6610} 6611void GLAPIENTRY 6612_mesa_marshal_NamedRenderbufferStorageMultisampleEXT(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) 6613{ 6614 GET_CURRENT_CONTEXT(ctx); 6615 int cmd_size = sizeof(struct marshal_cmd_NamedRenderbufferStorageMultisampleEXT); 6616 struct marshal_cmd_NamedRenderbufferStorageMultisampleEXT *cmd; 6617 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NamedRenderbufferStorageMultisampleEXT, cmd_size); 6618 cmd->renderbuffer = renderbuffer; 6619 cmd->samples = samples; 6620 cmd->internalformat = internalformat; 6621 cmd->width = width; 6622 cmd->height = height; 6623} 6624 6625 6626/* NamedCopyBufferSubDataEXT: marshalled asynchronously */ 6627struct marshal_cmd_NamedCopyBufferSubDataEXT 6628{ 6629 struct marshal_cmd_base cmd_base; 6630 GLuint readBuffer; 6631 GLuint writeBuffer; 6632 GLintptr readOffset; 6633 GLintptr writeOffset; 6634 GLsizeiptr size; 6635}; 6636uint32_t 6637_mesa_unmarshal_NamedCopyBufferSubDataEXT(struct gl_context *ctx, const struct marshal_cmd_NamedCopyBufferSubDataEXT *cmd, const uint64_t *last) 6638{ 6639 GLuint readBuffer = cmd->readBuffer; 6640 GLuint writeBuffer = cmd->writeBuffer; 6641 GLintptr readOffset = cmd->readOffset; 6642 GLintptr writeOffset = cmd->writeOffset; 6643 GLsizeiptr size = cmd->size; 6644 CALL_NamedCopyBufferSubDataEXT(ctx->CurrentServerDispatch, (readBuffer, writeBuffer, readOffset, writeOffset, size)); 6645 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_NamedCopyBufferSubDataEXT), 8) / 8); 6646 assert (cmd_size == cmd->cmd_base.cmd_size); 6647 return cmd_size; 6648} 6649void GLAPIENTRY 6650_mesa_marshal_NamedCopyBufferSubDataEXT(GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) 6651{ 6652 GET_CURRENT_CONTEXT(ctx); 6653 int cmd_size = sizeof(struct marshal_cmd_NamedCopyBufferSubDataEXT); 6654 struct marshal_cmd_NamedCopyBufferSubDataEXT *cmd; 6655 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NamedCopyBufferSubDataEXT, cmd_size); 6656 cmd->readBuffer = readBuffer; 6657 cmd->writeBuffer = writeBuffer; 6658 cmd->readOffset = readOffset; 6659 cmd->writeOffset = writeOffset; 6660 cmd->size = size; 6661} 6662 6663 6664/* VertexArrayVertexOffsetEXT: marshalled asynchronously */ 6665struct marshal_cmd_VertexArrayVertexOffsetEXT 6666{ 6667 struct marshal_cmd_base cmd_base; 6668 GLuint vaobj; 6669 GLuint buffer; 6670 GLint size; 6671 GLenum type; 6672 GLsizei stride; 6673 GLintptr offset; 6674}; 6675uint32_t 6676_mesa_unmarshal_VertexArrayVertexOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayVertexOffsetEXT *cmd, const uint64_t *last) 6677{ 6678 GLuint vaobj = cmd->vaobj; 6679 GLuint buffer = cmd->buffer; 6680 GLint size = cmd->size; 6681 GLenum type = cmd->type; 6682 GLsizei stride = cmd->stride; 6683 GLintptr offset = cmd->offset; 6684 CALL_VertexArrayVertexOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, size, type, stride, offset)); 6685 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayVertexOffsetEXT), 8) / 8); 6686 assert (cmd_size == cmd->cmd_base.cmd_size); 6687 return cmd_size; 6688} 6689void GLAPIENTRY 6690_mesa_marshal_VertexArrayVertexOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) 6691{ 6692 GET_CURRENT_CONTEXT(ctx); 6693 int cmd_size = sizeof(struct marshal_cmd_VertexArrayVertexOffsetEXT); 6694 struct marshal_cmd_VertexArrayVertexOffsetEXT *cmd; 6695 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayVertexOffsetEXT, cmd_size); 6696 cmd->vaobj = vaobj; 6697 cmd->buffer = buffer; 6698 cmd->size = size; 6699 cmd->type = type; 6700 cmd->stride = stride; 6701 cmd->offset = offset; 6702 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_POS, size, type, stride, offset); 6703} 6704 6705 6706/* VertexArrayColorOffsetEXT: marshalled asynchronously */ 6707struct marshal_cmd_VertexArrayColorOffsetEXT 6708{ 6709 struct marshal_cmd_base cmd_base; 6710 GLuint vaobj; 6711 GLuint buffer; 6712 GLint size; 6713 GLenum type; 6714 GLsizei stride; 6715 GLintptr offset; 6716}; 6717uint32_t 6718_mesa_unmarshal_VertexArrayColorOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayColorOffsetEXT *cmd, const uint64_t *last) 6719{ 6720 GLuint vaobj = cmd->vaobj; 6721 GLuint buffer = cmd->buffer; 6722 GLint size = cmd->size; 6723 GLenum type = cmd->type; 6724 GLsizei stride = cmd->stride; 6725 GLintptr offset = cmd->offset; 6726 CALL_VertexArrayColorOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, size, type, stride, offset)); 6727 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayColorOffsetEXT), 8) / 8); 6728 assert (cmd_size == cmd->cmd_base.cmd_size); 6729 return cmd_size; 6730} 6731void GLAPIENTRY 6732_mesa_marshal_VertexArrayColorOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) 6733{ 6734 GET_CURRENT_CONTEXT(ctx); 6735 int cmd_size = sizeof(struct marshal_cmd_VertexArrayColorOffsetEXT); 6736 struct marshal_cmd_VertexArrayColorOffsetEXT *cmd; 6737 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayColorOffsetEXT, cmd_size); 6738 cmd->vaobj = vaobj; 6739 cmd->buffer = buffer; 6740 cmd->size = size; 6741 cmd->type = type; 6742 cmd->stride = stride; 6743 cmd->offset = offset; 6744 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_COLOR0, size, type, stride, offset); 6745} 6746 6747 6748/* VertexArrayEdgeFlagOffsetEXT: marshalled asynchronously */ 6749struct marshal_cmd_VertexArrayEdgeFlagOffsetEXT 6750{ 6751 struct marshal_cmd_base cmd_base; 6752 GLuint vaobj; 6753 GLuint buffer; 6754 GLsizei stride; 6755 GLintptr offset; 6756}; 6757uint32_t 6758_mesa_unmarshal_VertexArrayEdgeFlagOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayEdgeFlagOffsetEXT *cmd, const uint64_t *last) 6759{ 6760 GLuint vaobj = cmd->vaobj; 6761 GLuint buffer = cmd->buffer; 6762 GLsizei stride = cmd->stride; 6763 GLintptr offset = cmd->offset; 6764 CALL_VertexArrayEdgeFlagOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, stride, offset)); 6765 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayEdgeFlagOffsetEXT), 8) / 8); 6766 assert (cmd_size == cmd->cmd_base.cmd_size); 6767 return cmd_size; 6768} 6769void GLAPIENTRY 6770_mesa_marshal_VertexArrayEdgeFlagOffsetEXT(GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset) 6771{ 6772 GET_CURRENT_CONTEXT(ctx); 6773 int cmd_size = sizeof(struct marshal_cmd_VertexArrayEdgeFlagOffsetEXT); 6774 struct marshal_cmd_VertexArrayEdgeFlagOffsetEXT *cmd; 6775 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayEdgeFlagOffsetEXT, cmd_size); 6776 cmd->vaobj = vaobj; 6777 cmd->buffer = buffer; 6778 cmd->stride = stride; 6779 cmd->offset = offset; 6780 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_EDGEFLAG, 1, GL_UNSIGNED_BYTE, stride, offset); 6781} 6782 6783 6784/* VertexArrayIndexOffsetEXT: marshalled asynchronously */ 6785struct marshal_cmd_VertexArrayIndexOffsetEXT 6786{ 6787 struct marshal_cmd_base cmd_base; 6788 GLuint vaobj; 6789 GLuint buffer; 6790 GLenum type; 6791 GLsizei stride; 6792 GLintptr offset; 6793}; 6794uint32_t 6795_mesa_unmarshal_VertexArrayIndexOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayIndexOffsetEXT *cmd, const uint64_t *last) 6796{ 6797 GLuint vaobj = cmd->vaobj; 6798 GLuint buffer = cmd->buffer; 6799 GLenum type = cmd->type; 6800 GLsizei stride = cmd->stride; 6801 GLintptr offset = cmd->offset; 6802 CALL_VertexArrayIndexOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, type, stride, offset)); 6803 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayIndexOffsetEXT), 8) / 8); 6804 assert (cmd_size == cmd->cmd_base.cmd_size); 6805 return cmd_size; 6806} 6807void GLAPIENTRY 6808_mesa_marshal_VertexArrayIndexOffsetEXT(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) 6809{ 6810 GET_CURRENT_CONTEXT(ctx); 6811 int cmd_size = sizeof(struct marshal_cmd_VertexArrayIndexOffsetEXT); 6812 struct marshal_cmd_VertexArrayIndexOffsetEXT *cmd; 6813 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayIndexOffsetEXT, cmd_size); 6814 cmd->vaobj = vaobj; 6815 cmd->buffer = buffer; 6816 cmd->type = type; 6817 cmd->stride = stride; 6818 cmd->offset = offset; 6819 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_COLOR_INDEX, 1, type, stride, offset); 6820} 6821 6822 6823/* VertexArrayNormalOffsetEXT: marshalled asynchronously */ 6824struct marshal_cmd_VertexArrayNormalOffsetEXT 6825{ 6826 struct marshal_cmd_base cmd_base; 6827 GLuint vaobj; 6828 GLuint buffer; 6829 GLenum type; 6830 GLsizei stride; 6831 GLintptr offset; 6832}; 6833uint32_t 6834_mesa_unmarshal_VertexArrayNormalOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayNormalOffsetEXT *cmd, const uint64_t *last) 6835{ 6836 GLuint vaobj = cmd->vaobj; 6837 GLuint buffer = cmd->buffer; 6838 GLenum type = cmd->type; 6839 GLsizei stride = cmd->stride; 6840 GLintptr offset = cmd->offset; 6841 CALL_VertexArrayNormalOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, type, stride, offset)); 6842 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayNormalOffsetEXT), 8) / 8); 6843 assert (cmd_size == cmd->cmd_base.cmd_size); 6844 return cmd_size; 6845} 6846void GLAPIENTRY 6847_mesa_marshal_VertexArrayNormalOffsetEXT(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) 6848{ 6849 GET_CURRENT_CONTEXT(ctx); 6850 int cmd_size = sizeof(struct marshal_cmd_VertexArrayNormalOffsetEXT); 6851 struct marshal_cmd_VertexArrayNormalOffsetEXT *cmd; 6852 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayNormalOffsetEXT, cmd_size); 6853 cmd->vaobj = vaobj; 6854 cmd->buffer = buffer; 6855 cmd->type = type; 6856 cmd->stride = stride; 6857 cmd->offset = offset; 6858 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_NORMAL, 3, type, stride, offset); 6859} 6860 6861 6862/* VertexArrayTexCoordOffsetEXT: marshalled asynchronously */ 6863struct marshal_cmd_VertexArrayTexCoordOffsetEXT 6864{ 6865 struct marshal_cmd_base cmd_base; 6866 GLuint vaobj; 6867 GLuint buffer; 6868 GLint size; 6869 GLenum type; 6870 GLsizei stride; 6871 GLintptr offset; 6872}; 6873uint32_t 6874_mesa_unmarshal_VertexArrayTexCoordOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayTexCoordOffsetEXT *cmd, const uint64_t *last) 6875{ 6876 GLuint vaobj = cmd->vaobj; 6877 GLuint buffer = cmd->buffer; 6878 GLint size = cmd->size; 6879 GLenum type = cmd->type; 6880 GLsizei stride = cmd->stride; 6881 GLintptr offset = cmd->offset; 6882 CALL_VertexArrayTexCoordOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, size, type, stride, offset)); 6883 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayTexCoordOffsetEXT), 8) / 8); 6884 assert (cmd_size == cmd->cmd_base.cmd_size); 6885 return cmd_size; 6886} 6887void GLAPIENTRY 6888_mesa_marshal_VertexArrayTexCoordOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) 6889{ 6890 GET_CURRENT_CONTEXT(ctx); 6891 int cmd_size = sizeof(struct marshal_cmd_VertexArrayTexCoordOffsetEXT); 6892 struct marshal_cmd_VertexArrayTexCoordOffsetEXT *cmd; 6893 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayTexCoordOffsetEXT, cmd_size); 6894 cmd->vaobj = vaobj; 6895 cmd->buffer = buffer; 6896 cmd->size = size; 6897 cmd->type = type; 6898 cmd->stride = stride; 6899 cmd->offset = offset; 6900 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_TEX(ctx->GLThread.ClientActiveTexture), size, type, stride, offset); 6901} 6902 6903 6904/* VertexArrayMultiTexCoordOffsetEXT: marshalled asynchronously */ 6905struct marshal_cmd_VertexArrayMultiTexCoordOffsetEXT 6906{ 6907 struct marshal_cmd_base cmd_base; 6908 GLuint vaobj; 6909 GLuint buffer; 6910 GLenum texunit; 6911 GLint size; 6912 GLenum type; 6913 GLsizei stride; 6914 GLintptr offset; 6915}; 6916uint32_t 6917_mesa_unmarshal_VertexArrayMultiTexCoordOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayMultiTexCoordOffsetEXT *cmd, const uint64_t *last) 6918{ 6919 GLuint vaobj = cmd->vaobj; 6920 GLuint buffer = cmd->buffer; 6921 GLenum texunit = cmd->texunit; 6922 GLint size = cmd->size; 6923 GLenum type = cmd->type; 6924 GLsizei stride = cmd->stride; 6925 GLintptr offset = cmd->offset; 6926 CALL_VertexArrayMultiTexCoordOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, texunit, size, type, stride, offset)); 6927 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayMultiTexCoordOffsetEXT), 8) / 8); 6928 assert (cmd_size == cmd->cmd_base.cmd_size); 6929 return cmd_size; 6930} 6931void GLAPIENTRY 6932_mesa_marshal_VertexArrayMultiTexCoordOffsetEXT(GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset) 6933{ 6934 GET_CURRENT_CONTEXT(ctx); 6935 int cmd_size = sizeof(struct marshal_cmd_VertexArrayMultiTexCoordOffsetEXT); 6936 struct marshal_cmd_VertexArrayMultiTexCoordOffsetEXT *cmd; 6937 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayMultiTexCoordOffsetEXT, cmd_size); 6938 cmd->vaobj = vaobj; 6939 cmd->buffer = buffer; 6940 cmd->texunit = texunit; 6941 cmd->size = size; 6942 cmd->type = type; 6943 cmd->stride = stride; 6944 cmd->offset = offset; 6945 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_TEX(texunit - GL_TEXTURE0), size, type, stride, offset); 6946} 6947 6948 6949/* VertexArrayFogCoordOffsetEXT: marshalled asynchronously */ 6950struct marshal_cmd_VertexArrayFogCoordOffsetEXT 6951{ 6952 struct marshal_cmd_base cmd_base; 6953 GLuint vaobj; 6954 GLuint buffer; 6955 GLenum type; 6956 GLsizei stride; 6957 GLintptr offset; 6958}; 6959uint32_t 6960_mesa_unmarshal_VertexArrayFogCoordOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayFogCoordOffsetEXT *cmd, const uint64_t *last) 6961{ 6962 GLuint vaobj = cmd->vaobj; 6963 GLuint buffer = cmd->buffer; 6964 GLenum type = cmd->type; 6965 GLsizei stride = cmd->stride; 6966 GLintptr offset = cmd->offset; 6967 CALL_VertexArrayFogCoordOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, type, stride, offset)); 6968 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayFogCoordOffsetEXT), 8) / 8); 6969 assert (cmd_size == cmd->cmd_base.cmd_size); 6970 return cmd_size; 6971} 6972void GLAPIENTRY 6973_mesa_marshal_VertexArrayFogCoordOffsetEXT(GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset) 6974{ 6975 GET_CURRENT_CONTEXT(ctx); 6976 int cmd_size = sizeof(struct marshal_cmd_VertexArrayFogCoordOffsetEXT); 6977 struct marshal_cmd_VertexArrayFogCoordOffsetEXT *cmd; 6978 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayFogCoordOffsetEXT, cmd_size); 6979 cmd->vaobj = vaobj; 6980 cmd->buffer = buffer; 6981 cmd->type = type; 6982 cmd->stride = stride; 6983 cmd->offset = offset; 6984 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_FOG, 1, type, stride, offset); 6985} 6986 6987 6988/* VertexArraySecondaryColorOffsetEXT: marshalled asynchronously */ 6989struct marshal_cmd_VertexArraySecondaryColorOffsetEXT 6990{ 6991 struct marshal_cmd_base cmd_base; 6992 GLuint vaobj; 6993 GLuint buffer; 6994 GLint size; 6995 GLenum type; 6996 GLsizei stride; 6997 GLintptr offset; 6998}; 6999uint32_t 7000_mesa_unmarshal_VertexArraySecondaryColorOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArraySecondaryColorOffsetEXT *cmd, const uint64_t *last) 7001{ 7002 GLuint vaobj = cmd->vaobj; 7003 GLuint buffer = cmd->buffer; 7004 GLint size = cmd->size; 7005 GLenum type = cmd->type; 7006 GLsizei stride = cmd->stride; 7007 GLintptr offset = cmd->offset; 7008 CALL_VertexArraySecondaryColorOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, size, type, stride, offset)); 7009 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArraySecondaryColorOffsetEXT), 8) / 8); 7010 assert (cmd_size == cmd->cmd_base.cmd_size); 7011 return cmd_size; 7012} 7013void GLAPIENTRY 7014_mesa_marshal_VertexArraySecondaryColorOffsetEXT(GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset) 7015{ 7016 GET_CURRENT_CONTEXT(ctx); 7017 int cmd_size = sizeof(struct marshal_cmd_VertexArraySecondaryColorOffsetEXT); 7018 struct marshal_cmd_VertexArraySecondaryColorOffsetEXT *cmd; 7019 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArraySecondaryColorOffsetEXT, cmd_size); 7020 cmd->vaobj = vaobj; 7021 cmd->buffer = buffer; 7022 cmd->size = size; 7023 cmd->type = type; 7024 cmd->stride = stride; 7025 cmd->offset = offset; 7026 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_COLOR1, size, type, stride, offset); 7027} 7028 7029 7030/* VertexArrayVertexAttribOffsetEXT: marshalled asynchronously */ 7031struct marshal_cmd_VertexArrayVertexAttribOffsetEXT 7032{ 7033 struct marshal_cmd_base cmd_base; 7034 GLboolean normalized; 7035 GLuint vaobj; 7036 GLuint buffer; 7037 GLuint index; 7038 GLint size; 7039 GLenum type; 7040 GLsizei stride; 7041 GLintptr offset; 7042}; 7043uint32_t 7044_mesa_unmarshal_VertexArrayVertexAttribOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayVertexAttribOffsetEXT *cmd, const uint64_t *last) 7045{ 7046 GLuint vaobj = cmd->vaobj; 7047 GLuint buffer = cmd->buffer; 7048 GLuint index = cmd->index; 7049 GLint size = cmd->size; 7050 GLenum type = cmd->type; 7051 GLboolean normalized = cmd->normalized; 7052 GLsizei stride = cmd->stride; 7053 GLintptr offset = cmd->offset; 7054 CALL_VertexArrayVertexAttribOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, index, size, type, normalized, stride, offset)); 7055 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayVertexAttribOffsetEXT), 8) / 8); 7056 assert (cmd_size == cmd->cmd_base.cmd_size); 7057 return cmd_size; 7058} 7059void GLAPIENTRY 7060_mesa_marshal_VertexArrayVertexAttribOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset) 7061{ 7062 GET_CURRENT_CONTEXT(ctx); 7063 int cmd_size = sizeof(struct marshal_cmd_VertexArrayVertexAttribOffsetEXT); 7064 struct marshal_cmd_VertexArrayVertexAttribOffsetEXT *cmd; 7065 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayVertexAttribOffsetEXT, cmd_size); 7066 cmd->vaobj = vaobj; 7067 cmd->buffer = buffer; 7068 cmd->index = index; 7069 cmd->size = size; 7070 cmd->type = type; 7071 cmd->normalized = normalized; 7072 cmd->stride = stride; 7073 cmd->offset = offset; 7074 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_GENERIC(index), size, type, stride, offset); 7075} 7076 7077 7078/* VertexArrayVertexAttribIOffsetEXT: marshalled asynchronously */ 7079struct marshal_cmd_VertexArrayVertexAttribIOffsetEXT 7080{ 7081 struct marshal_cmd_base cmd_base; 7082 GLuint vaobj; 7083 GLuint buffer; 7084 GLuint index; 7085 GLint size; 7086 GLenum type; 7087 GLsizei stride; 7088 GLintptr offset; 7089}; 7090uint32_t 7091_mesa_unmarshal_VertexArrayVertexAttribIOffsetEXT(struct gl_context *ctx, const struct marshal_cmd_VertexArrayVertexAttribIOffsetEXT *cmd, const uint64_t *last) 7092{ 7093 GLuint vaobj = cmd->vaobj; 7094 GLuint buffer = cmd->buffer; 7095 GLuint index = cmd->index; 7096 GLint size = cmd->size; 7097 GLenum type = cmd->type; 7098 GLsizei stride = cmd->stride; 7099 GLintptr offset = cmd->offset; 7100 CALL_VertexArrayVertexAttribIOffsetEXT(ctx->CurrentServerDispatch, (vaobj, buffer, index, size, type, stride, offset)); 7101 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_VertexArrayVertexAttribIOffsetEXT), 8) / 8); 7102 assert (cmd_size == cmd->cmd_base.cmd_size); 7103 return cmd_size; 7104} 7105void GLAPIENTRY 7106_mesa_marshal_VertexArrayVertexAttribIOffsetEXT(GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset) 7107{ 7108 GET_CURRENT_CONTEXT(ctx); 7109 int cmd_size = sizeof(struct marshal_cmd_VertexArrayVertexAttribIOffsetEXT); 7110 struct marshal_cmd_VertexArrayVertexAttribIOffsetEXT *cmd; 7111 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_VertexArrayVertexAttribIOffsetEXT, cmd_size); 7112 cmd->vaobj = vaobj; 7113 cmd->buffer = buffer; 7114 cmd->index = index; 7115 cmd->size = size; 7116 cmd->type = type; 7117 cmd->stride = stride; 7118 cmd->offset = offset; 7119 if (COMPAT) _mesa_glthread_DSAAttribPointer(ctx, vaobj, buffer, VERT_ATTRIB_GENERIC(index), size, type, stride, offset); 7120} 7121 7122 7123/* EnableVertexArrayEXT: marshalled asynchronously */ 7124struct marshal_cmd_EnableVertexArrayEXT 7125{ 7126 struct marshal_cmd_base cmd_base; 7127 GLuint vaobj; 7128 GLenum array; 7129}; 7130uint32_t 7131_mesa_unmarshal_EnableVertexArrayEXT(struct gl_context *ctx, const struct marshal_cmd_EnableVertexArrayEXT *cmd, const uint64_t *last) 7132{ 7133 GLuint vaobj = cmd->vaobj; 7134 GLenum array = cmd->array; 7135 CALL_EnableVertexArrayEXT(ctx->CurrentServerDispatch, (vaobj, array)); 7136 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EnableVertexArrayEXT), 8) / 8); 7137 assert (cmd_size == cmd->cmd_base.cmd_size); 7138 return cmd_size; 7139} 7140void GLAPIENTRY 7141_mesa_marshal_EnableVertexArrayEXT(GLuint vaobj, GLenum array) 7142{ 7143 GET_CURRENT_CONTEXT(ctx); 7144 int cmd_size = sizeof(struct marshal_cmd_EnableVertexArrayEXT); 7145 struct marshal_cmd_EnableVertexArrayEXT *cmd; 7146 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EnableVertexArrayEXT, cmd_size); 7147 cmd->vaobj = vaobj; 7148 cmd->array = array; 7149 if (COMPAT) _mesa_glthread_ClientState(ctx, &vaobj, _mesa_array_to_attrib(ctx, array), true); 7150} 7151 7152 7153/* DisableVertexArrayEXT: marshalled asynchronously */ 7154struct marshal_cmd_DisableVertexArrayEXT 7155{ 7156 struct marshal_cmd_base cmd_base; 7157 GLuint vaobj; 7158 GLenum array; 7159}; 7160uint32_t 7161_mesa_unmarshal_DisableVertexArrayEXT(struct gl_context *ctx, const struct marshal_cmd_DisableVertexArrayEXT *cmd, const uint64_t *last) 7162{ 7163 GLuint vaobj = cmd->vaobj; 7164 GLenum array = cmd->array; 7165 CALL_DisableVertexArrayEXT(ctx->CurrentServerDispatch, (vaobj, array)); 7166 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DisableVertexArrayEXT), 8) / 8); 7167 assert (cmd_size == cmd->cmd_base.cmd_size); 7168 return cmd_size; 7169} 7170void GLAPIENTRY 7171_mesa_marshal_DisableVertexArrayEXT(GLuint vaobj, GLenum array) 7172{ 7173 GET_CURRENT_CONTEXT(ctx); 7174 int cmd_size = sizeof(struct marshal_cmd_DisableVertexArrayEXT); 7175 struct marshal_cmd_DisableVertexArrayEXT *cmd; 7176 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DisableVertexArrayEXT, cmd_size); 7177 cmd->vaobj = vaobj; 7178 cmd->array = array; 7179 if (COMPAT) _mesa_glthread_ClientState(ctx, &vaobj, _mesa_array_to_attrib(ctx, array), false); 7180} 7181 7182 7183/* EnableVertexArrayAttribEXT: marshalled asynchronously */ 7184struct marshal_cmd_EnableVertexArrayAttribEXT 7185{ 7186 struct marshal_cmd_base cmd_base; 7187 GLuint vaobj; 7188 GLuint index; 7189}; 7190uint32_t 7191_mesa_unmarshal_EnableVertexArrayAttribEXT(struct gl_context *ctx, const struct marshal_cmd_EnableVertexArrayAttribEXT *cmd, const uint64_t *last) 7192{ 7193 GLuint vaobj = cmd->vaobj; 7194 GLuint index = cmd->index; 7195 CALL_EnableVertexArrayAttribEXT(ctx->CurrentServerDispatch, (vaobj, index)); 7196 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EnableVertexArrayAttribEXT), 8) / 8); 7197 assert (cmd_size == cmd->cmd_base.cmd_size); 7198 return cmd_size; 7199} 7200void GLAPIENTRY 7201_mesa_marshal_EnableVertexArrayAttribEXT(GLuint vaobj, GLuint index) 7202{ 7203 GET_CURRENT_CONTEXT(ctx); 7204 int cmd_size = sizeof(struct marshal_cmd_EnableVertexArrayAttribEXT); 7205 struct marshal_cmd_EnableVertexArrayAttribEXT *cmd; 7206 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EnableVertexArrayAttribEXT, cmd_size); 7207 cmd->vaobj = vaobj; 7208 cmd->index = index; 7209 if (COMPAT) _mesa_glthread_ClientState(ctx, &vaobj, VERT_ATTRIB_GENERIC(index), true); 7210} 7211 7212 7213/* DisableVertexArrayAttribEXT: marshalled asynchronously */ 7214struct marshal_cmd_DisableVertexArrayAttribEXT 7215{ 7216 struct marshal_cmd_base cmd_base; 7217 GLuint vaobj; 7218 GLuint index; 7219}; 7220uint32_t 7221_mesa_unmarshal_DisableVertexArrayAttribEXT(struct gl_context *ctx, const struct marshal_cmd_DisableVertexArrayAttribEXT *cmd, const uint64_t *last) 7222{ 7223 GLuint vaobj = cmd->vaobj; 7224 GLuint index = cmd->index; 7225 CALL_DisableVertexArrayAttribEXT(ctx->CurrentServerDispatch, (vaobj, index)); 7226 const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DisableVertexArrayAttribEXT), 8) / 8); 7227 assert (cmd_size == cmd->cmd_base.cmd_size); 7228 return cmd_size; 7229} 7230void GLAPIENTRY 7231_mesa_marshal_DisableVertexArrayAttribEXT(GLuint vaobj, GLuint index) 7232{ 7233 GET_CURRENT_CONTEXT(ctx); 7234 int cmd_size = sizeof(struct marshal_cmd_DisableVertexArrayAttribEXT); 7235 struct marshal_cmd_DisableVertexArrayAttribEXT *cmd; 7236 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DisableVertexArrayAttribEXT, cmd_size); 7237 cmd->vaobj = vaobj; 7238 cmd->index = index; 7239 if (COMPAT) _mesa_glthread_ClientState(ctx, &vaobj, VERT_ATTRIB_GENERIC(index), false); 7240} 7241 7242 7243/* GetVertexArrayIntegervEXT: marshalled synchronously */ 7244void GLAPIENTRY 7245_mesa_marshal_GetVertexArrayIntegervEXT(GLuint vaobj, GLenum pname, GLint* param) 7246{ 7247 GET_CURRENT_CONTEXT(ctx); 7248 _mesa_glthread_finish_before(ctx, "GetVertexArrayIntegervEXT"); 7249 CALL_GetVertexArrayIntegervEXT(ctx->CurrentServerDispatch, (vaobj, pname, param)); 7250} 7251 7252 7253/* GetVertexArrayPointervEXT: marshalled synchronously */ 7254void GLAPIENTRY 7255_mesa_marshal_GetVertexArrayPointervEXT(GLuint vaobj, GLenum pname, GLvoid** param) 7256{ 7257 GET_CURRENT_CONTEXT(ctx); 7258 _mesa_glthread_finish_before(ctx, "GetVertexArrayPointervEXT"); 7259 CALL_GetVertexArrayPointervEXT(ctx->CurrentServerDispatch, (vaobj, pname, param)); 7260} 7261 7262 7263/* GetVertexArrayIntegeri_vEXT: marshalled synchronously */ 7264void GLAPIENTRY 7265_mesa_marshal_GetVertexArrayIntegeri_vEXT(GLuint vaobj, GLuint index, GLenum pname, GLint* param) 7266{ 7267 GET_CURRENT_CONTEXT(ctx); 7268 _mesa_glthread_finish_before(ctx, "GetVertexArrayIntegeri_vEXT"); 7269 CALL_GetVertexArrayIntegeri_vEXT(ctx->CurrentServerDispatch, (vaobj, index, pname, param)); 7270} 7271 7272 7273/* GetVertexArrayPointeri_vEXT: marshalled synchronously */ 7274void GLAPIENTRY 7275_mesa_marshal_GetVertexArrayPointeri_vEXT(GLuint vaobj, GLuint index, GLenum pname, GLvoid** param) 7276{ 7277 GET_CURRENT_CONTEXT(ctx); 7278 _mesa_glthread_finish_before(ctx, "GetVertexArrayPointeri_vEXT"); 7279 CALL_GetVertexArrayPointeri_vEXT(ctx->CurrentServerDispatch, (vaobj, index, pname, param)); 7280} 7281 7282 7283/* NamedProgramStringEXT: marshalled asynchronously */ 7284struct marshal_cmd_NamedProgramStringEXT 7285{ 7286 struct marshal_cmd_base cmd_base; 7287 GLuint program; 7288 GLenum target; 7289 GLenum format; 7290 GLsizei len; 7291 /* Next len bytes are GLvoid string[len] */ 7292}; 7293uint32_t 7294_mesa_unmarshal_NamedProgramStringEXT(struct gl_context *ctx, const struct marshal_cmd_NamedProgramStringEXT *cmd, const uint64_t *last) 7295{ 7296 GLuint program = cmd->program; 7297 GLenum target = cmd->target; 7298 GLenum format = cmd->format; 7299 GLsizei len = cmd->len; 7300 GLvoid * string; 7301 const char *variable_data = (const char *) (cmd + 1); 7302 string = (GLvoid *) variable_data; 7303 CALL_NamedProgramStringEXT(ctx->CurrentServerDispatch, (program, target, format, len, string)); 7304 return cmd->cmd_base.cmd_size; 7305} 7306void GLAPIENTRY 7307_mesa_marshal_NamedProgramStringEXT(GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid* string) 7308{ 7309 GET_CURRENT_CONTEXT(ctx); 7310 int string_size = len; 7311 int cmd_size = sizeof(struct marshal_cmd_NamedProgramStringEXT) + string_size; 7312 struct marshal_cmd_NamedProgramStringEXT *cmd; 7313 if (unlikely(string_size < 0 || (string_size > 0 && !string) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) { 7314 _mesa_glthread_finish_before(ctx, "NamedProgramStringEXT"); 7315 CALL_NamedProgramStringEXT(ctx->CurrentServerDispatch, (program, target, format, len, string)); 7316 return; 7317 } 7318 cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NamedProgramStringEXT, cmd_size); 7319 cmd->program = program; 7320 cmd->target = target; 7321 cmd->format = format; 7322 cmd->len = len; 7323 char *variable_data = (char *) (cmd + 1); 7324 memcpy(variable_data, string, string_size); 7325} 7326 7327 7328