marshal_generated1.c revision 96c5ddc4
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/* NewList: marshalled asynchronously */
45struct marshal_cmd_NewList
46{
47   struct marshal_cmd_base cmd_base;
48   GLuint list;
49   GLenum mode;
50};
51uint32_t
52_mesa_unmarshal_NewList(struct gl_context *ctx, const struct marshal_cmd_NewList *cmd, const uint64_t *last)
53{
54   GLuint list = cmd->list;
55   GLenum mode = cmd->mode;
56   CALL_NewList(ctx->CurrentServerDispatch, (list, mode));
57   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_NewList), 8) / 8);
58   assert (cmd_size == cmd->cmd_base.cmd_size);
59   return cmd_size;
60}
61void GLAPIENTRY
62_mesa_marshal_NewList(GLuint list, GLenum mode)
63{
64   GET_CURRENT_CONTEXT(ctx);
65   int cmd_size = sizeof(struct marshal_cmd_NewList);
66   struct marshal_cmd_NewList *cmd;
67   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_NewList, cmd_size);
68   cmd->list = list;
69   cmd->mode = mode;
70   _mesa_glthread_NewList(ctx, list, mode);
71}
72
73
74/* EndList: marshalled asynchronously */
75struct marshal_cmd_EndList
76{
77   struct marshal_cmd_base cmd_base;
78};
79uint32_t
80_mesa_unmarshal_EndList(struct gl_context *ctx, const struct marshal_cmd_EndList *cmd, const uint64_t *last)
81{
82   CALL_EndList(ctx->CurrentServerDispatch, ());
83   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EndList), 8) / 8);
84   assert (cmd_size == cmd->cmd_base.cmd_size);
85   return cmd_size;
86}
87void GLAPIENTRY
88_mesa_marshal_EndList(void)
89{
90   GET_CURRENT_CONTEXT(ctx);
91   int cmd_size = sizeof(struct marshal_cmd_EndList);
92   struct marshal_cmd_EndList *cmd;
93   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EndList, cmd_size);
94   (void) cmd;
95   _mesa_glthread_EndList(ctx);
96}
97
98
99/* CallLists: marshalled asynchronously */
100struct marshal_cmd_CallLists
101{
102   struct marshal_cmd_base cmd_base;
103   GLsizei n;
104   GLenum type;
105   /* Next (n * _mesa_calllists_enum_to_count(type)) bytes are GLvoid lists[n] */
106};
107uint32_t
108_mesa_unmarshal_CallLists(struct gl_context *ctx, const struct marshal_cmd_CallLists *cmd, const uint64_t *last)
109{
110   GLsizei n = cmd->n;
111   GLenum type = cmd->type;
112   GLvoid * lists;
113   const char *variable_data = (const char *) (cmd + 1);
114   lists = (GLvoid *) variable_data;
115   CALL_CallLists(ctx->CurrentServerDispatch, (n, type, lists));
116   return cmd->cmd_base.cmd_size;
117}
118void GLAPIENTRY
119_mesa_marshal_CallLists(GLsizei n, GLenum type, const GLvoid * lists)
120{
121   GET_CURRENT_CONTEXT(ctx);
122   int lists_size = (n * _mesa_calllists_enum_to_count(type));
123   int cmd_size = sizeof(struct marshal_cmd_CallLists) + lists_size;
124   struct marshal_cmd_CallLists *cmd;
125   if (unlikely(lists_size < 0 || (lists_size > 0 && !lists) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
126      _mesa_glthread_finish_before(ctx, "CallLists");
127      CALL_CallLists(ctx->CurrentServerDispatch, (n, type, lists));
128      _mesa_glthread_CallLists(ctx, n, type, lists);
129      return;
130   }
131   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CallLists, cmd_size);
132   cmd->n = n;
133   cmd->type = type;
134   char *variable_data = (char *) (cmd + 1);
135   memcpy(variable_data, lists, lists_size);
136   _mesa_glthread_CallLists(ctx, n, type, lists);
137}
138
139
140/* DeleteLists: marshalled asynchronously */
141struct marshal_cmd_DeleteLists
142{
143   struct marshal_cmd_base cmd_base;
144   GLuint list;
145   GLsizei range;
146};
147uint32_t
148_mesa_unmarshal_DeleteLists(struct gl_context *ctx, const struct marshal_cmd_DeleteLists *cmd, const uint64_t *last)
149{
150   GLuint list = cmd->list;
151   GLsizei range = cmd->range;
152   CALL_DeleteLists(ctx->CurrentServerDispatch, (list, range));
153   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DeleteLists), 8) / 8);
154   assert (cmd_size == cmd->cmd_base.cmd_size);
155   return cmd_size;
156}
157void GLAPIENTRY
158_mesa_marshal_DeleteLists(GLuint list, GLsizei range)
159{
160   GET_CURRENT_CONTEXT(ctx);
161   int cmd_size = sizeof(struct marshal_cmd_DeleteLists);
162   struct marshal_cmd_DeleteLists *cmd;
163   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DeleteLists, cmd_size);
164   cmd->list = list;
165   cmd->range = range;
166   _mesa_glthread_DeleteLists(ctx, range);
167}
168
169
170/* GenLists: marshalled synchronously */
171GLuint GLAPIENTRY
172_mesa_marshal_GenLists(GLsizei range)
173{
174   GET_CURRENT_CONTEXT(ctx);
175   _mesa_glthread_finish_before(ctx, "GenLists");
176   return CALL_GenLists(ctx->CurrentServerDispatch, (range));
177}
178
179
180/* ListBase: marshalled asynchronously */
181struct marshal_cmd_ListBase
182{
183   struct marshal_cmd_base cmd_base;
184   GLuint base;
185};
186uint32_t
187_mesa_unmarshal_ListBase(struct gl_context *ctx, const struct marshal_cmd_ListBase *cmd, const uint64_t *last)
188{
189   GLuint base = cmd->base;
190   CALL_ListBase(ctx->CurrentServerDispatch, (base));
191   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ListBase), 8) / 8);
192   assert (cmd_size == cmd->cmd_base.cmd_size);
193   return cmd_size;
194}
195void GLAPIENTRY
196_mesa_marshal_ListBase(GLuint base)
197{
198   GET_CURRENT_CONTEXT(ctx);
199   int cmd_size = sizeof(struct marshal_cmd_ListBase);
200   struct marshal_cmd_ListBase *cmd;
201   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ListBase, cmd_size);
202   cmd->base = base;
203   _mesa_glthread_ListBase(ctx, base);
204}
205
206
207/* Begin: marshalled asynchronously */
208struct marshal_cmd_Begin
209{
210   struct marshal_cmd_base cmd_base;
211   GLenum mode;
212};
213uint32_t
214_mesa_unmarshal_Begin(struct gl_context *ctx, const struct marshal_cmd_Begin *cmd, const uint64_t *last)
215{
216   GLenum mode = cmd->mode;
217   CALL_Begin(ctx->CurrentServerDispatch, (mode));
218   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Begin), 8) / 8);
219   assert (cmd_size == cmd->cmd_base.cmd_size);
220   return cmd_size;
221}
222void GLAPIENTRY
223_mesa_marshal_Begin(GLenum mode)
224{
225   GET_CURRENT_CONTEXT(ctx);
226   int cmd_size = sizeof(struct marshal_cmd_Begin);
227   struct marshal_cmd_Begin *cmd;
228   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Begin, cmd_size);
229   cmd->mode = mode;
230}
231
232
233/* Bitmap: marshalled asynchronously */
234struct marshal_cmd_Bitmap
235{
236   struct marshal_cmd_base cmd_base;
237   GLsizei width;
238   GLsizei height;
239   GLfloat xorig;
240   GLfloat yorig;
241   GLfloat xmove;
242   GLfloat ymove;
243   const GLubyte * bitmap;
244};
245uint32_t
246_mesa_unmarshal_Bitmap(struct gl_context *ctx, const struct marshal_cmd_Bitmap *cmd, const uint64_t *last)
247{
248   GLsizei width = cmd->width;
249   GLsizei height = cmd->height;
250   GLfloat xorig = cmd->xorig;
251   GLfloat yorig = cmd->yorig;
252   GLfloat xmove = cmd->xmove;
253   GLfloat ymove = cmd->ymove;
254   const GLubyte * bitmap = cmd->bitmap;
255   CALL_Bitmap(ctx->CurrentServerDispatch, (width, height, xorig, yorig, xmove, ymove, bitmap));
256   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Bitmap), 8) / 8);
257   assert (cmd_size == cmd->cmd_base.cmd_size);
258   return cmd_size;
259}
260void GLAPIENTRY
261_mesa_marshal_Bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap)
262{
263   GET_CURRENT_CONTEXT(ctx);
264   int cmd_size = sizeof(struct marshal_cmd_Bitmap);
265   struct marshal_cmd_Bitmap *cmd;
266   if (_mesa_glthread_has_no_unpack_buffer(ctx)) {
267      _mesa_glthread_finish_before(ctx, "Bitmap");
268      CALL_Bitmap(ctx->CurrentServerDispatch, (width, height, xorig, yorig, xmove, ymove, bitmap));
269      return;
270   }
271   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Bitmap, cmd_size);
272   cmd->width = width;
273   cmd->height = height;
274   cmd->xorig = xorig;
275   cmd->yorig = yorig;
276   cmd->xmove = xmove;
277   cmd->ymove = ymove;
278   cmd->bitmap = bitmap;
279}
280
281
282/* Color3b: marshalled asynchronously */
283struct marshal_cmd_Color3b
284{
285   struct marshal_cmd_base cmd_base;
286   GLbyte red;
287   GLbyte green;
288   GLbyte blue;
289};
290uint32_t
291_mesa_unmarshal_Color3b(struct gl_context *ctx, const struct marshal_cmd_Color3b *cmd, const uint64_t *last)
292{
293   GLbyte red = cmd->red;
294   GLbyte green = cmd->green;
295   GLbyte blue = cmd->blue;
296   CALL_Color3b(ctx->CurrentServerDispatch, (red, green, blue));
297   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3b), 8) / 8);
298   assert (cmd_size == cmd->cmd_base.cmd_size);
299   return cmd_size;
300}
301void GLAPIENTRY
302_mesa_marshal_Color3b(GLbyte red, GLbyte green, GLbyte blue)
303{
304   GET_CURRENT_CONTEXT(ctx);
305   int cmd_size = sizeof(struct marshal_cmd_Color3b);
306   struct marshal_cmd_Color3b *cmd;
307   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3b, cmd_size);
308   cmd->red = red;
309   cmd->green = green;
310   cmd->blue = blue;
311}
312
313
314/* Color3bv: marshalled asynchronously */
315struct marshal_cmd_Color3bv
316{
317   struct marshal_cmd_base cmd_base;
318   GLbyte v[3];
319};
320uint32_t
321_mesa_unmarshal_Color3bv(struct gl_context *ctx, const struct marshal_cmd_Color3bv *cmd, const uint64_t *last)
322{
323   const GLbyte * v = cmd->v;
324   CALL_Color3bv(ctx->CurrentServerDispatch, (v));
325   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3bv), 8) / 8);
326   assert (cmd_size == cmd->cmd_base.cmd_size);
327   return cmd_size;
328}
329void GLAPIENTRY
330_mesa_marshal_Color3bv(const GLbyte * v)
331{
332   GET_CURRENT_CONTEXT(ctx);
333   int cmd_size = sizeof(struct marshal_cmd_Color3bv);
334   struct marshal_cmd_Color3bv *cmd;
335   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3bv, cmd_size);
336   memcpy(cmd->v, v, 3 * sizeof(GLbyte));
337}
338
339
340/* Color3d: marshalled asynchronously */
341struct marshal_cmd_Color3d
342{
343   struct marshal_cmd_base cmd_base;
344   GLdouble red;
345   GLdouble green;
346   GLdouble blue;
347};
348uint32_t
349_mesa_unmarshal_Color3d(struct gl_context *ctx, const struct marshal_cmd_Color3d *cmd, const uint64_t *last)
350{
351   GLdouble red = cmd->red;
352   GLdouble green = cmd->green;
353   GLdouble blue = cmd->blue;
354   CALL_Color3d(ctx->CurrentServerDispatch, (red, green, blue));
355   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3d), 8) / 8);
356   assert (cmd_size == cmd->cmd_base.cmd_size);
357   return cmd_size;
358}
359void GLAPIENTRY
360_mesa_marshal_Color3d(GLdouble red, GLdouble green, GLdouble blue)
361{
362   GET_CURRENT_CONTEXT(ctx);
363   int cmd_size = sizeof(struct marshal_cmd_Color3d);
364   struct marshal_cmd_Color3d *cmd;
365   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3d, cmd_size);
366   cmd->red = red;
367   cmd->green = green;
368   cmd->blue = blue;
369}
370
371
372/* Color3dv: marshalled asynchronously */
373struct marshal_cmd_Color3dv
374{
375   struct marshal_cmd_base cmd_base;
376   GLdouble v[3];
377};
378uint32_t
379_mesa_unmarshal_Color3dv(struct gl_context *ctx, const struct marshal_cmd_Color3dv *cmd, const uint64_t *last)
380{
381   const GLdouble * v = cmd->v;
382   CALL_Color3dv(ctx->CurrentServerDispatch, (v));
383   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3dv), 8) / 8);
384   assert (cmd_size == cmd->cmd_base.cmd_size);
385   return cmd_size;
386}
387void GLAPIENTRY
388_mesa_marshal_Color3dv(const GLdouble * v)
389{
390   GET_CURRENT_CONTEXT(ctx);
391   int cmd_size = sizeof(struct marshal_cmd_Color3dv);
392   struct marshal_cmd_Color3dv *cmd;
393   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3dv, cmd_size);
394   memcpy(cmd->v, v, 3 * sizeof(GLdouble));
395}
396
397
398/* Color3f: marshalled asynchronously */
399struct marshal_cmd_Color3f
400{
401   struct marshal_cmd_base cmd_base;
402   GLfloat red;
403   GLfloat green;
404   GLfloat blue;
405};
406uint32_t
407_mesa_unmarshal_Color3f(struct gl_context *ctx, const struct marshal_cmd_Color3f *cmd, const uint64_t *last)
408{
409   GLfloat red = cmd->red;
410   GLfloat green = cmd->green;
411   GLfloat blue = cmd->blue;
412   CALL_Color3f(ctx->CurrentServerDispatch, (red, green, blue));
413   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3f), 8) / 8);
414   assert (cmd_size == cmd->cmd_base.cmd_size);
415   return cmd_size;
416}
417void GLAPIENTRY
418_mesa_marshal_Color3f(GLfloat red, GLfloat green, GLfloat blue)
419{
420   GET_CURRENT_CONTEXT(ctx);
421   int cmd_size = sizeof(struct marshal_cmd_Color3f);
422   struct marshal_cmd_Color3f *cmd;
423   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3f, cmd_size);
424   cmd->red = red;
425   cmd->green = green;
426   cmd->blue = blue;
427}
428
429
430/* Color3fv: marshalled asynchronously */
431struct marshal_cmd_Color3fv
432{
433   struct marshal_cmd_base cmd_base;
434   GLfloat v[3];
435};
436uint32_t
437_mesa_unmarshal_Color3fv(struct gl_context *ctx, const struct marshal_cmd_Color3fv *cmd, const uint64_t *last)
438{
439   const GLfloat * v = cmd->v;
440   CALL_Color3fv(ctx->CurrentServerDispatch, (v));
441   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3fv), 8) / 8);
442   assert (cmd_size == cmd->cmd_base.cmd_size);
443   return cmd_size;
444}
445void GLAPIENTRY
446_mesa_marshal_Color3fv(const GLfloat * v)
447{
448   GET_CURRENT_CONTEXT(ctx);
449   int cmd_size = sizeof(struct marshal_cmd_Color3fv);
450   struct marshal_cmd_Color3fv *cmd;
451   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3fv, cmd_size);
452   memcpy(cmd->v, v, 3 * sizeof(GLfloat));
453}
454
455
456/* Color3i: marshalled asynchronously */
457struct marshal_cmd_Color3i
458{
459   struct marshal_cmd_base cmd_base;
460   GLint red;
461   GLint green;
462   GLint blue;
463};
464uint32_t
465_mesa_unmarshal_Color3i(struct gl_context *ctx, const struct marshal_cmd_Color3i *cmd, const uint64_t *last)
466{
467   GLint red = cmd->red;
468   GLint green = cmd->green;
469   GLint blue = cmd->blue;
470   CALL_Color3i(ctx->CurrentServerDispatch, (red, green, blue));
471   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3i), 8) / 8);
472   assert (cmd_size == cmd->cmd_base.cmd_size);
473   return cmd_size;
474}
475void GLAPIENTRY
476_mesa_marshal_Color3i(GLint red, GLint green, GLint blue)
477{
478   GET_CURRENT_CONTEXT(ctx);
479   int cmd_size = sizeof(struct marshal_cmd_Color3i);
480   struct marshal_cmd_Color3i *cmd;
481   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3i, cmd_size);
482   cmd->red = red;
483   cmd->green = green;
484   cmd->blue = blue;
485}
486
487
488/* Color3iv: marshalled asynchronously */
489struct marshal_cmd_Color3iv
490{
491   struct marshal_cmd_base cmd_base;
492   GLint v[3];
493};
494uint32_t
495_mesa_unmarshal_Color3iv(struct gl_context *ctx, const struct marshal_cmd_Color3iv *cmd, const uint64_t *last)
496{
497   const GLint * v = cmd->v;
498   CALL_Color3iv(ctx->CurrentServerDispatch, (v));
499   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3iv), 8) / 8);
500   assert (cmd_size == cmd->cmd_base.cmd_size);
501   return cmd_size;
502}
503void GLAPIENTRY
504_mesa_marshal_Color3iv(const GLint * v)
505{
506   GET_CURRENT_CONTEXT(ctx);
507   int cmd_size = sizeof(struct marshal_cmd_Color3iv);
508   struct marshal_cmd_Color3iv *cmd;
509   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3iv, cmd_size);
510   memcpy(cmd->v, v, 3 * sizeof(GLint));
511}
512
513
514/* Color3s: marshalled asynchronously */
515struct marshal_cmd_Color3s
516{
517   struct marshal_cmd_base cmd_base;
518   GLshort red;
519   GLshort green;
520   GLshort blue;
521};
522uint32_t
523_mesa_unmarshal_Color3s(struct gl_context *ctx, const struct marshal_cmd_Color3s *cmd, const uint64_t *last)
524{
525   GLshort red = cmd->red;
526   GLshort green = cmd->green;
527   GLshort blue = cmd->blue;
528   CALL_Color3s(ctx->CurrentServerDispatch, (red, green, blue));
529   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3s), 8) / 8);
530   assert (cmd_size == cmd->cmd_base.cmd_size);
531   return cmd_size;
532}
533void GLAPIENTRY
534_mesa_marshal_Color3s(GLshort red, GLshort green, GLshort blue)
535{
536   GET_CURRENT_CONTEXT(ctx);
537   int cmd_size = sizeof(struct marshal_cmd_Color3s);
538   struct marshal_cmd_Color3s *cmd;
539   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3s, cmd_size);
540   cmd->red = red;
541   cmd->green = green;
542   cmd->blue = blue;
543}
544
545
546/* Color3sv: marshalled asynchronously */
547struct marshal_cmd_Color3sv
548{
549   struct marshal_cmd_base cmd_base;
550   GLshort v[3];
551};
552uint32_t
553_mesa_unmarshal_Color3sv(struct gl_context *ctx, const struct marshal_cmd_Color3sv *cmd, const uint64_t *last)
554{
555   const GLshort * v = cmd->v;
556   CALL_Color3sv(ctx->CurrentServerDispatch, (v));
557   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3sv), 8) / 8);
558   assert (cmd_size == cmd->cmd_base.cmd_size);
559   return cmd_size;
560}
561void GLAPIENTRY
562_mesa_marshal_Color3sv(const GLshort * v)
563{
564   GET_CURRENT_CONTEXT(ctx);
565   int cmd_size = sizeof(struct marshal_cmd_Color3sv);
566   struct marshal_cmd_Color3sv *cmd;
567   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3sv, cmd_size);
568   memcpy(cmd->v, v, 3 * sizeof(GLshort));
569}
570
571
572/* Color3ub: marshalled asynchronously */
573struct marshal_cmd_Color3ub
574{
575   struct marshal_cmd_base cmd_base;
576   GLubyte red;
577   GLubyte green;
578   GLubyte blue;
579};
580uint32_t
581_mesa_unmarshal_Color3ub(struct gl_context *ctx, const struct marshal_cmd_Color3ub *cmd, const uint64_t *last)
582{
583   GLubyte red = cmd->red;
584   GLubyte green = cmd->green;
585   GLubyte blue = cmd->blue;
586   CALL_Color3ub(ctx->CurrentServerDispatch, (red, green, blue));
587   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3ub), 8) / 8);
588   assert (cmd_size == cmd->cmd_base.cmd_size);
589   return cmd_size;
590}
591void GLAPIENTRY
592_mesa_marshal_Color3ub(GLubyte red, GLubyte green, GLubyte blue)
593{
594   GET_CURRENT_CONTEXT(ctx);
595   int cmd_size = sizeof(struct marshal_cmd_Color3ub);
596   struct marshal_cmd_Color3ub *cmd;
597   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3ub, cmd_size);
598   cmd->red = red;
599   cmd->green = green;
600   cmd->blue = blue;
601}
602
603
604/* Color3ubv: marshalled asynchronously */
605struct marshal_cmd_Color3ubv
606{
607   struct marshal_cmd_base cmd_base;
608   GLubyte v[3];
609};
610uint32_t
611_mesa_unmarshal_Color3ubv(struct gl_context *ctx, const struct marshal_cmd_Color3ubv *cmd, const uint64_t *last)
612{
613   const GLubyte * v = cmd->v;
614   CALL_Color3ubv(ctx->CurrentServerDispatch, (v));
615   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3ubv), 8) / 8);
616   assert (cmd_size == cmd->cmd_base.cmd_size);
617   return cmd_size;
618}
619void GLAPIENTRY
620_mesa_marshal_Color3ubv(const GLubyte * v)
621{
622   GET_CURRENT_CONTEXT(ctx);
623   int cmd_size = sizeof(struct marshal_cmd_Color3ubv);
624   struct marshal_cmd_Color3ubv *cmd;
625   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3ubv, cmd_size);
626   memcpy(cmd->v, v, 3 * sizeof(GLubyte));
627}
628
629
630/* Color3ui: marshalled asynchronously */
631struct marshal_cmd_Color3ui
632{
633   struct marshal_cmd_base cmd_base;
634   GLuint red;
635   GLuint green;
636   GLuint blue;
637};
638uint32_t
639_mesa_unmarshal_Color3ui(struct gl_context *ctx, const struct marshal_cmd_Color3ui *cmd, const uint64_t *last)
640{
641   GLuint red = cmd->red;
642   GLuint green = cmd->green;
643   GLuint blue = cmd->blue;
644   CALL_Color3ui(ctx->CurrentServerDispatch, (red, green, blue));
645   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3ui), 8) / 8);
646   assert (cmd_size == cmd->cmd_base.cmd_size);
647   return cmd_size;
648}
649void GLAPIENTRY
650_mesa_marshal_Color3ui(GLuint red, GLuint green, GLuint blue)
651{
652   GET_CURRENT_CONTEXT(ctx);
653   int cmd_size = sizeof(struct marshal_cmd_Color3ui);
654   struct marshal_cmd_Color3ui *cmd;
655   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3ui, cmd_size);
656   cmd->red = red;
657   cmd->green = green;
658   cmd->blue = blue;
659}
660
661
662/* Color3uiv: marshalled asynchronously */
663struct marshal_cmd_Color3uiv
664{
665   struct marshal_cmd_base cmd_base;
666   GLuint v[3];
667};
668uint32_t
669_mesa_unmarshal_Color3uiv(struct gl_context *ctx, const struct marshal_cmd_Color3uiv *cmd, const uint64_t *last)
670{
671   const GLuint * v = cmd->v;
672   CALL_Color3uiv(ctx->CurrentServerDispatch, (v));
673   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3uiv), 8) / 8);
674   assert (cmd_size == cmd->cmd_base.cmd_size);
675   return cmd_size;
676}
677void GLAPIENTRY
678_mesa_marshal_Color3uiv(const GLuint * v)
679{
680   GET_CURRENT_CONTEXT(ctx);
681   int cmd_size = sizeof(struct marshal_cmd_Color3uiv);
682   struct marshal_cmd_Color3uiv *cmd;
683   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3uiv, cmd_size);
684   memcpy(cmd->v, v, 3 * sizeof(GLuint));
685}
686
687
688/* Color3us: marshalled asynchronously */
689struct marshal_cmd_Color3us
690{
691   struct marshal_cmd_base cmd_base;
692   GLushort red;
693   GLushort green;
694   GLushort blue;
695};
696uint32_t
697_mesa_unmarshal_Color3us(struct gl_context *ctx, const struct marshal_cmd_Color3us *cmd, const uint64_t *last)
698{
699   GLushort red = cmd->red;
700   GLushort green = cmd->green;
701   GLushort blue = cmd->blue;
702   CALL_Color3us(ctx->CurrentServerDispatch, (red, green, blue));
703   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3us), 8) / 8);
704   assert (cmd_size == cmd->cmd_base.cmd_size);
705   return cmd_size;
706}
707void GLAPIENTRY
708_mesa_marshal_Color3us(GLushort red, GLushort green, GLushort blue)
709{
710   GET_CURRENT_CONTEXT(ctx);
711   int cmd_size = sizeof(struct marshal_cmd_Color3us);
712   struct marshal_cmd_Color3us *cmd;
713   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3us, cmd_size);
714   cmd->red = red;
715   cmd->green = green;
716   cmd->blue = blue;
717}
718
719
720/* Color3usv: marshalled asynchronously */
721struct marshal_cmd_Color3usv
722{
723   struct marshal_cmd_base cmd_base;
724   GLushort v[3];
725};
726uint32_t
727_mesa_unmarshal_Color3usv(struct gl_context *ctx, const struct marshal_cmd_Color3usv *cmd, const uint64_t *last)
728{
729   const GLushort * v = cmd->v;
730   CALL_Color3usv(ctx->CurrentServerDispatch, (v));
731   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color3usv), 8) / 8);
732   assert (cmd_size == cmd->cmd_base.cmd_size);
733   return cmd_size;
734}
735void GLAPIENTRY
736_mesa_marshal_Color3usv(const GLushort * v)
737{
738   GET_CURRENT_CONTEXT(ctx);
739   int cmd_size = sizeof(struct marshal_cmd_Color3usv);
740   struct marshal_cmd_Color3usv *cmd;
741   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color3usv, cmd_size);
742   memcpy(cmd->v, v, 3 * sizeof(GLushort));
743}
744
745
746/* Color4b: marshalled asynchronously */
747struct marshal_cmd_Color4b
748{
749   struct marshal_cmd_base cmd_base;
750   GLbyte red;
751   GLbyte green;
752   GLbyte blue;
753   GLbyte alpha;
754};
755uint32_t
756_mesa_unmarshal_Color4b(struct gl_context *ctx, const struct marshal_cmd_Color4b *cmd, const uint64_t *last)
757{
758   GLbyte red = cmd->red;
759   GLbyte green = cmd->green;
760   GLbyte blue = cmd->blue;
761   GLbyte alpha = cmd->alpha;
762   CALL_Color4b(ctx->CurrentServerDispatch, (red, green, blue, alpha));
763   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4b), 8) / 8);
764   assert (cmd_size == cmd->cmd_base.cmd_size);
765   return cmd_size;
766}
767void GLAPIENTRY
768_mesa_marshal_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
769{
770   GET_CURRENT_CONTEXT(ctx);
771   int cmd_size = sizeof(struct marshal_cmd_Color4b);
772   struct marshal_cmd_Color4b *cmd;
773   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4b, cmd_size);
774   cmd->red = red;
775   cmd->green = green;
776   cmd->blue = blue;
777   cmd->alpha = alpha;
778}
779
780
781/* Color4bv: marshalled asynchronously */
782struct marshal_cmd_Color4bv
783{
784   struct marshal_cmd_base cmd_base;
785   GLbyte v[4];
786};
787uint32_t
788_mesa_unmarshal_Color4bv(struct gl_context *ctx, const struct marshal_cmd_Color4bv *cmd, const uint64_t *last)
789{
790   const GLbyte * v = cmd->v;
791   CALL_Color4bv(ctx->CurrentServerDispatch, (v));
792   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4bv), 8) / 8);
793   assert (cmd_size == cmd->cmd_base.cmd_size);
794   return cmd_size;
795}
796void GLAPIENTRY
797_mesa_marshal_Color4bv(const GLbyte * v)
798{
799   GET_CURRENT_CONTEXT(ctx);
800   int cmd_size = sizeof(struct marshal_cmd_Color4bv);
801   struct marshal_cmd_Color4bv *cmd;
802   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4bv, cmd_size);
803   memcpy(cmd->v, v, 4 * sizeof(GLbyte));
804}
805
806
807/* Color4d: marshalled asynchronously */
808struct marshal_cmd_Color4d
809{
810   struct marshal_cmd_base cmd_base;
811   GLdouble red;
812   GLdouble green;
813   GLdouble blue;
814   GLdouble alpha;
815};
816uint32_t
817_mesa_unmarshal_Color4d(struct gl_context *ctx, const struct marshal_cmd_Color4d *cmd, const uint64_t *last)
818{
819   GLdouble red = cmd->red;
820   GLdouble green = cmd->green;
821   GLdouble blue = cmd->blue;
822   GLdouble alpha = cmd->alpha;
823   CALL_Color4d(ctx->CurrentServerDispatch, (red, green, blue, alpha));
824   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4d), 8) / 8);
825   assert (cmd_size == cmd->cmd_base.cmd_size);
826   return cmd_size;
827}
828void GLAPIENTRY
829_mesa_marshal_Color4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
830{
831   GET_CURRENT_CONTEXT(ctx);
832   int cmd_size = sizeof(struct marshal_cmd_Color4d);
833   struct marshal_cmd_Color4d *cmd;
834   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4d, cmd_size);
835   cmd->red = red;
836   cmd->green = green;
837   cmd->blue = blue;
838   cmd->alpha = alpha;
839}
840
841
842/* Color4dv: marshalled asynchronously */
843struct marshal_cmd_Color4dv
844{
845   struct marshal_cmd_base cmd_base;
846   GLdouble v[4];
847};
848uint32_t
849_mesa_unmarshal_Color4dv(struct gl_context *ctx, const struct marshal_cmd_Color4dv *cmd, const uint64_t *last)
850{
851   const GLdouble * v = cmd->v;
852   CALL_Color4dv(ctx->CurrentServerDispatch, (v));
853   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4dv), 8) / 8);
854   assert (cmd_size == cmd->cmd_base.cmd_size);
855   return cmd_size;
856}
857void GLAPIENTRY
858_mesa_marshal_Color4dv(const GLdouble * v)
859{
860   GET_CURRENT_CONTEXT(ctx);
861   int cmd_size = sizeof(struct marshal_cmd_Color4dv);
862   struct marshal_cmd_Color4dv *cmd;
863   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4dv, cmd_size);
864   memcpy(cmd->v, v, 4 * sizeof(GLdouble));
865}
866
867
868/* Color4f: marshalled asynchronously */
869struct marshal_cmd_Color4f
870{
871   struct marshal_cmd_base cmd_base;
872   GLfloat red;
873   GLfloat green;
874   GLfloat blue;
875   GLfloat alpha;
876};
877uint32_t
878_mesa_unmarshal_Color4f(struct gl_context *ctx, const struct marshal_cmd_Color4f *cmd, const uint64_t *last)
879{
880   GLfloat red = cmd->red;
881   GLfloat green = cmd->green;
882   GLfloat blue = cmd->blue;
883   GLfloat alpha = cmd->alpha;
884   CALL_Color4f(ctx->CurrentServerDispatch, (red, green, blue, alpha));
885   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4f), 8) / 8);
886   assert (cmd_size == cmd->cmd_base.cmd_size);
887   return cmd_size;
888}
889void GLAPIENTRY
890_mesa_marshal_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
891{
892   GET_CURRENT_CONTEXT(ctx);
893   int cmd_size = sizeof(struct marshal_cmd_Color4f);
894   struct marshal_cmd_Color4f *cmd;
895   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4f, cmd_size);
896   cmd->red = red;
897   cmd->green = green;
898   cmd->blue = blue;
899   cmd->alpha = alpha;
900}
901
902
903/* Color4fv: marshalled asynchronously */
904struct marshal_cmd_Color4fv
905{
906   struct marshal_cmd_base cmd_base;
907   GLfloat v[4];
908};
909uint32_t
910_mesa_unmarshal_Color4fv(struct gl_context *ctx, const struct marshal_cmd_Color4fv *cmd, const uint64_t *last)
911{
912   const GLfloat * v = cmd->v;
913   CALL_Color4fv(ctx->CurrentServerDispatch, (v));
914   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4fv), 8) / 8);
915   assert (cmd_size == cmd->cmd_base.cmd_size);
916   return cmd_size;
917}
918void GLAPIENTRY
919_mesa_marshal_Color4fv(const GLfloat * v)
920{
921   GET_CURRENT_CONTEXT(ctx);
922   int cmd_size = sizeof(struct marshal_cmd_Color4fv);
923   struct marshal_cmd_Color4fv *cmd;
924   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4fv, cmd_size);
925   memcpy(cmd->v, v, 4 * sizeof(GLfloat));
926}
927
928
929/* Color4i: marshalled asynchronously */
930struct marshal_cmd_Color4i
931{
932   struct marshal_cmd_base cmd_base;
933   GLint red;
934   GLint green;
935   GLint blue;
936   GLint alpha;
937};
938uint32_t
939_mesa_unmarshal_Color4i(struct gl_context *ctx, const struct marshal_cmd_Color4i *cmd, const uint64_t *last)
940{
941   GLint red = cmd->red;
942   GLint green = cmd->green;
943   GLint blue = cmd->blue;
944   GLint alpha = cmd->alpha;
945   CALL_Color4i(ctx->CurrentServerDispatch, (red, green, blue, alpha));
946   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4i), 8) / 8);
947   assert (cmd_size == cmd->cmd_base.cmd_size);
948   return cmd_size;
949}
950void GLAPIENTRY
951_mesa_marshal_Color4i(GLint red, GLint green, GLint blue, GLint alpha)
952{
953   GET_CURRENT_CONTEXT(ctx);
954   int cmd_size = sizeof(struct marshal_cmd_Color4i);
955   struct marshal_cmd_Color4i *cmd;
956   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4i, cmd_size);
957   cmd->red = red;
958   cmd->green = green;
959   cmd->blue = blue;
960   cmd->alpha = alpha;
961}
962
963
964/* Color4iv: marshalled asynchronously */
965struct marshal_cmd_Color4iv
966{
967   struct marshal_cmd_base cmd_base;
968   GLint v[4];
969};
970uint32_t
971_mesa_unmarshal_Color4iv(struct gl_context *ctx, const struct marshal_cmd_Color4iv *cmd, const uint64_t *last)
972{
973   const GLint * v = cmd->v;
974   CALL_Color4iv(ctx->CurrentServerDispatch, (v));
975   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4iv), 8) / 8);
976   assert (cmd_size == cmd->cmd_base.cmd_size);
977   return cmd_size;
978}
979void GLAPIENTRY
980_mesa_marshal_Color4iv(const GLint * v)
981{
982   GET_CURRENT_CONTEXT(ctx);
983   int cmd_size = sizeof(struct marshal_cmd_Color4iv);
984   struct marshal_cmd_Color4iv *cmd;
985   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4iv, cmd_size);
986   memcpy(cmd->v, v, 4 * sizeof(GLint));
987}
988
989
990/* Color4s: marshalled asynchronously */
991struct marshal_cmd_Color4s
992{
993   struct marshal_cmd_base cmd_base;
994   GLshort red;
995   GLshort green;
996   GLshort blue;
997   GLshort alpha;
998};
999uint32_t
1000_mesa_unmarshal_Color4s(struct gl_context *ctx, const struct marshal_cmd_Color4s *cmd, const uint64_t *last)
1001{
1002   GLshort red = cmd->red;
1003   GLshort green = cmd->green;
1004   GLshort blue = cmd->blue;
1005   GLshort alpha = cmd->alpha;
1006   CALL_Color4s(ctx->CurrentServerDispatch, (red, green, blue, alpha));
1007   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4s), 8) / 8);
1008   assert (cmd_size == cmd->cmd_base.cmd_size);
1009   return cmd_size;
1010}
1011void GLAPIENTRY
1012_mesa_marshal_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
1013{
1014   GET_CURRENT_CONTEXT(ctx);
1015   int cmd_size = sizeof(struct marshal_cmd_Color4s);
1016   struct marshal_cmd_Color4s *cmd;
1017   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4s, cmd_size);
1018   cmd->red = red;
1019   cmd->green = green;
1020   cmd->blue = blue;
1021   cmd->alpha = alpha;
1022}
1023
1024
1025/* Color4sv: marshalled asynchronously */
1026struct marshal_cmd_Color4sv
1027{
1028   struct marshal_cmd_base cmd_base;
1029   GLshort v[4];
1030};
1031uint32_t
1032_mesa_unmarshal_Color4sv(struct gl_context *ctx, const struct marshal_cmd_Color4sv *cmd, const uint64_t *last)
1033{
1034   const GLshort * v = cmd->v;
1035   CALL_Color4sv(ctx->CurrentServerDispatch, (v));
1036   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4sv), 8) / 8);
1037   assert (cmd_size == cmd->cmd_base.cmd_size);
1038   return cmd_size;
1039}
1040void GLAPIENTRY
1041_mesa_marshal_Color4sv(const GLshort * v)
1042{
1043   GET_CURRENT_CONTEXT(ctx);
1044   int cmd_size = sizeof(struct marshal_cmd_Color4sv);
1045   struct marshal_cmd_Color4sv *cmd;
1046   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4sv, cmd_size);
1047   memcpy(cmd->v, v, 4 * sizeof(GLshort));
1048}
1049
1050
1051/* Color4ub: marshalled asynchronously */
1052struct marshal_cmd_Color4ub
1053{
1054   struct marshal_cmd_base cmd_base;
1055   GLubyte red;
1056   GLubyte green;
1057   GLubyte blue;
1058   GLubyte alpha;
1059};
1060uint32_t
1061_mesa_unmarshal_Color4ub(struct gl_context *ctx, const struct marshal_cmd_Color4ub *cmd, const uint64_t *last)
1062{
1063   GLubyte red = cmd->red;
1064   GLubyte green = cmd->green;
1065   GLubyte blue = cmd->blue;
1066   GLubyte alpha = cmd->alpha;
1067   CALL_Color4ub(ctx->CurrentServerDispatch, (red, green, blue, alpha));
1068   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4ub), 8) / 8);
1069   assert (cmd_size == cmd->cmd_base.cmd_size);
1070   return cmd_size;
1071}
1072void GLAPIENTRY
1073_mesa_marshal_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
1074{
1075   GET_CURRENT_CONTEXT(ctx);
1076   int cmd_size = sizeof(struct marshal_cmd_Color4ub);
1077   struct marshal_cmd_Color4ub *cmd;
1078   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4ub, cmd_size);
1079   cmd->red = red;
1080   cmd->green = green;
1081   cmd->blue = blue;
1082   cmd->alpha = alpha;
1083}
1084
1085
1086/* Color4ubv: marshalled asynchronously */
1087struct marshal_cmd_Color4ubv
1088{
1089   struct marshal_cmd_base cmd_base;
1090   GLubyte v[4];
1091};
1092uint32_t
1093_mesa_unmarshal_Color4ubv(struct gl_context *ctx, const struct marshal_cmd_Color4ubv *cmd, const uint64_t *last)
1094{
1095   const GLubyte * v = cmd->v;
1096   CALL_Color4ubv(ctx->CurrentServerDispatch, (v));
1097   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4ubv), 8) / 8);
1098   assert (cmd_size == cmd->cmd_base.cmd_size);
1099   return cmd_size;
1100}
1101void GLAPIENTRY
1102_mesa_marshal_Color4ubv(const GLubyte * v)
1103{
1104   GET_CURRENT_CONTEXT(ctx);
1105   int cmd_size = sizeof(struct marshal_cmd_Color4ubv);
1106   struct marshal_cmd_Color4ubv *cmd;
1107   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4ubv, cmd_size);
1108   memcpy(cmd->v, v, 4 * sizeof(GLubyte));
1109}
1110
1111
1112/* Color4ui: marshalled asynchronously */
1113struct marshal_cmd_Color4ui
1114{
1115   struct marshal_cmd_base cmd_base;
1116   GLuint red;
1117   GLuint green;
1118   GLuint blue;
1119   GLuint alpha;
1120};
1121uint32_t
1122_mesa_unmarshal_Color4ui(struct gl_context *ctx, const struct marshal_cmd_Color4ui *cmd, const uint64_t *last)
1123{
1124   GLuint red = cmd->red;
1125   GLuint green = cmd->green;
1126   GLuint blue = cmd->blue;
1127   GLuint alpha = cmd->alpha;
1128   CALL_Color4ui(ctx->CurrentServerDispatch, (red, green, blue, alpha));
1129   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4ui), 8) / 8);
1130   assert (cmd_size == cmd->cmd_base.cmd_size);
1131   return cmd_size;
1132}
1133void GLAPIENTRY
1134_mesa_marshal_Color4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
1135{
1136   GET_CURRENT_CONTEXT(ctx);
1137   int cmd_size = sizeof(struct marshal_cmd_Color4ui);
1138   struct marshal_cmd_Color4ui *cmd;
1139   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4ui, cmd_size);
1140   cmd->red = red;
1141   cmd->green = green;
1142   cmd->blue = blue;
1143   cmd->alpha = alpha;
1144}
1145
1146
1147/* Color4uiv: marshalled asynchronously */
1148struct marshal_cmd_Color4uiv
1149{
1150   struct marshal_cmd_base cmd_base;
1151   GLuint v[4];
1152};
1153uint32_t
1154_mesa_unmarshal_Color4uiv(struct gl_context *ctx, const struct marshal_cmd_Color4uiv *cmd, const uint64_t *last)
1155{
1156   const GLuint * v = cmd->v;
1157   CALL_Color4uiv(ctx->CurrentServerDispatch, (v));
1158   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4uiv), 8) / 8);
1159   assert (cmd_size == cmd->cmd_base.cmd_size);
1160   return cmd_size;
1161}
1162void GLAPIENTRY
1163_mesa_marshal_Color4uiv(const GLuint * v)
1164{
1165   GET_CURRENT_CONTEXT(ctx);
1166   int cmd_size = sizeof(struct marshal_cmd_Color4uiv);
1167   struct marshal_cmd_Color4uiv *cmd;
1168   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4uiv, cmd_size);
1169   memcpy(cmd->v, v, 4 * sizeof(GLuint));
1170}
1171
1172
1173/* Color4us: marshalled asynchronously */
1174struct marshal_cmd_Color4us
1175{
1176   struct marshal_cmd_base cmd_base;
1177   GLushort red;
1178   GLushort green;
1179   GLushort blue;
1180   GLushort alpha;
1181};
1182uint32_t
1183_mesa_unmarshal_Color4us(struct gl_context *ctx, const struct marshal_cmd_Color4us *cmd, const uint64_t *last)
1184{
1185   GLushort red = cmd->red;
1186   GLushort green = cmd->green;
1187   GLushort blue = cmd->blue;
1188   GLushort alpha = cmd->alpha;
1189   CALL_Color4us(ctx->CurrentServerDispatch, (red, green, blue, alpha));
1190   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4us), 8) / 8);
1191   assert (cmd_size == cmd->cmd_base.cmd_size);
1192   return cmd_size;
1193}
1194void GLAPIENTRY
1195_mesa_marshal_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
1196{
1197   GET_CURRENT_CONTEXT(ctx);
1198   int cmd_size = sizeof(struct marshal_cmd_Color4us);
1199   struct marshal_cmd_Color4us *cmd;
1200   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4us, cmd_size);
1201   cmd->red = red;
1202   cmd->green = green;
1203   cmd->blue = blue;
1204   cmd->alpha = alpha;
1205}
1206
1207
1208/* Color4usv: marshalled asynchronously */
1209struct marshal_cmd_Color4usv
1210{
1211   struct marshal_cmd_base cmd_base;
1212   GLushort v[4];
1213};
1214uint32_t
1215_mesa_unmarshal_Color4usv(struct gl_context *ctx, const struct marshal_cmd_Color4usv *cmd, const uint64_t *last)
1216{
1217   const GLushort * v = cmd->v;
1218   CALL_Color4usv(ctx->CurrentServerDispatch, (v));
1219   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Color4usv), 8) / 8);
1220   assert (cmd_size == cmd->cmd_base.cmd_size);
1221   return cmd_size;
1222}
1223void GLAPIENTRY
1224_mesa_marshal_Color4usv(const GLushort * v)
1225{
1226   GET_CURRENT_CONTEXT(ctx);
1227   int cmd_size = sizeof(struct marshal_cmd_Color4usv);
1228   struct marshal_cmd_Color4usv *cmd;
1229   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Color4usv, cmd_size);
1230   memcpy(cmd->v, v, 4 * sizeof(GLushort));
1231}
1232
1233
1234/* EdgeFlag: marshalled asynchronously */
1235struct marshal_cmd_EdgeFlag
1236{
1237   struct marshal_cmd_base cmd_base;
1238   GLboolean flag;
1239};
1240uint32_t
1241_mesa_unmarshal_EdgeFlag(struct gl_context *ctx, const struct marshal_cmd_EdgeFlag *cmd, const uint64_t *last)
1242{
1243   GLboolean flag = cmd->flag;
1244   CALL_EdgeFlag(ctx->CurrentServerDispatch, (flag));
1245   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EdgeFlag), 8) / 8);
1246   assert (cmd_size == cmd->cmd_base.cmd_size);
1247   return cmd_size;
1248}
1249void GLAPIENTRY
1250_mesa_marshal_EdgeFlag(GLboolean flag)
1251{
1252   GET_CURRENT_CONTEXT(ctx);
1253   int cmd_size = sizeof(struct marshal_cmd_EdgeFlag);
1254   struct marshal_cmd_EdgeFlag *cmd;
1255   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EdgeFlag, cmd_size);
1256   cmd->flag = flag;
1257}
1258
1259
1260/* EdgeFlagv: marshalled asynchronously */
1261struct marshal_cmd_EdgeFlagv
1262{
1263   struct marshal_cmd_base cmd_base;
1264   GLboolean flag[1];
1265};
1266uint32_t
1267_mesa_unmarshal_EdgeFlagv(struct gl_context *ctx, const struct marshal_cmd_EdgeFlagv *cmd, const uint64_t *last)
1268{
1269   const GLboolean * flag = cmd->flag;
1270   CALL_EdgeFlagv(ctx->CurrentServerDispatch, (flag));
1271   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EdgeFlagv), 8) / 8);
1272   assert (cmd_size == cmd->cmd_base.cmd_size);
1273   return cmd_size;
1274}
1275void GLAPIENTRY
1276_mesa_marshal_EdgeFlagv(const GLboolean * flag)
1277{
1278   GET_CURRENT_CONTEXT(ctx);
1279   int cmd_size = sizeof(struct marshal_cmd_EdgeFlagv);
1280   struct marshal_cmd_EdgeFlagv *cmd;
1281   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EdgeFlagv, cmd_size);
1282   memcpy(cmd->flag, flag, 1 * sizeof(GLboolean));
1283}
1284
1285
1286/* End: marshalled asynchronously */
1287struct marshal_cmd_End
1288{
1289   struct marshal_cmd_base cmd_base;
1290};
1291uint32_t
1292_mesa_unmarshal_End(struct gl_context *ctx, const struct marshal_cmd_End *cmd, const uint64_t *last)
1293{
1294   CALL_End(ctx->CurrentServerDispatch, ());
1295   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_End), 8) / 8);
1296   assert (cmd_size == cmd->cmd_base.cmd_size);
1297   return cmd_size;
1298}
1299void GLAPIENTRY
1300_mesa_marshal_End(void)
1301{
1302   GET_CURRENT_CONTEXT(ctx);
1303   int cmd_size = sizeof(struct marshal_cmd_End);
1304   struct marshal_cmd_End *cmd;
1305   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_End, cmd_size);
1306   (void) cmd;
1307}
1308
1309
1310/* Indexd: marshalled asynchronously */
1311struct marshal_cmd_Indexd
1312{
1313   struct marshal_cmd_base cmd_base;
1314   GLdouble c;
1315};
1316uint32_t
1317_mesa_unmarshal_Indexd(struct gl_context *ctx, const struct marshal_cmd_Indexd *cmd, const uint64_t *last)
1318{
1319   GLdouble c = cmd->c;
1320   CALL_Indexd(ctx->CurrentServerDispatch, (c));
1321   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Indexd), 8) / 8);
1322   assert (cmd_size == cmd->cmd_base.cmd_size);
1323   return cmd_size;
1324}
1325void GLAPIENTRY
1326_mesa_marshal_Indexd(GLdouble c)
1327{
1328   GET_CURRENT_CONTEXT(ctx);
1329   int cmd_size = sizeof(struct marshal_cmd_Indexd);
1330   struct marshal_cmd_Indexd *cmd;
1331   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Indexd, cmd_size);
1332   cmd->c = c;
1333}
1334
1335
1336/* Indexdv: marshalled asynchronously */
1337struct marshal_cmd_Indexdv
1338{
1339   struct marshal_cmd_base cmd_base;
1340   GLdouble c[1];
1341};
1342uint32_t
1343_mesa_unmarshal_Indexdv(struct gl_context *ctx, const struct marshal_cmd_Indexdv *cmd, const uint64_t *last)
1344{
1345   const GLdouble * c = cmd->c;
1346   CALL_Indexdv(ctx->CurrentServerDispatch, (c));
1347   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Indexdv), 8) / 8);
1348   assert (cmd_size == cmd->cmd_base.cmd_size);
1349   return cmd_size;
1350}
1351void GLAPIENTRY
1352_mesa_marshal_Indexdv(const GLdouble * c)
1353{
1354   GET_CURRENT_CONTEXT(ctx);
1355   int cmd_size = sizeof(struct marshal_cmd_Indexdv);
1356   struct marshal_cmd_Indexdv *cmd;
1357   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Indexdv, cmd_size);
1358   memcpy(cmd->c, c, 1 * sizeof(GLdouble));
1359}
1360
1361
1362/* Indexf: marshalled asynchronously */
1363struct marshal_cmd_Indexf
1364{
1365   struct marshal_cmd_base cmd_base;
1366   GLfloat c;
1367};
1368uint32_t
1369_mesa_unmarshal_Indexf(struct gl_context *ctx, const struct marshal_cmd_Indexf *cmd, const uint64_t *last)
1370{
1371   GLfloat c = cmd->c;
1372   CALL_Indexf(ctx->CurrentServerDispatch, (c));
1373   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Indexf), 8) / 8);
1374   assert (cmd_size == cmd->cmd_base.cmd_size);
1375   return cmd_size;
1376}
1377void GLAPIENTRY
1378_mesa_marshal_Indexf(GLfloat c)
1379{
1380   GET_CURRENT_CONTEXT(ctx);
1381   int cmd_size = sizeof(struct marshal_cmd_Indexf);
1382   struct marshal_cmd_Indexf *cmd;
1383   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Indexf, cmd_size);
1384   cmd->c = c;
1385}
1386
1387
1388/* Indexfv: marshalled asynchronously */
1389struct marshal_cmd_Indexfv
1390{
1391   struct marshal_cmd_base cmd_base;
1392   GLfloat c[1];
1393};
1394uint32_t
1395_mesa_unmarshal_Indexfv(struct gl_context *ctx, const struct marshal_cmd_Indexfv *cmd, const uint64_t *last)
1396{
1397   const GLfloat * c = cmd->c;
1398   CALL_Indexfv(ctx->CurrentServerDispatch, (c));
1399   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Indexfv), 8) / 8);
1400   assert (cmd_size == cmd->cmd_base.cmd_size);
1401   return cmd_size;
1402}
1403void GLAPIENTRY
1404_mesa_marshal_Indexfv(const GLfloat * c)
1405{
1406   GET_CURRENT_CONTEXT(ctx);
1407   int cmd_size = sizeof(struct marshal_cmd_Indexfv);
1408   struct marshal_cmd_Indexfv *cmd;
1409   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Indexfv, cmd_size);
1410   memcpy(cmd->c, c, 1 * sizeof(GLfloat));
1411}
1412
1413
1414/* Indexi: marshalled asynchronously */
1415struct marshal_cmd_Indexi
1416{
1417   struct marshal_cmd_base cmd_base;
1418   GLint c;
1419};
1420uint32_t
1421_mesa_unmarshal_Indexi(struct gl_context *ctx, const struct marshal_cmd_Indexi *cmd, const uint64_t *last)
1422{
1423   GLint c = cmd->c;
1424   CALL_Indexi(ctx->CurrentServerDispatch, (c));
1425   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Indexi), 8) / 8);
1426   assert (cmd_size == cmd->cmd_base.cmd_size);
1427   return cmd_size;
1428}
1429void GLAPIENTRY
1430_mesa_marshal_Indexi(GLint c)
1431{
1432   GET_CURRENT_CONTEXT(ctx);
1433   int cmd_size = sizeof(struct marshal_cmd_Indexi);
1434   struct marshal_cmd_Indexi *cmd;
1435   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Indexi, cmd_size);
1436   cmd->c = c;
1437}
1438
1439
1440/* Indexiv: marshalled asynchronously */
1441struct marshal_cmd_Indexiv
1442{
1443   struct marshal_cmd_base cmd_base;
1444   GLint c[1];
1445};
1446uint32_t
1447_mesa_unmarshal_Indexiv(struct gl_context *ctx, const struct marshal_cmd_Indexiv *cmd, const uint64_t *last)
1448{
1449   const GLint * c = cmd->c;
1450   CALL_Indexiv(ctx->CurrentServerDispatch, (c));
1451   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Indexiv), 8) / 8);
1452   assert (cmd_size == cmd->cmd_base.cmd_size);
1453   return cmd_size;
1454}
1455void GLAPIENTRY
1456_mesa_marshal_Indexiv(const GLint * c)
1457{
1458   GET_CURRENT_CONTEXT(ctx);
1459   int cmd_size = sizeof(struct marshal_cmd_Indexiv);
1460   struct marshal_cmd_Indexiv *cmd;
1461   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Indexiv, cmd_size);
1462   memcpy(cmd->c, c, 1 * sizeof(GLint));
1463}
1464
1465
1466/* Indexs: marshalled asynchronously */
1467struct marshal_cmd_Indexs
1468{
1469   struct marshal_cmd_base cmd_base;
1470   GLshort c;
1471};
1472uint32_t
1473_mesa_unmarshal_Indexs(struct gl_context *ctx, const struct marshal_cmd_Indexs *cmd, const uint64_t *last)
1474{
1475   GLshort c = cmd->c;
1476   CALL_Indexs(ctx->CurrentServerDispatch, (c));
1477   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Indexs), 8) / 8);
1478   assert (cmd_size == cmd->cmd_base.cmd_size);
1479   return cmd_size;
1480}
1481void GLAPIENTRY
1482_mesa_marshal_Indexs(GLshort c)
1483{
1484   GET_CURRENT_CONTEXT(ctx);
1485   int cmd_size = sizeof(struct marshal_cmd_Indexs);
1486   struct marshal_cmd_Indexs *cmd;
1487   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Indexs, cmd_size);
1488   cmd->c = c;
1489}
1490
1491
1492/* Indexsv: marshalled asynchronously */
1493struct marshal_cmd_Indexsv
1494{
1495   struct marshal_cmd_base cmd_base;
1496   GLshort c[1];
1497};
1498uint32_t
1499_mesa_unmarshal_Indexsv(struct gl_context *ctx, const struct marshal_cmd_Indexsv *cmd, const uint64_t *last)
1500{
1501   const GLshort * c = cmd->c;
1502   CALL_Indexsv(ctx->CurrentServerDispatch, (c));
1503   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Indexsv), 8) / 8);
1504   assert (cmd_size == cmd->cmd_base.cmd_size);
1505   return cmd_size;
1506}
1507void GLAPIENTRY
1508_mesa_marshal_Indexsv(const GLshort * c)
1509{
1510   GET_CURRENT_CONTEXT(ctx);
1511   int cmd_size = sizeof(struct marshal_cmd_Indexsv);
1512   struct marshal_cmd_Indexsv *cmd;
1513   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Indexsv, cmd_size);
1514   memcpy(cmd->c, c, 1 * sizeof(GLshort));
1515}
1516
1517
1518/* Normal3b: marshalled asynchronously */
1519struct marshal_cmd_Normal3b
1520{
1521   struct marshal_cmd_base cmd_base;
1522   GLbyte nx;
1523   GLbyte ny;
1524   GLbyte nz;
1525};
1526uint32_t
1527_mesa_unmarshal_Normal3b(struct gl_context *ctx, const struct marshal_cmd_Normal3b *cmd, const uint64_t *last)
1528{
1529   GLbyte nx = cmd->nx;
1530   GLbyte ny = cmd->ny;
1531   GLbyte nz = cmd->nz;
1532   CALL_Normal3b(ctx->CurrentServerDispatch, (nx, ny, nz));
1533   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3b), 8) / 8);
1534   assert (cmd_size == cmd->cmd_base.cmd_size);
1535   return cmd_size;
1536}
1537void GLAPIENTRY
1538_mesa_marshal_Normal3b(GLbyte nx, GLbyte ny, GLbyte nz)
1539{
1540   GET_CURRENT_CONTEXT(ctx);
1541   int cmd_size = sizeof(struct marshal_cmd_Normal3b);
1542   struct marshal_cmd_Normal3b *cmd;
1543   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3b, cmd_size);
1544   cmd->nx = nx;
1545   cmd->ny = ny;
1546   cmd->nz = nz;
1547}
1548
1549
1550/* Normal3bv: marshalled asynchronously */
1551struct marshal_cmd_Normal3bv
1552{
1553   struct marshal_cmd_base cmd_base;
1554   GLbyte v[3];
1555};
1556uint32_t
1557_mesa_unmarshal_Normal3bv(struct gl_context *ctx, const struct marshal_cmd_Normal3bv *cmd, const uint64_t *last)
1558{
1559   const GLbyte * v = cmd->v;
1560   CALL_Normal3bv(ctx->CurrentServerDispatch, (v));
1561   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3bv), 8) / 8);
1562   assert (cmd_size == cmd->cmd_base.cmd_size);
1563   return cmd_size;
1564}
1565void GLAPIENTRY
1566_mesa_marshal_Normal3bv(const GLbyte * v)
1567{
1568   GET_CURRENT_CONTEXT(ctx);
1569   int cmd_size = sizeof(struct marshal_cmd_Normal3bv);
1570   struct marshal_cmd_Normal3bv *cmd;
1571   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3bv, cmd_size);
1572   memcpy(cmd->v, v, 3 * sizeof(GLbyte));
1573}
1574
1575
1576/* Normal3d: marshalled asynchronously */
1577struct marshal_cmd_Normal3d
1578{
1579   struct marshal_cmd_base cmd_base;
1580   GLdouble nx;
1581   GLdouble ny;
1582   GLdouble nz;
1583};
1584uint32_t
1585_mesa_unmarshal_Normal3d(struct gl_context *ctx, const struct marshal_cmd_Normal3d *cmd, const uint64_t *last)
1586{
1587   GLdouble nx = cmd->nx;
1588   GLdouble ny = cmd->ny;
1589   GLdouble nz = cmd->nz;
1590   CALL_Normal3d(ctx->CurrentServerDispatch, (nx, ny, nz));
1591   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3d), 8) / 8);
1592   assert (cmd_size == cmd->cmd_base.cmd_size);
1593   return cmd_size;
1594}
1595void GLAPIENTRY
1596_mesa_marshal_Normal3d(GLdouble nx, GLdouble ny, GLdouble nz)
1597{
1598   GET_CURRENT_CONTEXT(ctx);
1599   int cmd_size = sizeof(struct marshal_cmd_Normal3d);
1600   struct marshal_cmd_Normal3d *cmd;
1601   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3d, cmd_size);
1602   cmd->nx = nx;
1603   cmd->ny = ny;
1604   cmd->nz = nz;
1605}
1606
1607
1608/* Normal3dv: marshalled asynchronously */
1609struct marshal_cmd_Normal3dv
1610{
1611   struct marshal_cmd_base cmd_base;
1612   GLdouble v[3];
1613};
1614uint32_t
1615_mesa_unmarshal_Normal3dv(struct gl_context *ctx, const struct marshal_cmd_Normal3dv *cmd, const uint64_t *last)
1616{
1617   const GLdouble * v = cmd->v;
1618   CALL_Normal3dv(ctx->CurrentServerDispatch, (v));
1619   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3dv), 8) / 8);
1620   assert (cmd_size == cmd->cmd_base.cmd_size);
1621   return cmd_size;
1622}
1623void GLAPIENTRY
1624_mesa_marshal_Normal3dv(const GLdouble * v)
1625{
1626   GET_CURRENT_CONTEXT(ctx);
1627   int cmd_size = sizeof(struct marshal_cmd_Normal3dv);
1628   struct marshal_cmd_Normal3dv *cmd;
1629   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3dv, cmd_size);
1630   memcpy(cmd->v, v, 3 * sizeof(GLdouble));
1631}
1632
1633
1634/* Normal3f: marshalled asynchronously */
1635struct marshal_cmd_Normal3f
1636{
1637   struct marshal_cmd_base cmd_base;
1638   GLfloat nx;
1639   GLfloat ny;
1640   GLfloat nz;
1641};
1642uint32_t
1643_mesa_unmarshal_Normal3f(struct gl_context *ctx, const struct marshal_cmd_Normal3f *cmd, const uint64_t *last)
1644{
1645   GLfloat nx = cmd->nx;
1646   GLfloat ny = cmd->ny;
1647   GLfloat nz = cmd->nz;
1648   CALL_Normal3f(ctx->CurrentServerDispatch, (nx, ny, nz));
1649   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3f), 8) / 8);
1650   assert (cmd_size == cmd->cmd_base.cmd_size);
1651   return cmd_size;
1652}
1653void GLAPIENTRY
1654_mesa_marshal_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1655{
1656   GET_CURRENT_CONTEXT(ctx);
1657   int cmd_size = sizeof(struct marshal_cmd_Normal3f);
1658   struct marshal_cmd_Normal3f *cmd;
1659   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3f, cmd_size);
1660   cmd->nx = nx;
1661   cmd->ny = ny;
1662   cmd->nz = nz;
1663}
1664
1665
1666/* Normal3fv: marshalled asynchronously */
1667struct marshal_cmd_Normal3fv
1668{
1669   struct marshal_cmd_base cmd_base;
1670   GLfloat v[3];
1671};
1672uint32_t
1673_mesa_unmarshal_Normal3fv(struct gl_context *ctx, const struct marshal_cmd_Normal3fv *cmd, const uint64_t *last)
1674{
1675   const GLfloat * v = cmd->v;
1676   CALL_Normal3fv(ctx->CurrentServerDispatch, (v));
1677   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3fv), 8) / 8);
1678   assert (cmd_size == cmd->cmd_base.cmd_size);
1679   return cmd_size;
1680}
1681void GLAPIENTRY
1682_mesa_marshal_Normal3fv(const GLfloat * v)
1683{
1684   GET_CURRENT_CONTEXT(ctx);
1685   int cmd_size = sizeof(struct marshal_cmd_Normal3fv);
1686   struct marshal_cmd_Normal3fv *cmd;
1687   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3fv, cmd_size);
1688   memcpy(cmd->v, v, 3 * sizeof(GLfloat));
1689}
1690
1691
1692/* Normal3i: marshalled asynchronously */
1693struct marshal_cmd_Normal3i
1694{
1695   struct marshal_cmd_base cmd_base;
1696   GLint nx;
1697   GLint ny;
1698   GLint nz;
1699};
1700uint32_t
1701_mesa_unmarshal_Normal3i(struct gl_context *ctx, const struct marshal_cmd_Normal3i *cmd, const uint64_t *last)
1702{
1703   GLint nx = cmd->nx;
1704   GLint ny = cmd->ny;
1705   GLint nz = cmd->nz;
1706   CALL_Normal3i(ctx->CurrentServerDispatch, (nx, ny, nz));
1707   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3i), 8) / 8);
1708   assert (cmd_size == cmd->cmd_base.cmd_size);
1709   return cmd_size;
1710}
1711void GLAPIENTRY
1712_mesa_marshal_Normal3i(GLint nx, GLint ny, GLint nz)
1713{
1714   GET_CURRENT_CONTEXT(ctx);
1715   int cmd_size = sizeof(struct marshal_cmd_Normal3i);
1716   struct marshal_cmd_Normal3i *cmd;
1717   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3i, cmd_size);
1718   cmd->nx = nx;
1719   cmd->ny = ny;
1720   cmd->nz = nz;
1721}
1722
1723
1724/* Normal3iv: marshalled asynchronously */
1725struct marshal_cmd_Normal3iv
1726{
1727   struct marshal_cmd_base cmd_base;
1728   GLint v[3];
1729};
1730uint32_t
1731_mesa_unmarshal_Normal3iv(struct gl_context *ctx, const struct marshal_cmd_Normal3iv *cmd, const uint64_t *last)
1732{
1733   const GLint * v = cmd->v;
1734   CALL_Normal3iv(ctx->CurrentServerDispatch, (v));
1735   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3iv), 8) / 8);
1736   assert (cmd_size == cmd->cmd_base.cmd_size);
1737   return cmd_size;
1738}
1739void GLAPIENTRY
1740_mesa_marshal_Normal3iv(const GLint * v)
1741{
1742   GET_CURRENT_CONTEXT(ctx);
1743   int cmd_size = sizeof(struct marshal_cmd_Normal3iv);
1744   struct marshal_cmd_Normal3iv *cmd;
1745   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3iv, cmd_size);
1746   memcpy(cmd->v, v, 3 * sizeof(GLint));
1747}
1748
1749
1750/* Normal3s: marshalled asynchronously */
1751struct marshal_cmd_Normal3s
1752{
1753   struct marshal_cmd_base cmd_base;
1754   GLshort nx;
1755   GLshort ny;
1756   GLshort nz;
1757};
1758uint32_t
1759_mesa_unmarshal_Normal3s(struct gl_context *ctx, const struct marshal_cmd_Normal3s *cmd, const uint64_t *last)
1760{
1761   GLshort nx = cmd->nx;
1762   GLshort ny = cmd->ny;
1763   GLshort nz = cmd->nz;
1764   CALL_Normal3s(ctx->CurrentServerDispatch, (nx, ny, nz));
1765   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3s), 8) / 8);
1766   assert (cmd_size == cmd->cmd_base.cmd_size);
1767   return cmd_size;
1768}
1769void GLAPIENTRY
1770_mesa_marshal_Normal3s(GLshort nx, GLshort ny, GLshort nz)
1771{
1772   GET_CURRENT_CONTEXT(ctx);
1773   int cmd_size = sizeof(struct marshal_cmd_Normal3s);
1774   struct marshal_cmd_Normal3s *cmd;
1775   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3s, cmd_size);
1776   cmd->nx = nx;
1777   cmd->ny = ny;
1778   cmd->nz = nz;
1779}
1780
1781
1782/* Normal3sv: marshalled asynchronously */
1783struct marshal_cmd_Normal3sv
1784{
1785   struct marshal_cmd_base cmd_base;
1786   GLshort v[3];
1787};
1788uint32_t
1789_mesa_unmarshal_Normal3sv(struct gl_context *ctx, const struct marshal_cmd_Normal3sv *cmd, const uint64_t *last)
1790{
1791   const GLshort * v = cmd->v;
1792   CALL_Normal3sv(ctx->CurrentServerDispatch, (v));
1793   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Normal3sv), 8) / 8);
1794   assert (cmd_size == cmd->cmd_base.cmd_size);
1795   return cmd_size;
1796}
1797void GLAPIENTRY
1798_mesa_marshal_Normal3sv(const GLshort * v)
1799{
1800   GET_CURRENT_CONTEXT(ctx);
1801   int cmd_size = sizeof(struct marshal_cmd_Normal3sv);
1802   struct marshal_cmd_Normal3sv *cmd;
1803   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Normal3sv, cmd_size);
1804   memcpy(cmd->v, v, 3 * sizeof(GLshort));
1805}
1806
1807
1808/* RasterPos2d: marshalled asynchronously */
1809struct marshal_cmd_RasterPos2d
1810{
1811   struct marshal_cmd_base cmd_base;
1812   GLdouble x;
1813   GLdouble y;
1814};
1815uint32_t
1816_mesa_unmarshal_RasterPos2d(struct gl_context *ctx, const struct marshal_cmd_RasterPos2d *cmd, const uint64_t *last)
1817{
1818   GLdouble x = cmd->x;
1819   GLdouble y = cmd->y;
1820   CALL_RasterPos2d(ctx->CurrentServerDispatch, (x, y));
1821   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos2d), 8) / 8);
1822   assert (cmd_size == cmd->cmd_base.cmd_size);
1823   return cmd_size;
1824}
1825void GLAPIENTRY
1826_mesa_marshal_RasterPos2d(GLdouble x, GLdouble y)
1827{
1828   GET_CURRENT_CONTEXT(ctx);
1829   int cmd_size = sizeof(struct marshal_cmd_RasterPos2d);
1830   struct marshal_cmd_RasterPos2d *cmd;
1831   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos2d, cmd_size);
1832   cmd->x = x;
1833   cmd->y = y;
1834}
1835
1836
1837/* RasterPos2dv: marshalled asynchronously */
1838struct marshal_cmd_RasterPos2dv
1839{
1840   struct marshal_cmd_base cmd_base;
1841   GLdouble v[2];
1842};
1843uint32_t
1844_mesa_unmarshal_RasterPos2dv(struct gl_context *ctx, const struct marshal_cmd_RasterPos2dv *cmd, const uint64_t *last)
1845{
1846   const GLdouble * v = cmd->v;
1847   CALL_RasterPos2dv(ctx->CurrentServerDispatch, (v));
1848   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos2dv), 8) / 8);
1849   assert (cmd_size == cmd->cmd_base.cmd_size);
1850   return cmd_size;
1851}
1852void GLAPIENTRY
1853_mesa_marshal_RasterPos2dv(const GLdouble * v)
1854{
1855   GET_CURRENT_CONTEXT(ctx);
1856   int cmd_size = sizeof(struct marshal_cmd_RasterPos2dv);
1857   struct marshal_cmd_RasterPos2dv *cmd;
1858   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos2dv, cmd_size);
1859   memcpy(cmd->v, v, 2 * sizeof(GLdouble));
1860}
1861
1862
1863/* RasterPos2f: marshalled asynchronously */
1864struct marshal_cmd_RasterPos2f
1865{
1866   struct marshal_cmd_base cmd_base;
1867   GLfloat x;
1868   GLfloat y;
1869};
1870uint32_t
1871_mesa_unmarshal_RasterPos2f(struct gl_context *ctx, const struct marshal_cmd_RasterPos2f *cmd, const uint64_t *last)
1872{
1873   GLfloat x = cmd->x;
1874   GLfloat y = cmd->y;
1875   CALL_RasterPos2f(ctx->CurrentServerDispatch, (x, y));
1876   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos2f), 8) / 8);
1877   assert (cmd_size == cmd->cmd_base.cmd_size);
1878   return cmd_size;
1879}
1880void GLAPIENTRY
1881_mesa_marshal_RasterPos2f(GLfloat x, GLfloat y)
1882{
1883   GET_CURRENT_CONTEXT(ctx);
1884   int cmd_size = sizeof(struct marshal_cmd_RasterPos2f);
1885   struct marshal_cmd_RasterPos2f *cmd;
1886   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos2f, cmd_size);
1887   cmd->x = x;
1888   cmd->y = y;
1889}
1890
1891
1892/* RasterPos2fv: marshalled asynchronously */
1893struct marshal_cmd_RasterPos2fv
1894{
1895   struct marshal_cmd_base cmd_base;
1896   GLfloat v[2];
1897};
1898uint32_t
1899_mesa_unmarshal_RasterPos2fv(struct gl_context *ctx, const struct marshal_cmd_RasterPos2fv *cmd, const uint64_t *last)
1900{
1901   const GLfloat * v = cmd->v;
1902   CALL_RasterPos2fv(ctx->CurrentServerDispatch, (v));
1903   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos2fv), 8) / 8);
1904   assert (cmd_size == cmd->cmd_base.cmd_size);
1905   return cmd_size;
1906}
1907void GLAPIENTRY
1908_mesa_marshal_RasterPos2fv(const GLfloat * v)
1909{
1910   GET_CURRENT_CONTEXT(ctx);
1911   int cmd_size = sizeof(struct marshal_cmd_RasterPos2fv);
1912   struct marshal_cmd_RasterPos2fv *cmd;
1913   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos2fv, cmd_size);
1914   memcpy(cmd->v, v, 2 * sizeof(GLfloat));
1915}
1916
1917
1918/* RasterPos2i: marshalled asynchronously */
1919struct marshal_cmd_RasterPos2i
1920{
1921   struct marshal_cmd_base cmd_base;
1922   GLint x;
1923   GLint y;
1924};
1925uint32_t
1926_mesa_unmarshal_RasterPos2i(struct gl_context *ctx, const struct marshal_cmd_RasterPos2i *cmd, const uint64_t *last)
1927{
1928   GLint x = cmd->x;
1929   GLint y = cmd->y;
1930   CALL_RasterPos2i(ctx->CurrentServerDispatch, (x, y));
1931   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos2i), 8) / 8);
1932   assert (cmd_size == cmd->cmd_base.cmd_size);
1933   return cmd_size;
1934}
1935void GLAPIENTRY
1936_mesa_marshal_RasterPos2i(GLint x, GLint y)
1937{
1938   GET_CURRENT_CONTEXT(ctx);
1939   int cmd_size = sizeof(struct marshal_cmd_RasterPos2i);
1940   struct marshal_cmd_RasterPos2i *cmd;
1941   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos2i, cmd_size);
1942   cmd->x = x;
1943   cmd->y = y;
1944}
1945
1946
1947/* RasterPos2iv: marshalled asynchronously */
1948struct marshal_cmd_RasterPos2iv
1949{
1950   struct marshal_cmd_base cmd_base;
1951   GLint v[2];
1952};
1953uint32_t
1954_mesa_unmarshal_RasterPos2iv(struct gl_context *ctx, const struct marshal_cmd_RasterPos2iv *cmd, const uint64_t *last)
1955{
1956   const GLint * v = cmd->v;
1957   CALL_RasterPos2iv(ctx->CurrentServerDispatch, (v));
1958   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos2iv), 8) / 8);
1959   assert (cmd_size == cmd->cmd_base.cmd_size);
1960   return cmd_size;
1961}
1962void GLAPIENTRY
1963_mesa_marshal_RasterPos2iv(const GLint * v)
1964{
1965   GET_CURRENT_CONTEXT(ctx);
1966   int cmd_size = sizeof(struct marshal_cmd_RasterPos2iv);
1967   struct marshal_cmd_RasterPos2iv *cmd;
1968   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos2iv, cmd_size);
1969   memcpy(cmd->v, v, 2 * sizeof(GLint));
1970}
1971
1972
1973/* RasterPos2s: marshalled asynchronously */
1974struct marshal_cmd_RasterPos2s
1975{
1976   struct marshal_cmd_base cmd_base;
1977   GLshort x;
1978   GLshort y;
1979};
1980uint32_t
1981_mesa_unmarshal_RasterPos2s(struct gl_context *ctx, const struct marshal_cmd_RasterPos2s *cmd, const uint64_t *last)
1982{
1983   GLshort x = cmd->x;
1984   GLshort y = cmd->y;
1985   CALL_RasterPos2s(ctx->CurrentServerDispatch, (x, y));
1986   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos2s), 8) / 8);
1987   assert (cmd_size == cmd->cmd_base.cmd_size);
1988   return cmd_size;
1989}
1990void GLAPIENTRY
1991_mesa_marshal_RasterPos2s(GLshort x, GLshort y)
1992{
1993   GET_CURRENT_CONTEXT(ctx);
1994   int cmd_size = sizeof(struct marshal_cmd_RasterPos2s);
1995   struct marshal_cmd_RasterPos2s *cmd;
1996   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos2s, cmd_size);
1997   cmd->x = x;
1998   cmd->y = y;
1999}
2000
2001
2002/* RasterPos2sv: marshalled asynchronously */
2003struct marshal_cmd_RasterPos2sv
2004{
2005   struct marshal_cmd_base cmd_base;
2006   GLshort v[2];
2007};
2008uint32_t
2009_mesa_unmarshal_RasterPos2sv(struct gl_context *ctx, const struct marshal_cmd_RasterPos2sv *cmd, const uint64_t *last)
2010{
2011   const GLshort * v = cmd->v;
2012   CALL_RasterPos2sv(ctx->CurrentServerDispatch, (v));
2013   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos2sv), 8) / 8);
2014   assert (cmd_size == cmd->cmd_base.cmd_size);
2015   return cmd_size;
2016}
2017void GLAPIENTRY
2018_mesa_marshal_RasterPos2sv(const GLshort * v)
2019{
2020   GET_CURRENT_CONTEXT(ctx);
2021   int cmd_size = sizeof(struct marshal_cmd_RasterPos2sv);
2022   struct marshal_cmd_RasterPos2sv *cmd;
2023   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos2sv, cmd_size);
2024   memcpy(cmd->v, v, 2 * sizeof(GLshort));
2025}
2026
2027
2028/* RasterPos3d: marshalled asynchronously */
2029struct marshal_cmd_RasterPos3d
2030{
2031   struct marshal_cmd_base cmd_base;
2032   GLdouble x;
2033   GLdouble y;
2034   GLdouble z;
2035};
2036uint32_t
2037_mesa_unmarshal_RasterPos3d(struct gl_context *ctx, const struct marshal_cmd_RasterPos3d *cmd, const uint64_t *last)
2038{
2039   GLdouble x = cmd->x;
2040   GLdouble y = cmd->y;
2041   GLdouble z = cmd->z;
2042   CALL_RasterPos3d(ctx->CurrentServerDispatch, (x, y, z));
2043   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos3d), 8) / 8);
2044   assert (cmd_size == cmd->cmd_base.cmd_size);
2045   return cmd_size;
2046}
2047void GLAPIENTRY
2048_mesa_marshal_RasterPos3d(GLdouble x, GLdouble y, GLdouble z)
2049{
2050   GET_CURRENT_CONTEXT(ctx);
2051   int cmd_size = sizeof(struct marshal_cmd_RasterPos3d);
2052   struct marshal_cmd_RasterPos3d *cmd;
2053   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos3d, cmd_size);
2054   cmd->x = x;
2055   cmd->y = y;
2056   cmd->z = z;
2057}
2058
2059
2060/* RasterPos3dv: marshalled asynchronously */
2061struct marshal_cmd_RasterPos3dv
2062{
2063   struct marshal_cmd_base cmd_base;
2064   GLdouble v[3];
2065};
2066uint32_t
2067_mesa_unmarshal_RasterPos3dv(struct gl_context *ctx, const struct marshal_cmd_RasterPos3dv *cmd, const uint64_t *last)
2068{
2069   const GLdouble * v = cmd->v;
2070   CALL_RasterPos3dv(ctx->CurrentServerDispatch, (v));
2071   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos3dv), 8) / 8);
2072   assert (cmd_size == cmd->cmd_base.cmd_size);
2073   return cmd_size;
2074}
2075void GLAPIENTRY
2076_mesa_marshal_RasterPos3dv(const GLdouble * v)
2077{
2078   GET_CURRENT_CONTEXT(ctx);
2079   int cmd_size = sizeof(struct marshal_cmd_RasterPos3dv);
2080   struct marshal_cmd_RasterPos3dv *cmd;
2081   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos3dv, cmd_size);
2082   memcpy(cmd->v, v, 3 * sizeof(GLdouble));
2083}
2084
2085
2086/* RasterPos3f: marshalled asynchronously */
2087struct marshal_cmd_RasterPos3f
2088{
2089   struct marshal_cmd_base cmd_base;
2090   GLfloat x;
2091   GLfloat y;
2092   GLfloat z;
2093};
2094uint32_t
2095_mesa_unmarshal_RasterPos3f(struct gl_context *ctx, const struct marshal_cmd_RasterPos3f *cmd, const uint64_t *last)
2096{
2097   GLfloat x = cmd->x;
2098   GLfloat y = cmd->y;
2099   GLfloat z = cmd->z;
2100   CALL_RasterPos3f(ctx->CurrentServerDispatch, (x, y, z));
2101   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos3f), 8) / 8);
2102   assert (cmd_size == cmd->cmd_base.cmd_size);
2103   return cmd_size;
2104}
2105void GLAPIENTRY
2106_mesa_marshal_RasterPos3f(GLfloat x, GLfloat y, GLfloat z)
2107{
2108   GET_CURRENT_CONTEXT(ctx);
2109   int cmd_size = sizeof(struct marshal_cmd_RasterPos3f);
2110   struct marshal_cmd_RasterPos3f *cmd;
2111   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos3f, cmd_size);
2112   cmd->x = x;
2113   cmd->y = y;
2114   cmd->z = z;
2115}
2116
2117
2118/* RasterPos3fv: marshalled asynchronously */
2119struct marshal_cmd_RasterPos3fv
2120{
2121   struct marshal_cmd_base cmd_base;
2122   GLfloat v[3];
2123};
2124uint32_t
2125_mesa_unmarshal_RasterPos3fv(struct gl_context *ctx, const struct marshal_cmd_RasterPos3fv *cmd, const uint64_t *last)
2126{
2127   const GLfloat * v = cmd->v;
2128   CALL_RasterPos3fv(ctx->CurrentServerDispatch, (v));
2129   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos3fv), 8) / 8);
2130   assert (cmd_size == cmd->cmd_base.cmd_size);
2131   return cmd_size;
2132}
2133void GLAPIENTRY
2134_mesa_marshal_RasterPos3fv(const GLfloat * v)
2135{
2136   GET_CURRENT_CONTEXT(ctx);
2137   int cmd_size = sizeof(struct marshal_cmd_RasterPos3fv);
2138   struct marshal_cmd_RasterPos3fv *cmd;
2139   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos3fv, cmd_size);
2140   memcpy(cmd->v, v, 3 * sizeof(GLfloat));
2141}
2142
2143
2144/* RasterPos3i: marshalled asynchronously */
2145struct marshal_cmd_RasterPos3i
2146{
2147   struct marshal_cmd_base cmd_base;
2148   GLint x;
2149   GLint y;
2150   GLint z;
2151};
2152uint32_t
2153_mesa_unmarshal_RasterPos3i(struct gl_context *ctx, const struct marshal_cmd_RasterPos3i *cmd, const uint64_t *last)
2154{
2155   GLint x = cmd->x;
2156   GLint y = cmd->y;
2157   GLint z = cmd->z;
2158   CALL_RasterPos3i(ctx->CurrentServerDispatch, (x, y, z));
2159   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos3i), 8) / 8);
2160   assert (cmd_size == cmd->cmd_base.cmd_size);
2161   return cmd_size;
2162}
2163void GLAPIENTRY
2164_mesa_marshal_RasterPos3i(GLint x, GLint y, GLint z)
2165{
2166   GET_CURRENT_CONTEXT(ctx);
2167   int cmd_size = sizeof(struct marshal_cmd_RasterPos3i);
2168   struct marshal_cmd_RasterPos3i *cmd;
2169   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos3i, cmd_size);
2170   cmd->x = x;
2171   cmd->y = y;
2172   cmd->z = z;
2173}
2174
2175
2176/* RasterPos3iv: marshalled asynchronously */
2177struct marshal_cmd_RasterPos3iv
2178{
2179   struct marshal_cmd_base cmd_base;
2180   GLint v[3];
2181};
2182uint32_t
2183_mesa_unmarshal_RasterPos3iv(struct gl_context *ctx, const struct marshal_cmd_RasterPos3iv *cmd, const uint64_t *last)
2184{
2185   const GLint * v = cmd->v;
2186   CALL_RasterPos3iv(ctx->CurrentServerDispatch, (v));
2187   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos3iv), 8) / 8);
2188   assert (cmd_size == cmd->cmd_base.cmd_size);
2189   return cmd_size;
2190}
2191void GLAPIENTRY
2192_mesa_marshal_RasterPos3iv(const GLint * v)
2193{
2194   GET_CURRENT_CONTEXT(ctx);
2195   int cmd_size = sizeof(struct marshal_cmd_RasterPos3iv);
2196   struct marshal_cmd_RasterPos3iv *cmd;
2197   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos3iv, cmd_size);
2198   memcpy(cmd->v, v, 3 * sizeof(GLint));
2199}
2200
2201
2202/* RasterPos3s: marshalled asynchronously */
2203struct marshal_cmd_RasterPos3s
2204{
2205   struct marshal_cmd_base cmd_base;
2206   GLshort x;
2207   GLshort y;
2208   GLshort z;
2209};
2210uint32_t
2211_mesa_unmarshal_RasterPos3s(struct gl_context *ctx, const struct marshal_cmd_RasterPos3s *cmd, const uint64_t *last)
2212{
2213   GLshort x = cmd->x;
2214   GLshort y = cmd->y;
2215   GLshort z = cmd->z;
2216   CALL_RasterPos3s(ctx->CurrentServerDispatch, (x, y, z));
2217   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos3s), 8) / 8);
2218   assert (cmd_size == cmd->cmd_base.cmd_size);
2219   return cmd_size;
2220}
2221void GLAPIENTRY
2222_mesa_marshal_RasterPos3s(GLshort x, GLshort y, GLshort z)
2223{
2224   GET_CURRENT_CONTEXT(ctx);
2225   int cmd_size = sizeof(struct marshal_cmd_RasterPos3s);
2226   struct marshal_cmd_RasterPos3s *cmd;
2227   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos3s, cmd_size);
2228   cmd->x = x;
2229   cmd->y = y;
2230   cmd->z = z;
2231}
2232
2233
2234/* RasterPos3sv: marshalled asynchronously */
2235struct marshal_cmd_RasterPos3sv
2236{
2237   struct marshal_cmd_base cmd_base;
2238   GLshort v[3];
2239};
2240uint32_t
2241_mesa_unmarshal_RasterPos3sv(struct gl_context *ctx, const struct marshal_cmd_RasterPos3sv *cmd, const uint64_t *last)
2242{
2243   const GLshort * v = cmd->v;
2244   CALL_RasterPos3sv(ctx->CurrentServerDispatch, (v));
2245   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos3sv), 8) / 8);
2246   assert (cmd_size == cmd->cmd_base.cmd_size);
2247   return cmd_size;
2248}
2249void GLAPIENTRY
2250_mesa_marshal_RasterPos3sv(const GLshort * v)
2251{
2252   GET_CURRENT_CONTEXT(ctx);
2253   int cmd_size = sizeof(struct marshal_cmd_RasterPos3sv);
2254   struct marshal_cmd_RasterPos3sv *cmd;
2255   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos3sv, cmd_size);
2256   memcpy(cmd->v, v, 3 * sizeof(GLshort));
2257}
2258
2259
2260/* RasterPos4d: marshalled asynchronously */
2261struct marshal_cmd_RasterPos4d
2262{
2263   struct marshal_cmd_base cmd_base;
2264   GLdouble x;
2265   GLdouble y;
2266   GLdouble z;
2267   GLdouble w;
2268};
2269uint32_t
2270_mesa_unmarshal_RasterPos4d(struct gl_context *ctx, const struct marshal_cmd_RasterPos4d *cmd, const uint64_t *last)
2271{
2272   GLdouble x = cmd->x;
2273   GLdouble y = cmd->y;
2274   GLdouble z = cmd->z;
2275   GLdouble w = cmd->w;
2276   CALL_RasterPos4d(ctx->CurrentServerDispatch, (x, y, z, w));
2277   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos4d), 8) / 8);
2278   assert (cmd_size == cmd->cmd_base.cmd_size);
2279   return cmd_size;
2280}
2281void GLAPIENTRY
2282_mesa_marshal_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
2283{
2284   GET_CURRENT_CONTEXT(ctx);
2285   int cmd_size = sizeof(struct marshal_cmd_RasterPos4d);
2286   struct marshal_cmd_RasterPos4d *cmd;
2287   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos4d, cmd_size);
2288   cmd->x = x;
2289   cmd->y = y;
2290   cmd->z = z;
2291   cmd->w = w;
2292}
2293
2294
2295/* RasterPos4dv: marshalled asynchronously */
2296struct marshal_cmd_RasterPos4dv
2297{
2298   struct marshal_cmd_base cmd_base;
2299   GLdouble v[4];
2300};
2301uint32_t
2302_mesa_unmarshal_RasterPos4dv(struct gl_context *ctx, const struct marshal_cmd_RasterPos4dv *cmd, const uint64_t *last)
2303{
2304   const GLdouble * v = cmd->v;
2305   CALL_RasterPos4dv(ctx->CurrentServerDispatch, (v));
2306   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos4dv), 8) / 8);
2307   assert (cmd_size == cmd->cmd_base.cmd_size);
2308   return cmd_size;
2309}
2310void GLAPIENTRY
2311_mesa_marshal_RasterPos4dv(const GLdouble * v)
2312{
2313   GET_CURRENT_CONTEXT(ctx);
2314   int cmd_size = sizeof(struct marshal_cmd_RasterPos4dv);
2315   struct marshal_cmd_RasterPos4dv *cmd;
2316   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos4dv, cmd_size);
2317   memcpy(cmd->v, v, 4 * sizeof(GLdouble));
2318}
2319
2320
2321/* RasterPos4f: marshalled asynchronously */
2322struct marshal_cmd_RasterPos4f
2323{
2324   struct marshal_cmd_base cmd_base;
2325   GLfloat x;
2326   GLfloat y;
2327   GLfloat z;
2328   GLfloat w;
2329};
2330uint32_t
2331_mesa_unmarshal_RasterPos4f(struct gl_context *ctx, const struct marshal_cmd_RasterPos4f *cmd, const uint64_t *last)
2332{
2333   GLfloat x = cmd->x;
2334   GLfloat y = cmd->y;
2335   GLfloat z = cmd->z;
2336   GLfloat w = cmd->w;
2337   CALL_RasterPos4f(ctx->CurrentServerDispatch, (x, y, z, w));
2338   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos4f), 8) / 8);
2339   assert (cmd_size == cmd->cmd_base.cmd_size);
2340   return cmd_size;
2341}
2342void GLAPIENTRY
2343_mesa_marshal_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
2344{
2345   GET_CURRENT_CONTEXT(ctx);
2346   int cmd_size = sizeof(struct marshal_cmd_RasterPos4f);
2347   struct marshal_cmd_RasterPos4f *cmd;
2348   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos4f, cmd_size);
2349   cmd->x = x;
2350   cmd->y = y;
2351   cmd->z = z;
2352   cmd->w = w;
2353}
2354
2355
2356/* RasterPos4fv: marshalled asynchronously */
2357struct marshal_cmd_RasterPos4fv
2358{
2359   struct marshal_cmd_base cmd_base;
2360   GLfloat v[4];
2361};
2362uint32_t
2363_mesa_unmarshal_RasterPos4fv(struct gl_context *ctx, const struct marshal_cmd_RasterPos4fv *cmd, const uint64_t *last)
2364{
2365   const GLfloat * v = cmd->v;
2366   CALL_RasterPos4fv(ctx->CurrentServerDispatch, (v));
2367   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos4fv), 8) / 8);
2368   assert (cmd_size == cmd->cmd_base.cmd_size);
2369   return cmd_size;
2370}
2371void GLAPIENTRY
2372_mesa_marshal_RasterPos4fv(const GLfloat * v)
2373{
2374   GET_CURRENT_CONTEXT(ctx);
2375   int cmd_size = sizeof(struct marshal_cmd_RasterPos4fv);
2376   struct marshal_cmd_RasterPos4fv *cmd;
2377   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos4fv, cmd_size);
2378   memcpy(cmd->v, v, 4 * sizeof(GLfloat));
2379}
2380
2381
2382/* RasterPos4i: marshalled asynchronously */
2383struct marshal_cmd_RasterPos4i
2384{
2385   struct marshal_cmd_base cmd_base;
2386   GLint x;
2387   GLint y;
2388   GLint z;
2389   GLint w;
2390};
2391uint32_t
2392_mesa_unmarshal_RasterPos4i(struct gl_context *ctx, const struct marshal_cmd_RasterPos4i *cmd, const uint64_t *last)
2393{
2394   GLint x = cmd->x;
2395   GLint y = cmd->y;
2396   GLint z = cmd->z;
2397   GLint w = cmd->w;
2398   CALL_RasterPos4i(ctx->CurrentServerDispatch, (x, y, z, w));
2399   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos4i), 8) / 8);
2400   assert (cmd_size == cmd->cmd_base.cmd_size);
2401   return cmd_size;
2402}
2403void GLAPIENTRY
2404_mesa_marshal_RasterPos4i(GLint x, GLint y, GLint z, GLint w)
2405{
2406   GET_CURRENT_CONTEXT(ctx);
2407   int cmd_size = sizeof(struct marshal_cmd_RasterPos4i);
2408   struct marshal_cmd_RasterPos4i *cmd;
2409   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos4i, cmd_size);
2410   cmd->x = x;
2411   cmd->y = y;
2412   cmd->z = z;
2413   cmd->w = w;
2414}
2415
2416
2417/* RasterPos4iv: marshalled asynchronously */
2418struct marshal_cmd_RasterPos4iv
2419{
2420   struct marshal_cmd_base cmd_base;
2421   GLint v[4];
2422};
2423uint32_t
2424_mesa_unmarshal_RasterPos4iv(struct gl_context *ctx, const struct marshal_cmd_RasterPos4iv *cmd, const uint64_t *last)
2425{
2426   const GLint * v = cmd->v;
2427   CALL_RasterPos4iv(ctx->CurrentServerDispatch, (v));
2428   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos4iv), 8) / 8);
2429   assert (cmd_size == cmd->cmd_base.cmd_size);
2430   return cmd_size;
2431}
2432void GLAPIENTRY
2433_mesa_marshal_RasterPos4iv(const GLint * v)
2434{
2435   GET_CURRENT_CONTEXT(ctx);
2436   int cmd_size = sizeof(struct marshal_cmd_RasterPos4iv);
2437   struct marshal_cmd_RasterPos4iv *cmd;
2438   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos4iv, cmd_size);
2439   memcpy(cmd->v, v, 4 * sizeof(GLint));
2440}
2441
2442
2443/* RasterPos4s: marshalled asynchronously */
2444struct marshal_cmd_RasterPos4s
2445{
2446   struct marshal_cmd_base cmd_base;
2447   GLshort x;
2448   GLshort y;
2449   GLshort z;
2450   GLshort w;
2451};
2452uint32_t
2453_mesa_unmarshal_RasterPos4s(struct gl_context *ctx, const struct marshal_cmd_RasterPos4s *cmd, const uint64_t *last)
2454{
2455   GLshort x = cmd->x;
2456   GLshort y = cmd->y;
2457   GLshort z = cmd->z;
2458   GLshort w = cmd->w;
2459   CALL_RasterPos4s(ctx->CurrentServerDispatch, (x, y, z, w));
2460   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos4s), 8) / 8);
2461   assert (cmd_size == cmd->cmd_base.cmd_size);
2462   return cmd_size;
2463}
2464void GLAPIENTRY
2465_mesa_marshal_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
2466{
2467   GET_CURRENT_CONTEXT(ctx);
2468   int cmd_size = sizeof(struct marshal_cmd_RasterPos4s);
2469   struct marshal_cmd_RasterPos4s *cmd;
2470   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos4s, cmd_size);
2471   cmd->x = x;
2472   cmd->y = y;
2473   cmd->z = z;
2474   cmd->w = w;
2475}
2476
2477
2478/* RasterPos4sv: marshalled asynchronously */
2479struct marshal_cmd_RasterPos4sv
2480{
2481   struct marshal_cmd_base cmd_base;
2482   GLshort v[4];
2483};
2484uint32_t
2485_mesa_unmarshal_RasterPos4sv(struct gl_context *ctx, const struct marshal_cmd_RasterPos4sv *cmd, const uint64_t *last)
2486{
2487   const GLshort * v = cmd->v;
2488   CALL_RasterPos4sv(ctx->CurrentServerDispatch, (v));
2489   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_RasterPos4sv), 8) / 8);
2490   assert (cmd_size == cmd->cmd_base.cmd_size);
2491   return cmd_size;
2492}
2493void GLAPIENTRY
2494_mesa_marshal_RasterPos4sv(const GLshort * v)
2495{
2496   GET_CURRENT_CONTEXT(ctx);
2497   int cmd_size = sizeof(struct marshal_cmd_RasterPos4sv);
2498   struct marshal_cmd_RasterPos4sv *cmd;
2499   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_RasterPos4sv, cmd_size);
2500   memcpy(cmd->v, v, 4 * sizeof(GLshort));
2501}
2502
2503
2504/* Rectd: marshalled asynchronously */
2505struct marshal_cmd_Rectd
2506{
2507   struct marshal_cmd_base cmd_base;
2508   GLdouble x1;
2509   GLdouble y1;
2510   GLdouble x2;
2511   GLdouble y2;
2512};
2513uint32_t
2514_mesa_unmarshal_Rectd(struct gl_context *ctx, const struct marshal_cmd_Rectd *cmd, const uint64_t *last)
2515{
2516   GLdouble x1 = cmd->x1;
2517   GLdouble y1 = cmd->y1;
2518   GLdouble x2 = cmd->x2;
2519   GLdouble y2 = cmd->y2;
2520   CALL_Rectd(ctx->CurrentServerDispatch, (x1, y1, x2, y2));
2521   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Rectd), 8) / 8);
2522   assert (cmd_size == cmd->cmd_base.cmd_size);
2523   return cmd_size;
2524}
2525void GLAPIENTRY
2526_mesa_marshal_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
2527{
2528   GET_CURRENT_CONTEXT(ctx);
2529   int cmd_size = sizeof(struct marshal_cmd_Rectd);
2530   struct marshal_cmd_Rectd *cmd;
2531   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Rectd, cmd_size);
2532   cmd->x1 = x1;
2533   cmd->y1 = y1;
2534   cmd->x2 = x2;
2535   cmd->y2 = y2;
2536}
2537
2538
2539/* Rectdv: marshalled asynchronously */
2540struct marshal_cmd_Rectdv
2541{
2542   struct marshal_cmd_base cmd_base;
2543   GLdouble v1[2];
2544   GLdouble v2[2];
2545};
2546uint32_t
2547_mesa_unmarshal_Rectdv(struct gl_context *ctx, const struct marshal_cmd_Rectdv *cmd, const uint64_t *last)
2548{
2549   const GLdouble * v1 = cmd->v1;
2550   const GLdouble * v2 = cmd->v2;
2551   CALL_Rectdv(ctx->CurrentServerDispatch, (v1, v2));
2552   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Rectdv), 8) / 8);
2553   assert (cmd_size == cmd->cmd_base.cmd_size);
2554   return cmd_size;
2555}
2556void GLAPIENTRY
2557_mesa_marshal_Rectdv(const GLdouble * v1, const GLdouble * v2)
2558{
2559   GET_CURRENT_CONTEXT(ctx);
2560   int cmd_size = sizeof(struct marshal_cmd_Rectdv);
2561   struct marshal_cmd_Rectdv *cmd;
2562   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Rectdv, cmd_size);
2563   memcpy(cmd->v1, v1, 2 * sizeof(GLdouble));
2564   memcpy(cmd->v2, v2, 2 * sizeof(GLdouble));
2565}
2566
2567
2568/* Rectf: marshalled asynchronously */
2569struct marshal_cmd_Rectf
2570{
2571   struct marshal_cmd_base cmd_base;
2572   GLfloat x1;
2573   GLfloat y1;
2574   GLfloat x2;
2575   GLfloat y2;
2576};
2577uint32_t
2578_mesa_unmarshal_Rectf(struct gl_context *ctx, const struct marshal_cmd_Rectf *cmd, const uint64_t *last)
2579{
2580   GLfloat x1 = cmd->x1;
2581   GLfloat y1 = cmd->y1;
2582   GLfloat x2 = cmd->x2;
2583   GLfloat y2 = cmd->y2;
2584   CALL_Rectf(ctx->CurrentServerDispatch, (x1, y1, x2, y2));
2585   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Rectf), 8) / 8);
2586   assert (cmd_size == cmd->cmd_base.cmd_size);
2587   return cmd_size;
2588}
2589void GLAPIENTRY
2590_mesa_marshal_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
2591{
2592   GET_CURRENT_CONTEXT(ctx);
2593   int cmd_size = sizeof(struct marshal_cmd_Rectf);
2594   struct marshal_cmd_Rectf *cmd;
2595   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Rectf, cmd_size);
2596   cmd->x1 = x1;
2597   cmd->y1 = y1;
2598   cmd->x2 = x2;
2599   cmd->y2 = y2;
2600}
2601
2602
2603/* Rectfv: marshalled asynchronously */
2604struct marshal_cmd_Rectfv
2605{
2606   struct marshal_cmd_base cmd_base;
2607   GLfloat v1[2];
2608   GLfloat v2[2];
2609};
2610uint32_t
2611_mesa_unmarshal_Rectfv(struct gl_context *ctx, const struct marshal_cmd_Rectfv *cmd, const uint64_t *last)
2612{
2613   const GLfloat * v1 = cmd->v1;
2614   const GLfloat * v2 = cmd->v2;
2615   CALL_Rectfv(ctx->CurrentServerDispatch, (v1, v2));
2616   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Rectfv), 8) / 8);
2617   assert (cmd_size == cmd->cmd_base.cmd_size);
2618   return cmd_size;
2619}
2620void GLAPIENTRY
2621_mesa_marshal_Rectfv(const GLfloat * v1, const GLfloat * v2)
2622{
2623   GET_CURRENT_CONTEXT(ctx);
2624   int cmd_size = sizeof(struct marshal_cmd_Rectfv);
2625   struct marshal_cmd_Rectfv *cmd;
2626   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Rectfv, cmd_size);
2627   memcpy(cmd->v1, v1, 2 * sizeof(GLfloat));
2628   memcpy(cmd->v2, v2, 2 * sizeof(GLfloat));
2629}
2630
2631
2632/* Recti: marshalled asynchronously */
2633struct marshal_cmd_Recti
2634{
2635   struct marshal_cmd_base cmd_base;
2636   GLint x1;
2637   GLint y1;
2638   GLint x2;
2639   GLint y2;
2640};
2641uint32_t
2642_mesa_unmarshal_Recti(struct gl_context *ctx, const struct marshal_cmd_Recti *cmd, const uint64_t *last)
2643{
2644   GLint x1 = cmd->x1;
2645   GLint y1 = cmd->y1;
2646   GLint x2 = cmd->x2;
2647   GLint y2 = cmd->y2;
2648   CALL_Recti(ctx->CurrentServerDispatch, (x1, y1, x2, y2));
2649   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Recti), 8) / 8);
2650   assert (cmd_size == cmd->cmd_base.cmd_size);
2651   return cmd_size;
2652}
2653void GLAPIENTRY
2654_mesa_marshal_Recti(GLint x1, GLint y1, GLint x2, GLint y2)
2655{
2656   GET_CURRENT_CONTEXT(ctx);
2657   int cmd_size = sizeof(struct marshal_cmd_Recti);
2658   struct marshal_cmd_Recti *cmd;
2659   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Recti, cmd_size);
2660   cmd->x1 = x1;
2661   cmd->y1 = y1;
2662   cmd->x2 = x2;
2663   cmd->y2 = y2;
2664}
2665
2666
2667/* Rectiv: marshalled asynchronously */
2668struct marshal_cmd_Rectiv
2669{
2670   struct marshal_cmd_base cmd_base;
2671   GLint v1[2];
2672   GLint v2[2];
2673};
2674uint32_t
2675_mesa_unmarshal_Rectiv(struct gl_context *ctx, const struct marshal_cmd_Rectiv *cmd, const uint64_t *last)
2676{
2677   const GLint * v1 = cmd->v1;
2678   const GLint * v2 = cmd->v2;
2679   CALL_Rectiv(ctx->CurrentServerDispatch, (v1, v2));
2680   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Rectiv), 8) / 8);
2681   assert (cmd_size == cmd->cmd_base.cmd_size);
2682   return cmd_size;
2683}
2684void GLAPIENTRY
2685_mesa_marshal_Rectiv(const GLint * v1, const GLint * v2)
2686{
2687   GET_CURRENT_CONTEXT(ctx);
2688   int cmd_size = sizeof(struct marshal_cmd_Rectiv);
2689   struct marshal_cmd_Rectiv *cmd;
2690   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Rectiv, cmd_size);
2691   memcpy(cmd->v1, v1, 2 * sizeof(GLint));
2692   memcpy(cmd->v2, v2, 2 * sizeof(GLint));
2693}
2694
2695
2696/* Rects: marshalled asynchronously */
2697struct marshal_cmd_Rects
2698{
2699   struct marshal_cmd_base cmd_base;
2700   GLshort x1;
2701   GLshort y1;
2702   GLshort x2;
2703   GLshort y2;
2704};
2705uint32_t
2706_mesa_unmarshal_Rects(struct gl_context *ctx, const struct marshal_cmd_Rects *cmd, const uint64_t *last)
2707{
2708   GLshort x1 = cmd->x1;
2709   GLshort y1 = cmd->y1;
2710   GLshort x2 = cmd->x2;
2711   GLshort y2 = cmd->y2;
2712   CALL_Rects(ctx->CurrentServerDispatch, (x1, y1, x2, y2));
2713   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Rects), 8) / 8);
2714   assert (cmd_size == cmd->cmd_base.cmd_size);
2715   return cmd_size;
2716}
2717void GLAPIENTRY
2718_mesa_marshal_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
2719{
2720   GET_CURRENT_CONTEXT(ctx);
2721   int cmd_size = sizeof(struct marshal_cmd_Rects);
2722   struct marshal_cmd_Rects *cmd;
2723   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Rects, cmd_size);
2724   cmd->x1 = x1;
2725   cmd->y1 = y1;
2726   cmd->x2 = x2;
2727   cmd->y2 = y2;
2728}
2729
2730
2731/* Rectsv: marshalled asynchronously */
2732struct marshal_cmd_Rectsv
2733{
2734   struct marshal_cmd_base cmd_base;
2735   GLshort v1[2];
2736   GLshort v2[2];
2737};
2738uint32_t
2739_mesa_unmarshal_Rectsv(struct gl_context *ctx, const struct marshal_cmd_Rectsv *cmd, const uint64_t *last)
2740{
2741   const GLshort * v1 = cmd->v1;
2742   const GLshort * v2 = cmd->v2;
2743   CALL_Rectsv(ctx->CurrentServerDispatch, (v1, v2));
2744   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Rectsv), 8) / 8);
2745   assert (cmd_size == cmd->cmd_base.cmd_size);
2746   return cmd_size;
2747}
2748void GLAPIENTRY
2749_mesa_marshal_Rectsv(const GLshort * v1, const GLshort * v2)
2750{
2751   GET_CURRENT_CONTEXT(ctx);
2752   int cmd_size = sizeof(struct marshal_cmd_Rectsv);
2753   struct marshal_cmd_Rectsv *cmd;
2754   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Rectsv, cmd_size);
2755   memcpy(cmd->v1, v1, 2 * sizeof(GLshort));
2756   memcpy(cmd->v2, v2, 2 * sizeof(GLshort));
2757}
2758
2759
2760/* TexCoord1d: marshalled asynchronously */
2761struct marshal_cmd_TexCoord1d
2762{
2763   struct marshal_cmd_base cmd_base;
2764   GLdouble s;
2765};
2766uint32_t
2767_mesa_unmarshal_TexCoord1d(struct gl_context *ctx, const struct marshal_cmd_TexCoord1d *cmd, const uint64_t *last)
2768{
2769   GLdouble s = cmd->s;
2770   CALL_TexCoord1d(ctx->CurrentServerDispatch, (s));
2771   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord1d), 8) / 8);
2772   assert (cmd_size == cmd->cmd_base.cmd_size);
2773   return cmd_size;
2774}
2775void GLAPIENTRY
2776_mesa_marshal_TexCoord1d(GLdouble s)
2777{
2778   GET_CURRENT_CONTEXT(ctx);
2779   int cmd_size = sizeof(struct marshal_cmd_TexCoord1d);
2780   struct marshal_cmd_TexCoord1d *cmd;
2781   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord1d, cmd_size);
2782   cmd->s = s;
2783}
2784
2785
2786/* TexCoord1dv: marshalled asynchronously */
2787struct marshal_cmd_TexCoord1dv
2788{
2789   struct marshal_cmd_base cmd_base;
2790   GLdouble v[1];
2791};
2792uint32_t
2793_mesa_unmarshal_TexCoord1dv(struct gl_context *ctx, const struct marshal_cmd_TexCoord1dv *cmd, const uint64_t *last)
2794{
2795   const GLdouble * v = cmd->v;
2796   CALL_TexCoord1dv(ctx->CurrentServerDispatch, (v));
2797   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord1dv), 8) / 8);
2798   assert (cmd_size == cmd->cmd_base.cmd_size);
2799   return cmd_size;
2800}
2801void GLAPIENTRY
2802_mesa_marshal_TexCoord1dv(const GLdouble * v)
2803{
2804   GET_CURRENT_CONTEXT(ctx);
2805   int cmd_size = sizeof(struct marshal_cmd_TexCoord1dv);
2806   struct marshal_cmd_TexCoord1dv *cmd;
2807   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord1dv, cmd_size);
2808   memcpy(cmd->v, v, 1 * sizeof(GLdouble));
2809}
2810
2811
2812/* TexCoord1f: marshalled asynchronously */
2813struct marshal_cmd_TexCoord1f
2814{
2815   struct marshal_cmd_base cmd_base;
2816   GLfloat s;
2817};
2818uint32_t
2819_mesa_unmarshal_TexCoord1f(struct gl_context *ctx, const struct marshal_cmd_TexCoord1f *cmd, const uint64_t *last)
2820{
2821   GLfloat s = cmd->s;
2822   CALL_TexCoord1f(ctx->CurrentServerDispatch, (s));
2823   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord1f), 8) / 8);
2824   assert (cmd_size == cmd->cmd_base.cmd_size);
2825   return cmd_size;
2826}
2827void GLAPIENTRY
2828_mesa_marshal_TexCoord1f(GLfloat s)
2829{
2830   GET_CURRENT_CONTEXT(ctx);
2831   int cmd_size = sizeof(struct marshal_cmd_TexCoord1f);
2832   struct marshal_cmd_TexCoord1f *cmd;
2833   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord1f, cmd_size);
2834   cmd->s = s;
2835}
2836
2837
2838/* TexCoord1fv: marshalled asynchronously */
2839struct marshal_cmd_TexCoord1fv
2840{
2841   struct marshal_cmd_base cmd_base;
2842   GLfloat v[1];
2843};
2844uint32_t
2845_mesa_unmarshal_TexCoord1fv(struct gl_context *ctx, const struct marshal_cmd_TexCoord1fv *cmd, const uint64_t *last)
2846{
2847   const GLfloat * v = cmd->v;
2848   CALL_TexCoord1fv(ctx->CurrentServerDispatch, (v));
2849   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord1fv), 8) / 8);
2850   assert (cmd_size == cmd->cmd_base.cmd_size);
2851   return cmd_size;
2852}
2853void GLAPIENTRY
2854_mesa_marshal_TexCoord1fv(const GLfloat * v)
2855{
2856   GET_CURRENT_CONTEXT(ctx);
2857   int cmd_size = sizeof(struct marshal_cmd_TexCoord1fv);
2858   struct marshal_cmd_TexCoord1fv *cmd;
2859   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord1fv, cmd_size);
2860   memcpy(cmd->v, v, 1 * sizeof(GLfloat));
2861}
2862
2863
2864/* TexCoord1i: marshalled asynchronously */
2865struct marshal_cmd_TexCoord1i
2866{
2867   struct marshal_cmd_base cmd_base;
2868   GLint s;
2869};
2870uint32_t
2871_mesa_unmarshal_TexCoord1i(struct gl_context *ctx, const struct marshal_cmd_TexCoord1i *cmd, const uint64_t *last)
2872{
2873   GLint s = cmd->s;
2874   CALL_TexCoord1i(ctx->CurrentServerDispatch, (s));
2875   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord1i), 8) / 8);
2876   assert (cmd_size == cmd->cmd_base.cmd_size);
2877   return cmd_size;
2878}
2879void GLAPIENTRY
2880_mesa_marshal_TexCoord1i(GLint s)
2881{
2882   GET_CURRENT_CONTEXT(ctx);
2883   int cmd_size = sizeof(struct marshal_cmd_TexCoord1i);
2884   struct marshal_cmd_TexCoord1i *cmd;
2885   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord1i, cmd_size);
2886   cmd->s = s;
2887}
2888
2889
2890/* TexCoord1iv: marshalled asynchronously */
2891struct marshal_cmd_TexCoord1iv
2892{
2893   struct marshal_cmd_base cmd_base;
2894   GLint v[1];
2895};
2896uint32_t
2897_mesa_unmarshal_TexCoord1iv(struct gl_context *ctx, const struct marshal_cmd_TexCoord1iv *cmd, const uint64_t *last)
2898{
2899   const GLint * v = cmd->v;
2900   CALL_TexCoord1iv(ctx->CurrentServerDispatch, (v));
2901   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord1iv), 8) / 8);
2902   assert (cmd_size == cmd->cmd_base.cmd_size);
2903   return cmd_size;
2904}
2905void GLAPIENTRY
2906_mesa_marshal_TexCoord1iv(const GLint * v)
2907{
2908   GET_CURRENT_CONTEXT(ctx);
2909   int cmd_size = sizeof(struct marshal_cmd_TexCoord1iv);
2910   struct marshal_cmd_TexCoord1iv *cmd;
2911   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord1iv, cmd_size);
2912   memcpy(cmd->v, v, 1 * sizeof(GLint));
2913}
2914
2915
2916/* TexCoord1s: marshalled asynchronously */
2917struct marshal_cmd_TexCoord1s
2918{
2919   struct marshal_cmd_base cmd_base;
2920   GLshort s;
2921};
2922uint32_t
2923_mesa_unmarshal_TexCoord1s(struct gl_context *ctx, const struct marshal_cmd_TexCoord1s *cmd, const uint64_t *last)
2924{
2925   GLshort s = cmd->s;
2926   CALL_TexCoord1s(ctx->CurrentServerDispatch, (s));
2927   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord1s), 8) / 8);
2928   assert (cmd_size == cmd->cmd_base.cmd_size);
2929   return cmd_size;
2930}
2931void GLAPIENTRY
2932_mesa_marshal_TexCoord1s(GLshort s)
2933{
2934   GET_CURRENT_CONTEXT(ctx);
2935   int cmd_size = sizeof(struct marshal_cmd_TexCoord1s);
2936   struct marshal_cmd_TexCoord1s *cmd;
2937   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord1s, cmd_size);
2938   cmd->s = s;
2939}
2940
2941
2942/* TexCoord1sv: marshalled asynchronously */
2943struct marshal_cmd_TexCoord1sv
2944{
2945   struct marshal_cmd_base cmd_base;
2946   GLshort v[1];
2947};
2948uint32_t
2949_mesa_unmarshal_TexCoord1sv(struct gl_context *ctx, const struct marshal_cmd_TexCoord1sv *cmd, const uint64_t *last)
2950{
2951   const GLshort * v = cmd->v;
2952   CALL_TexCoord1sv(ctx->CurrentServerDispatch, (v));
2953   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord1sv), 8) / 8);
2954   assert (cmd_size == cmd->cmd_base.cmd_size);
2955   return cmd_size;
2956}
2957void GLAPIENTRY
2958_mesa_marshal_TexCoord1sv(const GLshort * v)
2959{
2960   GET_CURRENT_CONTEXT(ctx);
2961   int cmd_size = sizeof(struct marshal_cmd_TexCoord1sv);
2962   struct marshal_cmd_TexCoord1sv *cmd;
2963   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord1sv, cmd_size);
2964   memcpy(cmd->v, v, 1 * sizeof(GLshort));
2965}
2966
2967
2968/* TexCoord2d: marshalled asynchronously */
2969struct marshal_cmd_TexCoord2d
2970{
2971   struct marshal_cmd_base cmd_base;
2972   GLdouble s;
2973   GLdouble t;
2974};
2975uint32_t
2976_mesa_unmarshal_TexCoord2d(struct gl_context *ctx, const struct marshal_cmd_TexCoord2d *cmd, const uint64_t *last)
2977{
2978   GLdouble s = cmd->s;
2979   GLdouble t = cmd->t;
2980   CALL_TexCoord2d(ctx->CurrentServerDispatch, (s, t));
2981   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord2d), 8) / 8);
2982   assert (cmd_size == cmd->cmd_base.cmd_size);
2983   return cmd_size;
2984}
2985void GLAPIENTRY
2986_mesa_marshal_TexCoord2d(GLdouble s, GLdouble t)
2987{
2988   GET_CURRENT_CONTEXT(ctx);
2989   int cmd_size = sizeof(struct marshal_cmd_TexCoord2d);
2990   struct marshal_cmd_TexCoord2d *cmd;
2991   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord2d, cmd_size);
2992   cmd->s = s;
2993   cmd->t = t;
2994}
2995
2996
2997/* TexCoord2dv: marshalled asynchronously */
2998struct marshal_cmd_TexCoord2dv
2999{
3000   struct marshal_cmd_base cmd_base;
3001   GLdouble v[2];
3002};
3003uint32_t
3004_mesa_unmarshal_TexCoord2dv(struct gl_context *ctx, const struct marshal_cmd_TexCoord2dv *cmd, const uint64_t *last)
3005{
3006   const GLdouble * v = cmd->v;
3007   CALL_TexCoord2dv(ctx->CurrentServerDispatch, (v));
3008   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord2dv), 8) / 8);
3009   assert (cmd_size == cmd->cmd_base.cmd_size);
3010   return cmd_size;
3011}
3012void GLAPIENTRY
3013_mesa_marshal_TexCoord2dv(const GLdouble * v)
3014{
3015   GET_CURRENT_CONTEXT(ctx);
3016   int cmd_size = sizeof(struct marshal_cmd_TexCoord2dv);
3017   struct marshal_cmd_TexCoord2dv *cmd;
3018   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord2dv, cmd_size);
3019   memcpy(cmd->v, v, 2 * sizeof(GLdouble));
3020}
3021
3022
3023/* TexCoord2f: marshalled asynchronously */
3024struct marshal_cmd_TexCoord2f
3025{
3026   struct marshal_cmd_base cmd_base;
3027   GLfloat s;
3028   GLfloat t;
3029};
3030uint32_t
3031_mesa_unmarshal_TexCoord2f(struct gl_context *ctx, const struct marshal_cmd_TexCoord2f *cmd, const uint64_t *last)
3032{
3033   GLfloat s = cmd->s;
3034   GLfloat t = cmd->t;
3035   CALL_TexCoord2f(ctx->CurrentServerDispatch, (s, t));
3036   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord2f), 8) / 8);
3037   assert (cmd_size == cmd->cmd_base.cmd_size);
3038   return cmd_size;
3039}
3040void GLAPIENTRY
3041_mesa_marshal_TexCoord2f(GLfloat s, GLfloat t)
3042{
3043   GET_CURRENT_CONTEXT(ctx);
3044   int cmd_size = sizeof(struct marshal_cmd_TexCoord2f);
3045   struct marshal_cmd_TexCoord2f *cmd;
3046   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord2f, cmd_size);
3047   cmd->s = s;
3048   cmd->t = t;
3049}
3050
3051
3052/* TexCoord2fv: marshalled asynchronously */
3053struct marshal_cmd_TexCoord2fv
3054{
3055   struct marshal_cmd_base cmd_base;
3056   GLfloat v[2];
3057};
3058uint32_t
3059_mesa_unmarshal_TexCoord2fv(struct gl_context *ctx, const struct marshal_cmd_TexCoord2fv *cmd, const uint64_t *last)
3060{
3061   const GLfloat * v = cmd->v;
3062   CALL_TexCoord2fv(ctx->CurrentServerDispatch, (v));
3063   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord2fv), 8) / 8);
3064   assert (cmd_size == cmd->cmd_base.cmd_size);
3065   return cmd_size;
3066}
3067void GLAPIENTRY
3068_mesa_marshal_TexCoord2fv(const GLfloat * v)
3069{
3070   GET_CURRENT_CONTEXT(ctx);
3071   int cmd_size = sizeof(struct marshal_cmd_TexCoord2fv);
3072   struct marshal_cmd_TexCoord2fv *cmd;
3073   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord2fv, cmd_size);
3074   memcpy(cmd->v, v, 2 * sizeof(GLfloat));
3075}
3076
3077
3078/* TexCoord2i: marshalled asynchronously */
3079struct marshal_cmd_TexCoord2i
3080{
3081   struct marshal_cmd_base cmd_base;
3082   GLint s;
3083   GLint t;
3084};
3085uint32_t
3086_mesa_unmarshal_TexCoord2i(struct gl_context *ctx, const struct marshal_cmd_TexCoord2i *cmd, const uint64_t *last)
3087{
3088   GLint s = cmd->s;
3089   GLint t = cmd->t;
3090   CALL_TexCoord2i(ctx->CurrentServerDispatch, (s, t));
3091   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord2i), 8) / 8);
3092   assert (cmd_size == cmd->cmd_base.cmd_size);
3093   return cmd_size;
3094}
3095void GLAPIENTRY
3096_mesa_marshal_TexCoord2i(GLint s, GLint t)
3097{
3098   GET_CURRENT_CONTEXT(ctx);
3099   int cmd_size = sizeof(struct marshal_cmd_TexCoord2i);
3100   struct marshal_cmd_TexCoord2i *cmd;
3101   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord2i, cmd_size);
3102   cmd->s = s;
3103   cmd->t = t;
3104}
3105
3106
3107/* TexCoord2iv: marshalled asynchronously */
3108struct marshal_cmd_TexCoord2iv
3109{
3110   struct marshal_cmd_base cmd_base;
3111   GLint v[2];
3112};
3113uint32_t
3114_mesa_unmarshal_TexCoord2iv(struct gl_context *ctx, const struct marshal_cmd_TexCoord2iv *cmd, const uint64_t *last)
3115{
3116   const GLint * v = cmd->v;
3117   CALL_TexCoord2iv(ctx->CurrentServerDispatch, (v));
3118   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord2iv), 8) / 8);
3119   assert (cmd_size == cmd->cmd_base.cmd_size);
3120   return cmd_size;
3121}
3122void GLAPIENTRY
3123_mesa_marshal_TexCoord2iv(const GLint * v)
3124{
3125   GET_CURRENT_CONTEXT(ctx);
3126   int cmd_size = sizeof(struct marshal_cmd_TexCoord2iv);
3127   struct marshal_cmd_TexCoord2iv *cmd;
3128   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord2iv, cmd_size);
3129   memcpy(cmd->v, v, 2 * sizeof(GLint));
3130}
3131
3132
3133/* TexCoord2s: marshalled asynchronously */
3134struct marshal_cmd_TexCoord2s
3135{
3136   struct marshal_cmd_base cmd_base;
3137   GLshort s;
3138   GLshort t;
3139};
3140uint32_t
3141_mesa_unmarshal_TexCoord2s(struct gl_context *ctx, const struct marshal_cmd_TexCoord2s *cmd, const uint64_t *last)
3142{
3143   GLshort s = cmd->s;
3144   GLshort t = cmd->t;
3145   CALL_TexCoord2s(ctx->CurrentServerDispatch, (s, t));
3146   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord2s), 8) / 8);
3147   assert (cmd_size == cmd->cmd_base.cmd_size);
3148   return cmd_size;
3149}
3150void GLAPIENTRY
3151_mesa_marshal_TexCoord2s(GLshort s, GLshort t)
3152{
3153   GET_CURRENT_CONTEXT(ctx);
3154   int cmd_size = sizeof(struct marshal_cmd_TexCoord2s);
3155   struct marshal_cmd_TexCoord2s *cmd;
3156   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord2s, cmd_size);
3157   cmd->s = s;
3158   cmd->t = t;
3159}
3160
3161
3162/* TexCoord2sv: marshalled asynchronously */
3163struct marshal_cmd_TexCoord2sv
3164{
3165   struct marshal_cmd_base cmd_base;
3166   GLshort v[2];
3167};
3168uint32_t
3169_mesa_unmarshal_TexCoord2sv(struct gl_context *ctx, const struct marshal_cmd_TexCoord2sv *cmd, const uint64_t *last)
3170{
3171   const GLshort * v = cmd->v;
3172   CALL_TexCoord2sv(ctx->CurrentServerDispatch, (v));
3173   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord2sv), 8) / 8);
3174   assert (cmd_size == cmd->cmd_base.cmd_size);
3175   return cmd_size;
3176}
3177void GLAPIENTRY
3178_mesa_marshal_TexCoord2sv(const GLshort * v)
3179{
3180   GET_CURRENT_CONTEXT(ctx);
3181   int cmd_size = sizeof(struct marshal_cmd_TexCoord2sv);
3182   struct marshal_cmd_TexCoord2sv *cmd;
3183   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord2sv, cmd_size);
3184   memcpy(cmd->v, v, 2 * sizeof(GLshort));
3185}
3186
3187
3188/* TexCoord3d: marshalled asynchronously */
3189struct marshal_cmd_TexCoord3d
3190{
3191   struct marshal_cmd_base cmd_base;
3192   GLdouble s;
3193   GLdouble t;
3194   GLdouble r;
3195};
3196uint32_t
3197_mesa_unmarshal_TexCoord3d(struct gl_context *ctx, const struct marshal_cmd_TexCoord3d *cmd, const uint64_t *last)
3198{
3199   GLdouble s = cmd->s;
3200   GLdouble t = cmd->t;
3201   GLdouble r = cmd->r;
3202   CALL_TexCoord3d(ctx->CurrentServerDispatch, (s, t, r));
3203   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord3d), 8) / 8);
3204   assert (cmd_size == cmd->cmd_base.cmd_size);
3205   return cmd_size;
3206}
3207void GLAPIENTRY
3208_mesa_marshal_TexCoord3d(GLdouble s, GLdouble t, GLdouble r)
3209{
3210   GET_CURRENT_CONTEXT(ctx);
3211   int cmd_size = sizeof(struct marshal_cmd_TexCoord3d);
3212   struct marshal_cmd_TexCoord3d *cmd;
3213   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord3d, cmd_size);
3214   cmd->s = s;
3215   cmd->t = t;
3216   cmd->r = r;
3217}
3218
3219
3220/* TexCoord3dv: marshalled asynchronously */
3221struct marshal_cmd_TexCoord3dv
3222{
3223   struct marshal_cmd_base cmd_base;
3224   GLdouble v[3];
3225};
3226uint32_t
3227_mesa_unmarshal_TexCoord3dv(struct gl_context *ctx, const struct marshal_cmd_TexCoord3dv *cmd, const uint64_t *last)
3228{
3229   const GLdouble * v = cmd->v;
3230   CALL_TexCoord3dv(ctx->CurrentServerDispatch, (v));
3231   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord3dv), 8) / 8);
3232   assert (cmd_size == cmd->cmd_base.cmd_size);
3233   return cmd_size;
3234}
3235void GLAPIENTRY
3236_mesa_marshal_TexCoord3dv(const GLdouble * v)
3237{
3238   GET_CURRENT_CONTEXT(ctx);
3239   int cmd_size = sizeof(struct marshal_cmd_TexCoord3dv);
3240   struct marshal_cmd_TexCoord3dv *cmd;
3241   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord3dv, cmd_size);
3242   memcpy(cmd->v, v, 3 * sizeof(GLdouble));
3243}
3244
3245
3246/* TexCoord3f: marshalled asynchronously */
3247struct marshal_cmd_TexCoord3f
3248{
3249   struct marshal_cmd_base cmd_base;
3250   GLfloat s;
3251   GLfloat t;
3252   GLfloat r;
3253};
3254uint32_t
3255_mesa_unmarshal_TexCoord3f(struct gl_context *ctx, const struct marshal_cmd_TexCoord3f *cmd, const uint64_t *last)
3256{
3257   GLfloat s = cmd->s;
3258   GLfloat t = cmd->t;
3259   GLfloat r = cmd->r;
3260   CALL_TexCoord3f(ctx->CurrentServerDispatch, (s, t, r));
3261   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord3f), 8) / 8);
3262   assert (cmd_size == cmd->cmd_base.cmd_size);
3263   return cmd_size;
3264}
3265void GLAPIENTRY
3266_mesa_marshal_TexCoord3f(GLfloat s, GLfloat t, GLfloat r)
3267{
3268   GET_CURRENT_CONTEXT(ctx);
3269   int cmd_size = sizeof(struct marshal_cmd_TexCoord3f);
3270   struct marshal_cmd_TexCoord3f *cmd;
3271   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord3f, cmd_size);
3272   cmd->s = s;
3273   cmd->t = t;
3274   cmd->r = r;
3275}
3276
3277
3278/* TexCoord3fv: marshalled asynchronously */
3279struct marshal_cmd_TexCoord3fv
3280{
3281   struct marshal_cmd_base cmd_base;
3282   GLfloat v[3];
3283};
3284uint32_t
3285_mesa_unmarshal_TexCoord3fv(struct gl_context *ctx, const struct marshal_cmd_TexCoord3fv *cmd, const uint64_t *last)
3286{
3287   const GLfloat * v = cmd->v;
3288   CALL_TexCoord3fv(ctx->CurrentServerDispatch, (v));
3289   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord3fv), 8) / 8);
3290   assert (cmd_size == cmd->cmd_base.cmd_size);
3291   return cmd_size;
3292}
3293void GLAPIENTRY
3294_mesa_marshal_TexCoord3fv(const GLfloat * v)
3295{
3296   GET_CURRENT_CONTEXT(ctx);
3297   int cmd_size = sizeof(struct marshal_cmd_TexCoord3fv);
3298   struct marshal_cmd_TexCoord3fv *cmd;
3299   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord3fv, cmd_size);
3300   memcpy(cmd->v, v, 3 * sizeof(GLfloat));
3301}
3302
3303
3304/* TexCoord3i: marshalled asynchronously */
3305struct marshal_cmd_TexCoord3i
3306{
3307   struct marshal_cmd_base cmd_base;
3308   GLint s;
3309   GLint t;
3310   GLint r;
3311};
3312uint32_t
3313_mesa_unmarshal_TexCoord3i(struct gl_context *ctx, const struct marshal_cmd_TexCoord3i *cmd, const uint64_t *last)
3314{
3315   GLint s = cmd->s;
3316   GLint t = cmd->t;
3317   GLint r = cmd->r;
3318   CALL_TexCoord3i(ctx->CurrentServerDispatch, (s, t, r));
3319   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord3i), 8) / 8);
3320   assert (cmd_size == cmd->cmd_base.cmd_size);
3321   return cmd_size;
3322}
3323void GLAPIENTRY
3324_mesa_marshal_TexCoord3i(GLint s, GLint t, GLint r)
3325{
3326   GET_CURRENT_CONTEXT(ctx);
3327   int cmd_size = sizeof(struct marshal_cmd_TexCoord3i);
3328   struct marshal_cmd_TexCoord3i *cmd;
3329   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord3i, cmd_size);
3330   cmd->s = s;
3331   cmd->t = t;
3332   cmd->r = r;
3333}
3334
3335
3336/* TexCoord3iv: marshalled asynchronously */
3337struct marshal_cmd_TexCoord3iv
3338{
3339   struct marshal_cmd_base cmd_base;
3340   GLint v[3];
3341};
3342uint32_t
3343_mesa_unmarshal_TexCoord3iv(struct gl_context *ctx, const struct marshal_cmd_TexCoord3iv *cmd, const uint64_t *last)
3344{
3345   const GLint * v = cmd->v;
3346   CALL_TexCoord3iv(ctx->CurrentServerDispatch, (v));
3347   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord3iv), 8) / 8);
3348   assert (cmd_size == cmd->cmd_base.cmd_size);
3349   return cmd_size;
3350}
3351void GLAPIENTRY
3352_mesa_marshal_TexCoord3iv(const GLint * v)
3353{
3354   GET_CURRENT_CONTEXT(ctx);
3355   int cmd_size = sizeof(struct marshal_cmd_TexCoord3iv);
3356   struct marshal_cmd_TexCoord3iv *cmd;
3357   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord3iv, cmd_size);
3358   memcpy(cmd->v, v, 3 * sizeof(GLint));
3359}
3360
3361
3362/* TexCoord3s: marshalled asynchronously */
3363struct marshal_cmd_TexCoord3s
3364{
3365   struct marshal_cmd_base cmd_base;
3366   GLshort s;
3367   GLshort t;
3368   GLshort r;
3369};
3370uint32_t
3371_mesa_unmarshal_TexCoord3s(struct gl_context *ctx, const struct marshal_cmd_TexCoord3s *cmd, const uint64_t *last)
3372{
3373   GLshort s = cmd->s;
3374   GLshort t = cmd->t;
3375   GLshort r = cmd->r;
3376   CALL_TexCoord3s(ctx->CurrentServerDispatch, (s, t, r));
3377   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord3s), 8) / 8);
3378   assert (cmd_size == cmd->cmd_base.cmd_size);
3379   return cmd_size;
3380}
3381void GLAPIENTRY
3382_mesa_marshal_TexCoord3s(GLshort s, GLshort t, GLshort r)
3383{
3384   GET_CURRENT_CONTEXT(ctx);
3385   int cmd_size = sizeof(struct marshal_cmd_TexCoord3s);
3386   struct marshal_cmd_TexCoord3s *cmd;
3387   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord3s, cmd_size);
3388   cmd->s = s;
3389   cmd->t = t;
3390   cmd->r = r;
3391}
3392
3393
3394/* TexCoord3sv: marshalled asynchronously */
3395struct marshal_cmd_TexCoord3sv
3396{
3397   struct marshal_cmd_base cmd_base;
3398   GLshort v[3];
3399};
3400uint32_t
3401_mesa_unmarshal_TexCoord3sv(struct gl_context *ctx, const struct marshal_cmd_TexCoord3sv *cmd, const uint64_t *last)
3402{
3403   const GLshort * v = cmd->v;
3404   CALL_TexCoord3sv(ctx->CurrentServerDispatch, (v));
3405   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord3sv), 8) / 8);
3406   assert (cmd_size == cmd->cmd_base.cmd_size);
3407   return cmd_size;
3408}
3409void GLAPIENTRY
3410_mesa_marshal_TexCoord3sv(const GLshort * v)
3411{
3412   GET_CURRENT_CONTEXT(ctx);
3413   int cmd_size = sizeof(struct marshal_cmd_TexCoord3sv);
3414   struct marshal_cmd_TexCoord3sv *cmd;
3415   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord3sv, cmd_size);
3416   memcpy(cmd->v, v, 3 * sizeof(GLshort));
3417}
3418
3419
3420/* TexCoord4d: marshalled asynchronously */
3421struct marshal_cmd_TexCoord4d
3422{
3423   struct marshal_cmd_base cmd_base;
3424   GLdouble s;
3425   GLdouble t;
3426   GLdouble r;
3427   GLdouble q;
3428};
3429uint32_t
3430_mesa_unmarshal_TexCoord4d(struct gl_context *ctx, const struct marshal_cmd_TexCoord4d *cmd, const uint64_t *last)
3431{
3432   GLdouble s = cmd->s;
3433   GLdouble t = cmd->t;
3434   GLdouble r = cmd->r;
3435   GLdouble q = cmd->q;
3436   CALL_TexCoord4d(ctx->CurrentServerDispatch, (s, t, r, q));
3437   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord4d), 8) / 8);
3438   assert (cmd_size == cmd->cmd_base.cmd_size);
3439   return cmd_size;
3440}
3441void GLAPIENTRY
3442_mesa_marshal_TexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
3443{
3444   GET_CURRENT_CONTEXT(ctx);
3445   int cmd_size = sizeof(struct marshal_cmd_TexCoord4d);
3446   struct marshal_cmd_TexCoord4d *cmd;
3447   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord4d, cmd_size);
3448   cmd->s = s;
3449   cmd->t = t;
3450   cmd->r = r;
3451   cmd->q = q;
3452}
3453
3454
3455/* TexCoord4dv: marshalled asynchronously */
3456struct marshal_cmd_TexCoord4dv
3457{
3458   struct marshal_cmd_base cmd_base;
3459   GLdouble v[4];
3460};
3461uint32_t
3462_mesa_unmarshal_TexCoord4dv(struct gl_context *ctx, const struct marshal_cmd_TexCoord4dv *cmd, const uint64_t *last)
3463{
3464   const GLdouble * v = cmd->v;
3465   CALL_TexCoord4dv(ctx->CurrentServerDispatch, (v));
3466   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord4dv), 8) / 8);
3467   assert (cmd_size == cmd->cmd_base.cmd_size);
3468   return cmd_size;
3469}
3470void GLAPIENTRY
3471_mesa_marshal_TexCoord4dv(const GLdouble * v)
3472{
3473   GET_CURRENT_CONTEXT(ctx);
3474   int cmd_size = sizeof(struct marshal_cmd_TexCoord4dv);
3475   struct marshal_cmd_TexCoord4dv *cmd;
3476   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord4dv, cmd_size);
3477   memcpy(cmd->v, v, 4 * sizeof(GLdouble));
3478}
3479
3480
3481/* TexCoord4f: marshalled asynchronously */
3482struct marshal_cmd_TexCoord4f
3483{
3484   struct marshal_cmd_base cmd_base;
3485   GLfloat s;
3486   GLfloat t;
3487   GLfloat r;
3488   GLfloat q;
3489};
3490uint32_t
3491_mesa_unmarshal_TexCoord4f(struct gl_context *ctx, const struct marshal_cmd_TexCoord4f *cmd, const uint64_t *last)
3492{
3493   GLfloat s = cmd->s;
3494   GLfloat t = cmd->t;
3495   GLfloat r = cmd->r;
3496   GLfloat q = cmd->q;
3497   CALL_TexCoord4f(ctx->CurrentServerDispatch, (s, t, r, q));
3498   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord4f), 8) / 8);
3499   assert (cmd_size == cmd->cmd_base.cmd_size);
3500   return cmd_size;
3501}
3502void GLAPIENTRY
3503_mesa_marshal_TexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
3504{
3505   GET_CURRENT_CONTEXT(ctx);
3506   int cmd_size = sizeof(struct marshal_cmd_TexCoord4f);
3507   struct marshal_cmd_TexCoord4f *cmd;
3508   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord4f, cmd_size);
3509   cmd->s = s;
3510   cmd->t = t;
3511   cmd->r = r;
3512   cmd->q = q;
3513}
3514
3515
3516/* TexCoord4fv: marshalled asynchronously */
3517struct marshal_cmd_TexCoord4fv
3518{
3519   struct marshal_cmd_base cmd_base;
3520   GLfloat v[4];
3521};
3522uint32_t
3523_mesa_unmarshal_TexCoord4fv(struct gl_context *ctx, const struct marshal_cmd_TexCoord4fv *cmd, const uint64_t *last)
3524{
3525   const GLfloat * v = cmd->v;
3526   CALL_TexCoord4fv(ctx->CurrentServerDispatch, (v));
3527   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord4fv), 8) / 8);
3528   assert (cmd_size == cmd->cmd_base.cmd_size);
3529   return cmd_size;
3530}
3531void GLAPIENTRY
3532_mesa_marshal_TexCoord4fv(const GLfloat * v)
3533{
3534   GET_CURRENT_CONTEXT(ctx);
3535   int cmd_size = sizeof(struct marshal_cmd_TexCoord4fv);
3536   struct marshal_cmd_TexCoord4fv *cmd;
3537   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord4fv, cmd_size);
3538   memcpy(cmd->v, v, 4 * sizeof(GLfloat));
3539}
3540
3541
3542/* TexCoord4i: marshalled asynchronously */
3543struct marshal_cmd_TexCoord4i
3544{
3545   struct marshal_cmd_base cmd_base;
3546   GLint s;
3547   GLint t;
3548   GLint r;
3549   GLint q;
3550};
3551uint32_t
3552_mesa_unmarshal_TexCoord4i(struct gl_context *ctx, const struct marshal_cmd_TexCoord4i *cmd, const uint64_t *last)
3553{
3554   GLint s = cmd->s;
3555   GLint t = cmd->t;
3556   GLint r = cmd->r;
3557   GLint q = cmd->q;
3558   CALL_TexCoord4i(ctx->CurrentServerDispatch, (s, t, r, q));
3559   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord4i), 8) / 8);
3560   assert (cmd_size == cmd->cmd_base.cmd_size);
3561   return cmd_size;
3562}
3563void GLAPIENTRY
3564_mesa_marshal_TexCoord4i(GLint s, GLint t, GLint r, GLint q)
3565{
3566   GET_CURRENT_CONTEXT(ctx);
3567   int cmd_size = sizeof(struct marshal_cmd_TexCoord4i);
3568   struct marshal_cmd_TexCoord4i *cmd;
3569   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord4i, cmd_size);
3570   cmd->s = s;
3571   cmd->t = t;
3572   cmd->r = r;
3573   cmd->q = q;
3574}
3575
3576
3577/* TexCoord4iv: marshalled asynchronously */
3578struct marshal_cmd_TexCoord4iv
3579{
3580   struct marshal_cmd_base cmd_base;
3581   GLint v[4];
3582};
3583uint32_t
3584_mesa_unmarshal_TexCoord4iv(struct gl_context *ctx, const struct marshal_cmd_TexCoord4iv *cmd, const uint64_t *last)
3585{
3586   const GLint * v = cmd->v;
3587   CALL_TexCoord4iv(ctx->CurrentServerDispatch, (v));
3588   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord4iv), 8) / 8);
3589   assert (cmd_size == cmd->cmd_base.cmd_size);
3590   return cmd_size;
3591}
3592void GLAPIENTRY
3593_mesa_marshal_TexCoord4iv(const GLint * v)
3594{
3595   GET_CURRENT_CONTEXT(ctx);
3596   int cmd_size = sizeof(struct marshal_cmd_TexCoord4iv);
3597   struct marshal_cmd_TexCoord4iv *cmd;
3598   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord4iv, cmd_size);
3599   memcpy(cmd->v, v, 4 * sizeof(GLint));
3600}
3601
3602
3603/* TexCoord4s: marshalled asynchronously */
3604struct marshal_cmd_TexCoord4s
3605{
3606   struct marshal_cmd_base cmd_base;
3607   GLshort s;
3608   GLshort t;
3609   GLshort r;
3610   GLshort q;
3611};
3612uint32_t
3613_mesa_unmarshal_TexCoord4s(struct gl_context *ctx, const struct marshal_cmd_TexCoord4s *cmd, const uint64_t *last)
3614{
3615   GLshort s = cmd->s;
3616   GLshort t = cmd->t;
3617   GLshort r = cmd->r;
3618   GLshort q = cmd->q;
3619   CALL_TexCoord4s(ctx->CurrentServerDispatch, (s, t, r, q));
3620   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord4s), 8) / 8);
3621   assert (cmd_size == cmd->cmd_base.cmd_size);
3622   return cmd_size;
3623}
3624void GLAPIENTRY
3625_mesa_marshal_TexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
3626{
3627   GET_CURRENT_CONTEXT(ctx);
3628   int cmd_size = sizeof(struct marshal_cmd_TexCoord4s);
3629   struct marshal_cmd_TexCoord4s *cmd;
3630   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord4s, cmd_size);
3631   cmd->s = s;
3632   cmd->t = t;
3633   cmd->r = r;
3634   cmd->q = q;
3635}
3636
3637
3638/* TexCoord4sv: marshalled asynchronously */
3639struct marshal_cmd_TexCoord4sv
3640{
3641   struct marshal_cmd_base cmd_base;
3642   GLshort v[4];
3643};
3644uint32_t
3645_mesa_unmarshal_TexCoord4sv(struct gl_context *ctx, const struct marshal_cmd_TexCoord4sv *cmd, const uint64_t *last)
3646{
3647   const GLshort * v = cmd->v;
3648   CALL_TexCoord4sv(ctx->CurrentServerDispatch, (v));
3649   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexCoord4sv), 8) / 8);
3650   assert (cmd_size == cmd->cmd_base.cmd_size);
3651   return cmd_size;
3652}
3653void GLAPIENTRY
3654_mesa_marshal_TexCoord4sv(const GLshort * v)
3655{
3656   GET_CURRENT_CONTEXT(ctx);
3657   int cmd_size = sizeof(struct marshal_cmd_TexCoord4sv);
3658   struct marshal_cmd_TexCoord4sv *cmd;
3659   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexCoord4sv, cmd_size);
3660   memcpy(cmd->v, v, 4 * sizeof(GLshort));
3661}
3662
3663
3664/* Vertex2d: marshalled asynchronously */
3665struct marshal_cmd_Vertex2d
3666{
3667   struct marshal_cmd_base cmd_base;
3668   GLdouble x;
3669   GLdouble y;
3670};
3671uint32_t
3672_mesa_unmarshal_Vertex2d(struct gl_context *ctx, const struct marshal_cmd_Vertex2d *cmd, const uint64_t *last)
3673{
3674   GLdouble x = cmd->x;
3675   GLdouble y = cmd->y;
3676   CALL_Vertex2d(ctx->CurrentServerDispatch, (x, y));
3677   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex2d), 8) / 8);
3678   assert (cmd_size == cmd->cmd_base.cmd_size);
3679   return cmd_size;
3680}
3681void GLAPIENTRY
3682_mesa_marshal_Vertex2d(GLdouble x, GLdouble y)
3683{
3684   GET_CURRENT_CONTEXT(ctx);
3685   int cmd_size = sizeof(struct marshal_cmd_Vertex2d);
3686   struct marshal_cmd_Vertex2d *cmd;
3687   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex2d, cmd_size);
3688   cmd->x = x;
3689   cmd->y = y;
3690}
3691
3692
3693/* Vertex2dv: marshalled asynchronously */
3694struct marshal_cmd_Vertex2dv
3695{
3696   struct marshal_cmd_base cmd_base;
3697   GLdouble v[2];
3698};
3699uint32_t
3700_mesa_unmarshal_Vertex2dv(struct gl_context *ctx, const struct marshal_cmd_Vertex2dv *cmd, const uint64_t *last)
3701{
3702   const GLdouble * v = cmd->v;
3703   CALL_Vertex2dv(ctx->CurrentServerDispatch, (v));
3704   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex2dv), 8) / 8);
3705   assert (cmd_size == cmd->cmd_base.cmd_size);
3706   return cmd_size;
3707}
3708void GLAPIENTRY
3709_mesa_marshal_Vertex2dv(const GLdouble * v)
3710{
3711   GET_CURRENT_CONTEXT(ctx);
3712   int cmd_size = sizeof(struct marshal_cmd_Vertex2dv);
3713   struct marshal_cmd_Vertex2dv *cmd;
3714   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex2dv, cmd_size);
3715   memcpy(cmd->v, v, 2 * sizeof(GLdouble));
3716}
3717
3718
3719/* Vertex2f: marshalled asynchronously */
3720struct marshal_cmd_Vertex2f
3721{
3722   struct marshal_cmd_base cmd_base;
3723   GLfloat x;
3724   GLfloat y;
3725};
3726uint32_t
3727_mesa_unmarshal_Vertex2f(struct gl_context *ctx, const struct marshal_cmd_Vertex2f *cmd, const uint64_t *last)
3728{
3729   GLfloat x = cmd->x;
3730   GLfloat y = cmd->y;
3731   CALL_Vertex2f(ctx->CurrentServerDispatch, (x, y));
3732   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex2f), 8) / 8);
3733   assert (cmd_size == cmd->cmd_base.cmd_size);
3734   return cmd_size;
3735}
3736void GLAPIENTRY
3737_mesa_marshal_Vertex2f(GLfloat x, GLfloat y)
3738{
3739   GET_CURRENT_CONTEXT(ctx);
3740   int cmd_size = sizeof(struct marshal_cmd_Vertex2f);
3741   struct marshal_cmd_Vertex2f *cmd;
3742   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex2f, cmd_size);
3743   cmd->x = x;
3744   cmd->y = y;
3745}
3746
3747
3748/* Vertex2fv: marshalled asynchronously */
3749struct marshal_cmd_Vertex2fv
3750{
3751   struct marshal_cmd_base cmd_base;
3752   GLfloat v[2];
3753};
3754uint32_t
3755_mesa_unmarshal_Vertex2fv(struct gl_context *ctx, const struct marshal_cmd_Vertex2fv *cmd, const uint64_t *last)
3756{
3757   const GLfloat * v = cmd->v;
3758   CALL_Vertex2fv(ctx->CurrentServerDispatch, (v));
3759   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex2fv), 8) / 8);
3760   assert (cmd_size == cmd->cmd_base.cmd_size);
3761   return cmd_size;
3762}
3763void GLAPIENTRY
3764_mesa_marshal_Vertex2fv(const GLfloat * v)
3765{
3766   GET_CURRENT_CONTEXT(ctx);
3767   int cmd_size = sizeof(struct marshal_cmd_Vertex2fv);
3768   struct marshal_cmd_Vertex2fv *cmd;
3769   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex2fv, cmd_size);
3770   memcpy(cmd->v, v, 2 * sizeof(GLfloat));
3771}
3772
3773
3774/* Vertex2i: marshalled asynchronously */
3775struct marshal_cmd_Vertex2i
3776{
3777   struct marshal_cmd_base cmd_base;
3778   GLint x;
3779   GLint y;
3780};
3781uint32_t
3782_mesa_unmarshal_Vertex2i(struct gl_context *ctx, const struct marshal_cmd_Vertex2i *cmd, const uint64_t *last)
3783{
3784   GLint x = cmd->x;
3785   GLint y = cmd->y;
3786   CALL_Vertex2i(ctx->CurrentServerDispatch, (x, y));
3787   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex2i), 8) / 8);
3788   assert (cmd_size == cmd->cmd_base.cmd_size);
3789   return cmd_size;
3790}
3791void GLAPIENTRY
3792_mesa_marshal_Vertex2i(GLint x, GLint y)
3793{
3794   GET_CURRENT_CONTEXT(ctx);
3795   int cmd_size = sizeof(struct marshal_cmd_Vertex2i);
3796   struct marshal_cmd_Vertex2i *cmd;
3797   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex2i, cmd_size);
3798   cmd->x = x;
3799   cmd->y = y;
3800}
3801
3802
3803/* Vertex2iv: marshalled asynchronously */
3804struct marshal_cmd_Vertex2iv
3805{
3806   struct marshal_cmd_base cmd_base;
3807   GLint v[2];
3808};
3809uint32_t
3810_mesa_unmarshal_Vertex2iv(struct gl_context *ctx, const struct marshal_cmd_Vertex2iv *cmd, const uint64_t *last)
3811{
3812   const GLint * v = cmd->v;
3813   CALL_Vertex2iv(ctx->CurrentServerDispatch, (v));
3814   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex2iv), 8) / 8);
3815   assert (cmd_size == cmd->cmd_base.cmd_size);
3816   return cmd_size;
3817}
3818void GLAPIENTRY
3819_mesa_marshal_Vertex2iv(const GLint * v)
3820{
3821   GET_CURRENT_CONTEXT(ctx);
3822   int cmd_size = sizeof(struct marshal_cmd_Vertex2iv);
3823   struct marshal_cmd_Vertex2iv *cmd;
3824   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex2iv, cmd_size);
3825   memcpy(cmd->v, v, 2 * sizeof(GLint));
3826}
3827
3828
3829/* Vertex2s: marshalled asynchronously */
3830struct marshal_cmd_Vertex2s
3831{
3832   struct marshal_cmd_base cmd_base;
3833   GLshort x;
3834   GLshort y;
3835};
3836uint32_t
3837_mesa_unmarshal_Vertex2s(struct gl_context *ctx, const struct marshal_cmd_Vertex2s *cmd, const uint64_t *last)
3838{
3839   GLshort x = cmd->x;
3840   GLshort y = cmd->y;
3841   CALL_Vertex2s(ctx->CurrentServerDispatch, (x, y));
3842   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex2s), 8) / 8);
3843   assert (cmd_size == cmd->cmd_base.cmd_size);
3844   return cmd_size;
3845}
3846void GLAPIENTRY
3847_mesa_marshal_Vertex2s(GLshort x, GLshort y)
3848{
3849   GET_CURRENT_CONTEXT(ctx);
3850   int cmd_size = sizeof(struct marshal_cmd_Vertex2s);
3851   struct marshal_cmd_Vertex2s *cmd;
3852   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex2s, cmd_size);
3853   cmd->x = x;
3854   cmd->y = y;
3855}
3856
3857
3858/* Vertex2sv: marshalled asynchronously */
3859struct marshal_cmd_Vertex2sv
3860{
3861   struct marshal_cmd_base cmd_base;
3862   GLshort v[2];
3863};
3864uint32_t
3865_mesa_unmarshal_Vertex2sv(struct gl_context *ctx, const struct marshal_cmd_Vertex2sv *cmd, const uint64_t *last)
3866{
3867   const GLshort * v = cmd->v;
3868   CALL_Vertex2sv(ctx->CurrentServerDispatch, (v));
3869   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex2sv), 8) / 8);
3870   assert (cmd_size == cmd->cmd_base.cmd_size);
3871   return cmd_size;
3872}
3873void GLAPIENTRY
3874_mesa_marshal_Vertex2sv(const GLshort * v)
3875{
3876   GET_CURRENT_CONTEXT(ctx);
3877   int cmd_size = sizeof(struct marshal_cmd_Vertex2sv);
3878   struct marshal_cmd_Vertex2sv *cmd;
3879   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex2sv, cmd_size);
3880   memcpy(cmd->v, v, 2 * sizeof(GLshort));
3881}
3882
3883
3884/* Vertex3d: marshalled asynchronously */
3885struct marshal_cmd_Vertex3d
3886{
3887   struct marshal_cmd_base cmd_base;
3888   GLdouble x;
3889   GLdouble y;
3890   GLdouble z;
3891};
3892uint32_t
3893_mesa_unmarshal_Vertex3d(struct gl_context *ctx, const struct marshal_cmd_Vertex3d *cmd, const uint64_t *last)
3894{
3895   GLdouble x = cmd->x;
3896   GLdouble y = cmd->y;
3897   GLdouble z = cmd->z;
3898   CALL_Vertex3d(ctx->CurrentServerDispatch, (x, y, z));
3899   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex3d), 8) / 8);
3900   assert (cmd_size == cmd->cmd_base.cmd_size);
3901   return cmd_size;
3902}
3903void GLAPIENTRY
3904_mesa_marshal_Vertex3d(GLdouble x, GLdouble y, GLdouble z)
3905{
3906   GET_CURRENT_CONTEXT(ctx);
3907   int cmd_size = sizeof(struct marshal_cmd_Vertex3d);
3908   struct marshal_cmd_Vertex3d *cmd;
3909   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex3d, cmd_size);
3910   cmd->x = x;
3911   cmd->y = y;
3912   cmd->z = z;
3913}
3914
3915
3916/* Vertex3dv: marshalled asynchronously */
3917struct marshal_cmd_Vertex3dv
3918{
3919   struct marshal_cmd_base cmd_base;
3920   GLdouble v[3];
3921};
3922uint32_t
3923_mesa_unmarshal_Vertex3dv(struct gl_context *ctx, const struct marshal_cmd_Vertex3dv *cmd, const uint64_t *last)
3924{
3925   const GLdouble * v = cmd->v;
3926   CALL_Vertex3dv(ctx->CurrentServerDispatch, (v));
3927   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex3dv), 8) / 8);
3928   assert (cmd_size == cmd->cmd_base.cmd_size);
3929   return cmd_size;
3930}
3931void GLAPIENTRY
3932_mesa_marshal_Vertex3dv(const GLdouble * v)
3933{
3934   GET_CURRENT_CONTEXT(ctx);
3935   int cmd_size = sizeof(struct marshal_cmd_Vertex3dv);
3936   struct marshal_cmd_Vertex3dv *cmd;
3937   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex3dv, cmd_size);
3938   memcpy(cmd->v, v, 3 * sizeof(GLdouble));
3939}
3940
3941
3942/* Vertex3f: marshalled asynchronously */
3943struct marshal_cmd_Vertex3f
3944{
3945   struct marshal_cmd_base cmd_base;
3946   GLfloat x;
3947   GLfloat y;
3948   GLfloat z;
3949};
3950uint32_t
3951_mesa_unmarshal_Vertex3f(struct gl_context *ctx, const struct marshal_cmd_Vertex3f *cmd, const uint64_t *last)
3952{
3953   GLfloat x = cmd->x;
3954   GLfloat y = cmd->y;
3955   GLfloat z = cmd->z;
3956   CALL_Vertex3f(ctx->CurrentServerDispatch, (x, y, z));
3957   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex3f), 8) / 8);
3958   assert (cmd_size == cmd->cmd_base.cmd_size);
3959   return cmd_size;
3960}
3961void GLAPIENTRY
3962_mesa_marshal_Vertex3f(GLfloat x, GLfloat y, GLfloat z)
3963{
3964   GET_CURRENT_CONTEXT(ctx);
3965   int cmd_size = sizeof(struct marshal_cmd_Vertex3f);
3966   struct marshal_cmd_Vertex3f *cmd;
3967   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex3f, cmd_size);
3968   cmd->x = x;
3969   cmd->y = y;
3970   cmd->z = z;
3971}
3972
3973
3974/* Vertex3fv: marshalled asynchronously */
3975struct marshal_cmd_Vertex3fv
3976{
3977   struct marshal_cmd_base cmd_base;
3978   GLfloat v[3];
3979};
3980uint32_t
3981_mesa_unmarshal_Vertex3fv(struct gl_context *ctx, const struct marshal_cmd_Vertex3fv *cmd, const uint64_t *last)
3982{
3983   const GLfloat * v = cmd->v;
3984   CALL_Vertex3fv(ctx->CurrentServerDispatch, (v));
3985   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex3fv), 8) / 8);
3986   assert (cmd_size == cmd->cmd_base.cmd_size);
3987   return cmd_size;
3988}
3989void GLAPIENTRY
3990_mesa_marshal_Vertex3fv(const GLfloat * v)
3991{
3992   GET_CURRENT_CONTEXT(ctx);
3993   int cmd_size = sizeof(struct marshal_cmd_Vertex3fv);
3994   struct marshal_cmd_Vertex3fv *cmd;
3995   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex3fv, cmd_size);
3996   memcpy(cmd->v, v, 3 * sizeof(GLfloat));
3997}
3998
3999
4000/* Vertex3i: marshalled asynchronously */
4001struct marshal_cmd_Vertex3i
4002{
4003   struct marshal_cmd_base cmd_base;
4004   GLint x;
4005   GLint y;
4006   GLint z;
4007};
4008uint32_t
4009_mesa_unmarshal_Vertex3i(struct gl_context *ctx, const struct marshal_cmd_Vertex3i *cmd, const uint64_t *last)
4010{
4011   GLint x = cmd->x;
4012   GLint y = cmd->y;
4013   GLint z = cmd->z;
4014   CALL_Vertex3i(ctx->CurrentServerDispatch, (x, y, z));
4015   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex3i), 8) / 8);
4016   assert (cmd_size == cmd->cmd_base.cmd_size);
4017   return cmd_size;
4018}
4019void GLAPIENTRY
4020_mesa_marshal_Vertex3i(GLint x, GLint y, GLint z)
4021{
4022   GET_CURRENT_CONTEXT(ctx);
4023   int cmd_size = sizeof(struct marshal_cmd_Vertex3i);
4024   struct marshal_cmd_Vertex3i *cmd;
4025   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex3i, cmd_size);
4026   cmd->x = x;
4027   cmd->y = y;
4028   cmd->z = z;
4029}
4030
4031
4032/* Vertex3iv: marshalled asynchronously */
4033struct marshal_cmd_Vertex3iv
4034{
4035   struct marshal_cmd_base cmd_base;
4036   GLint v[3];
4037};
4038uint32_t
4039_mesa_unmarshal_Vertex3iv(struct gl_context *ctx, const struct marshal_cmd_Vertex3iv *cmd, const uint64_t *last)
4040{
4041   const GLint * v = cmd->v;
4042   CALL_Vertex3iv(ctx->CurrentServerDispatch, (v));
4043   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex3iv), 8) / 8);
4044   assert (cmd_size == cmd->cmd_base.cmd_size);
4045   return cmd_size;
4046}
4047void GLAPIENTRY
4048_mesa_marshal_Vertex3iv(const GLint * v)
4049{
4050   GET_CURRENT_CONTEXT(ctx);
4051   int cmd_size = sizeof(struct marshal_cmd_Vertex3iv);
4052   struct marshal_cmd_Vertex3iv *cmd;
4053   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex3iv, cmd_size);
4054   memcpy(cmd->v, v, 3 * sizeof(GLint));
4055}
4056
4057
4058/* Vertex3s: marshalled asynchronously */
4059struct marshal_cmd_Vertex3s
4060{
4061   struct marshal_cmd_base cmd_base;
4062   GLshort x;
4063   GLshort y;
4064   GLshort z;
4065};
4066uint32_t
4067_mesa_unmarshal_Vertex3s(struct gl_context *ctx, const struct marshal_cmd_Vertex3s *cmd, const uint64_t *last)
4068{
4069   GLshort x = cmd->x;
4070   GLshort y = cmd->y;
4071   GLshort z = cmd->z;
4072   CALL_Vertex3s(ctx->CurrentServerDispatch, (x, y, z));
4073   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex3s), 8) / 8);
4074   assert (cmd_size == cmd->cmd_base.cmd_size);
4075   return cmd_size;
4076}
4077void GLAPIENTRY
4078_mesa_marshal_Vertex3s(GLshort x, GLshort y, GLshort z)
4079{
4080   GET_CURRENT_CONTEXT(ctx);
4081   int cmd_size = sizeof(struct marshal_cmd_Vertex3s);
4082   struct marshal_cmd_Vertex3s *cmd;
4083   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex3s, cmd_size);
4084   cmd->x = x;
4085   cmd->y = y;
4086   cmd->z = z;
4087}
4088
4089
4090/* Vertex3sv: marshalled asynchronously */
4091struct marshal_cmd_Vertex3sv
4092{
4093   struct marshal_cmd_base cmd_base;
4094   GLshort v[3];
4095};
4096uint32_t
4097_mesa_unmarshal_Vertex3sv(struct gl_context *ctx, const struct marshal_cmd_Vertex3sv *cmd, const uint64_t *last)
4098{
4099   const GLshort * v = cmd->v;
4100   CALL_Vertex3sv(ctx->CurrentServerDispatch, (v));
4101   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex3sv), 8) / 8);
4102   assert (cmd_size == cmd->cmd_base.cmd_size);
4103   return cmd_size;
4104}
4105void GLAPIENTRY
4106_mesa_marshal_Vertex3sv(const GLshort * v)
4107{
4108   GET_CURRENT_CONTEXT(ctx);
4109   int cmd_size = sizeof(struct marshal_cmd_Vertex3sv);
4110   struct marshal_cmd_Vertex3sv *cmd;
4111   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex3sv, cmd_size);
4112   memcpy(cmd->v, v, 3 * sizeof(GLshort));
4113}
4114
4115
4116/* Vertex4d: marshalled asynchronously */
4117struct marshal_cmd_Vertex4d
4118{
4119   struct marshal_cmd_base cmd_base;
4120   GLdouble x;
4121   GLdouble y;
4122   GLdouble z;
4123   GLdouble w;
4124};
4125uint32_t
4126_mesa_unmarshal_Vertex4d(struct gl_context *ctx, const struct marshal_cmd_Vertex4d *cmd, const uint64_t *last)
4127{
4128   GLdouble x = cmd->x;
4129   GLdouble y = cmd->y;
4130   GLdouble z = cmd->z;
4131   GLdouble w = cmd->w;
4132   CALL_Vertex4d(ctx->CurrentServerDispatch, (x, y, z, w));
4133   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex4d), 8) / 8);
4134   assert (cmd_size == cmd->cmd_base.cmd_size);
4135   return cmd_size;
4136}
4137void GLAPIENTRY
4138_mesa_marshal_Vertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
4139{
4140   GET_CURRENT_CONTEXT(ctx);
4141   int cmd_size = sizeof(struct marshal_cmd_Vertex4d);
4142   struct marshal_cmd_Vertex4d *cmd;
4143   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex4d, cmd_size);
4144   cmd->x = x;
4145   cmd->y = y;
4146   cmd->z = z;
4147   cmd->w = w;
4148}
4149
4150
4151/* Vertex4dv: marshalled asynchronously */
4152struct marshal_cmd_Vertex4dv
4153{
4154   struct marshal_cmd_base cmd_base;
4155   GLdouble v[4];
4156};
4157uint32_t
4158_mesa_unmarshal_Vertex4dv(struct gl_context *ctx, const struct marshal_cmd_Vertex4dv *cmd, const uint64_t *last)
4159{
4160   const GLdouble * v = cmd->v;
4161   CALL_Vertex4dv(ctx->CurrentServerDispatch, (v));
4162   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex4dv), 8) / 8);
4163   assert (cmd_size == cmd->cmd_base.cmd_size);
4164   return cmd_size;
4165}
4166void GLAPIENTRY
4167_mesa_marshal_Vertex4dv(const GLdouble * v)
4168{
4169   GET_CURRENT_CONTEXT(ctx);
4170   int cmd_size = sizeof(struct marshal_cmd_Vertex4dv);
4171   struct marshal_cmd_Vertex4dv *cmd;
4172   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex4dv, cmd_size);
4173   memcpy(cmd->v, v, 4 * sizeof(GLdouble));
4174}
4175
4176
4177/* Vertex4f: marshalled asynchronously */
4178struct marshal_cmd_Vertex4f
4179{
4180   struct marshal_cmd_base cmd_base;
4181   GLfloat x;
4182   GLfloat y;
4183   GLfloat z;
4184   GLfloat w;
4185};
4186uint32_t
4187_mesa_unmarshal_Vertex4f(struct gl_context *ctx, const struct marshal_cmd_Vertex4f *cmd, const uint64_t *last)
4188{
4189   GLfloat x = cmd->x;
4190   GLfloat y = cmd->y;
4191   GLfloat z = cmd->z;
4192   GLfloat w = cmd->w;
4193   CALL_Vertex4f(ctx->CurrentServerDispatch, (x, y, z, w));
4194   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex4f), 8) / 8);
4195   assert (cmd_size == cmd->cmd_base.cmd_size);
4196   return cmd_size;
4197}
4198void GLAPIENTRY
4199_mesa_marshal_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
4200{
4201   GET_CURRENT_CONTEXT(ctx);
4202   int cmd_size = sizeof(struct marshal_cmd_Vertex4f);
4203   struct marshal_cmd_Vertex4f *cmd;
4204   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex4f, cmd_size);
4205   cmd->x = x;
4206   cmd->y = y;
4207   cmd->z = z;
4208   cmd->w = w;
4209}
4210
4211
4212/* Vertex4fv: marshalled asynchronously */
4213struct marshal_cmd_Vertex4fv
4214{
4215   struct marshal_cmd_base cmd_base;
4216   GLfloat v[4];
4217};
4218uint32_t
4219_mesa_unmarshal_Vertex4fv(struct gl_context *ctx, const struct marshal_cmd_Vertex4fv *cmd, const uint64_t *last)
4220{
4221   const GLfloat * v = cmd->v;
4222   CALL_Vertex4fv(ctx->CurrentServerDispatch, (v));
4223   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex4fv), 8) / 8);
4224   assert (cmd_size == cmd->cmd_base.cmd_size);
4225   return cmd_size;
4226}
4227void GLAPIENTRY
4228_mesa_marshal_Vertex4fv(const GLfloat * v)
4229{
4230   GET_CURRENT_CONTEXT(ctx);
4231   int cmd_size = sizeof(struct marshal_cmd_Vertex4fv);
4232   struct marshal_cmd_Vertex4fv *cmd;
4233   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex4fv, cmd_size);
4234   memcpy(cmd->v, v, 4 * sizeof(GLfloat));
4235}
4236
4237
4238/* Vertex4i: marshalled asynchronously */
4239struct marshal_cmd_Vertex4i
4240{
4241   struct marshal_cmd_base cmd_base;
4242   GLint x;
4243   GLint y;
4244   GLint z;
4245   GLint w;
4246};
4247uint32_t
4248_mesa_unmarshal_Vertex4i(struct gl_context *ctx, const struct marshal_cmd_Vertex4i *cmd, const uint64_t *last)
4249{
4250   GLint x = cmd->x;
4251   GLint y = cmd->y;
4252   GLint z = cmd->z;
4253   GLint w = cmd->w;
4254   CALL_Vertex4i(ctx->CurrentServerDispatch, (x, y, z, w));
4255   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex4i), 8) / 8);
4256   assert (cmd_size == cmd->cmd_base.cmd_size);
4257   return cmd_size;
4258}
4259void GLAPIENTRY
4260_mesa_marshal_Vertex4i(GLint x, GLint y, GLint z, GLint w)
4261{
4262   GET_CURRENT_CONTEXT(ctx);
4263   int cmd_size = sizeof(struct marshal_cmd_Vertex4i);
4264   struct marshal_cmd_Vertex4i *cmd;
4265   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex4i, cmd_size);
4266   cmd->x = x;
4267   cmd->y = y;
4268   cmd->z = z;
4269   cmd->w = w;
4270}
4271
4272
4273/* Vertex4iv: marshalled asynchronously */
4274struct marshal_cmd_Vertex4iv
4275{
4276   struct marshal_cmd_base cmd_base;
4277   GLint v[4];
4278};
4279uint32_t
4280_mesa_unmarshal_Vertex4iv(struct gl_context *ctx, const struct marshal_cmd_Vertex4iv *cmd, const uint64_t *last)
4281{
4282   const GLint * v = cmd->v;
4283   CALL_Vertex4iv(ctx->CurrentServerDispatch, (v));
4284   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex4iv), 8) / 8);
4285   assert (cmd_size == cmd->cmd_base.cmd_size);
4286   return cmd_size;
4287}
4288void GLAPIENTRY
4289_mesa_marshal_Vertex4iv(const GLint * v)
4290{
4291   GET_CURRENT_CONTEXT(ctx);
4292   int cmd_size = sizeof(struct marshal_cmd_Vertex4iv);
4293   struct marshal_cmd_Vertex4iv *cmd;
4294   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex4iv, cmd_size);
4295   memcpy(cmd->v, v, 4 * sizeof(GLint));
4296}
4297
4298
4299/* Vertex4s: marshalled asynchronously */
4300struct marshal_cmd_Vertex4s
4301{
4302   struct marshal_cmd_base cmd_base;
4303   GLshort x;
4304   GLshort y;
4305   GLshort z;
4306   GLshort w;
4307};
4308uint32_t
4309_mesa_unmarshal_Vertex4s(struct gl_context *ctx, const struct marshal_cmd_Vertex4s *cmd, const uint64_t *last)
4310{
4311   GLshort x = cmd->x;
4312   GLshort y = cmd->y;
4313   GLshort z = cmd->z;
4314   GLshort w = cmd->w;
4315   CALL_Vertex4s(ctx->CurrentServerDispatch, (x, y, z, w));
4316   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex4s), 8) / 8);
4317   assert (cmd_size == cmd->cmd_base.cmd_size);
4318   return cmd_size;
4319}
4320void GLAPIENTRY
4321_mesa_marshal_Vertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
4322{
4323   GET_CURRENT_CONTEXT(ctx);
4324   int cmd_size = sizeof(struct marshal_cmd_Vertex4s);
4325   struct marshal_cmd_Vertex4s *cmd;
4326   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex4s, cmd_size);
4327   cmd->x = x;
4328   cmd->y = y;
4329   cmd->z = z;
4330   cmd->w = w;
4331}
4332
4333
4334/* Vertex4sv: marshalled asynchronously */
4335struct marshal_cmd_Vertex4sv
4336{
4337   struct marshal_cmd_base cmd_base;
4338   GLshort v[4];
4339};
4340uint32_t
4341_mesa_unmarshal_Vertex4sv(struct gl_context *ctx, const struct marshal_cmd_Vertex4sv *cmd, const uint64_t *last)
4342{
4343   const GLshort * v = cmd->v;
4344   CALL_Vertex4sv(ctx->CurrentServerDispatch, (v));
4345   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Vertex4sv), 8) / 8);
4346   assert (cmd_size == cmd->cmd_base.cmd_size);
4347   return cmd_size;
4348}
4349void GLAPIENTRY
4350_mesa_marshal_Vertex4sv(const GLshort * v)
4351{
4352   GET_CURRENT_CONTEXT(ctx);
4353   int cmd_size = sizeof(struct marshal_cmd_Vertex4sv);
4354   struct marshal_cmd_Vertex4sv *cmd;
4355   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Vertex4sv, cmd_size);
4356   memcpy(cmd->v, v, 4 * sizeof(GLshort));
4357}
4358
4359
4360/* ClipPlane: marshalled asynchronously */
4361struct marshal_cmd_ClipPlane
4362{
4363   struct marshal_cmd_base cmd_base;
4364   GLenum plane;
4365   GLdouble equation[4];
4366};
4367uint32_t
4368_mesa_unmarshal_ClipPlane(struct gl_context *ctx, const struct marshal_cmd_ClipPlane *cmd, const uint64_t *last)
4369{
4370   GLenum plane = cmd->plane;
4371   const GLdouble * equation = cmd->equation;
4372   CALL_ClipPlane(ctx->CurrentServerDispatch, (plane, equation));
4373   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ClipPlane), 8) / 8);
4374   assert (cmd_size == cmd->cmd_base.cmd_size);
4375   return cmd_size;
4376}
4377void GLAPIENTRY
4378_mesa_marshal_ClipPlane(GLenum plane, const GLdouble * equation)
4379{
4380   GET_CURRENT_CONTEXT(ctx);
4381   int cmd_size = sizeof(struct marshal_cmd_ClipPlane);
4382   struct marshal_cmd_ClipPlane *cmd;
4383   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ClipPlane, cmd_size);
4384   cmd->plane = plane;
4385   memcpy(cmd->equation, equation, 4 * sizeof(GLdouble));
4386}
4387
4388
4389/* ColorMaterial: marshalled asynchronously */
4390struct marshal_cmd_ColorMaterial
4391{
4392   struct marshal_cmd_base cmd_base;
4393   GLenum face;
4394   GLenum mode;
4395};
4396uint32_t
4397_mesa_unmarshal_ColorMaterial(struct gl_context *ctx, const struct marshal_cmd_ColorMaterial *cmd, const uint64_t *last)
4398{
4399   GLenum face = cmd->face;
4400   GLenum mode = cmd->mode;
4401   CALL_ColorMaterial(ctx->CurrentServerDispatch, (face, mode));
4402   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ColorMaterial), 8) / 8);
4403   assert (cmd_size == cmd->cmd_base.cmd_size);
4404   return cmd_size;
4405}
4406void GLAPIENTRY
4407_mesa_marshal_ColorMaterial(GLenum face, GLenum mode)
4408{
4409   GET_CURRENT_CONTEXT(ctx);
4410   int cmd_size = sizeof(struct marshal_cmd_ColorMaterial);
4411   struct marshal_cmd_ColorMaterial *cmd;
4412   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ColorMaterial, cmd_size);
4413   cmd->face = face;
4414   cmd->mode = mode;
4415}
4416
4417
4418/* CullFace: marshalled asynchronously */
4419struct marshal_cmd_CullFace
4420{
4421   struct marshal_cmd_base cmd_base;
4422   GLenum mode;
4423};
4424uint32_t
4425_mesa_unmarshal_CullFace(struct gl_context *ctx, const struct marshal_cmd_CullFace *cmd, const uint64_t *last)
4426{
4427   GLenum mode = cmd->mode;
4428   CALL_CullFace(ctx->CurrentServerDispatch, (mode));
4429   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CullFace), 8) / 8);
4430   assert (cmd_size == cmd->cmd_base.cmd_size);
4431   return cmd_size;
4432}
4433void GLAPIENTRY
4434_mesa_marshal_CullFace(GLenum mode)
4435{
4436   GET_CURRENT_CONTEXT(ctx);
4437   int cmd_size = sizeof(struct marshal_cmd_CullFace);
4438   struct marshal_cmd_CullFace *cmd;
4439   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CullFace, cmd_size);
4440   cmd->mode = mode;
4441}
4442
4443
4444/* Fogf: marshalled asynchronously */
4445struct marshal_cmd_Fogf
4446{
4447   struct marshal_cmd_base cmd_base;
4448   GLenum pname;
4449   GLfloat param;
4450};
4451uint32_t
4452_mesa_unmarshal_Fogf(struct gl_context *ctx, const struct marshal_cmd_Fogf *cmd, const uint64_t *last)
4453{
4454   GLenum pname = cmd->pname;
4455   GLfloat param = cmd->param;
4456   CALL_Fogf(ctx->CurrentServerDispatch, (pname, param));
4457   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Fogf), 8) / 8);
4458   assert (cmd_size == cmd->cmd_base.cmd_size);
4459   return cmd_size;
4460}
4461void GLAPIENTRY
4462_mesa_marshal_Fogf(GLenum pname, GLfloat param)
4463{
4464   GET_CURRENT_CONTEXT(ctx);
4465   int cmd_size = sizeof(struct marshal_cmd_Fogf);
4466   struct marshal_cmd_Fogf *cmd;
4467   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Fogf, cmd_size);
4468   cmd->pname = pname;
4469   cmd->param = param;
4470}
4471
4472
4473/* Fogfv: marshalled asynchronously */
4474struct marshal_cmd_Fogfv
4475{
4476   struct marshal_cmd_base cmd_base;
4477   GLenum pname;
4478   /* Next safe_mul(_mesa_fog_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat params[None] */
4479};
4480uint32_t
4481_mesa_unmarshal_Fogfv(struct gl_context *ctx, const struct marshal_cmd_Fogfv *cmd, const uint64_t *last)
4482{
4483   GLenum pname = cmd->pname;
4484   GLfloat * params;
4485   const char *variable_data = (const char *) (cmd + 1);
4486   params = (GLfloat *) variable_data;
4487   CALL_Fogfv(ctx->CurrentServerDispatch, (pname, params));
4488   return cmd->cmd_base.cmd_size;
4489}
4490void GLAPIENTRY
4491_mesa_marshal_Fogfv(GLenum pname, const GLfloat * params)
4492{
4493   GET_CURRENT_CONTEXT(ctx);
4494   int params_size = safe_mul(_mesa_fog_enum_to_count(pname), 1 * sizeof(GLfloat));
4495   int cmd_size = sizeof(struct marshal_cmd_Fogfv) + params_size;
4496   struct marshal_cmd_Fogfv *cmd;
4497   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
4498      _mesa_glthread_finish_before(ctx, "Fogfv");
4499      CALL_Fogfv(ctx->CurrentServerDispatch, (pname, params));
4500      return;
4501   }
4502   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Fogfv, cmd_size);
4503   cmd->pname = pname;
4504   char *variable_data = (char *) (cmd + 1);
4505   memcpy(variable_data, params, params_size);
4506}
4507
4508
4509/* Fogi: marshalled asynchronously */
4510struct marshal_cmd_Fogi
4511{
4512   struct marshal_cmd_base cmd_base;
4513   GLenum pname;
4514   GLint param;
4515};
4516uint32_t
4517_mesa_unmarshal_Fogi(struct gl_context *ctx, const struct marshal_cmd_Fogi *cmd, const uint64_t *last)
4518{
4519   GLenum pname = cmd->pname;
4520   GLint param = cmd->param;
4521   CALL_Fogi(ctx->CurrentServerDispatch, (pname, param));
4522   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Fogi), 8) / 8);
4523   assert (cmd_size == cmd->cmd_base.cmd_size);
4524   return cmd_size;
4525}
4526void GLAPIENTRY
4527_mesa_marshal_Fogi(GLenum pname, GLint param)
4528{
4529   GET_CURRENT_CONTEXT(ctx);
4530   int cmd_size = sizeof(struct marshal_cmd_Fogi);
4531   struct marshal_cmd_Fogi *cmd;
4532   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Fogi, cmd_size);
4533   cmd->pname = pname;
4534   cmd->param = param;
4535}
4536
4537
4538/* Fogiv: marshalled asynchronously */
4539struct marshal_cmd_Fogiv
4540{
4541   struct marshal_cmd_base cmd_base;
4542   GLenum pname;
4543   /* Next safe_mul(_mesa_fog_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint params[None] */
4544};
4545uint32_t
4546_mesa_unmarshal_Fogiv(struct gl_context *ctx, const struct marshal_cmd_Fogiv *cmd, const uint64_t *last)
4547{
4548   GLenum pname = cmd->pname;
4549   GLint * params;
4550   const char *variable_data = (const char *) (cmd + 1);
4551   params = (GLint *) variable_data;
4552   CALL_Fogiv(ctx->CurrentServerDispatch, (pname, params));
4553   return cmd->cmd_base.cmd_size;
4554}
4555void GLAPIENTRY
4556_mesa_marshal_Fogiv(GLenum pname, const GLint * params)
4557{
4558   GET_CURRENT_CONTEXT(ctx);
4559   int params_size = safe_mul(_mesa_fog_enum_to_count(pname), 1 * sizeof(GLint));
4560   int cmd_size = sizeof(struct marshal_cmd_Fogiv) + params_size;
4561   struct marshal_cmd_Fogiv *cmd;
4562   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
4563      _mesa_glthread_finish_before(ctx, "Fogiv");
4564      CALL_Fogiv(ctx->CurrentServerDispatch, (pname, params));
4565      return;
4566   }
4567   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Fogiv, cmd_size);
4568   cmd->pname = pname;
4569   char *variable_data = (char *) (cmd + 1);
4570   memcpy(variable_data, params, params_size);
4571}
4572
4573
4574/* FrontFace: marshalled asynchronously */
4575struct marshal_cmd_FrontFace
4576{
4577   struct marshal_cmd_base cmd_base;
4578   GLenum mode;
4579};
4580uint32_t
4581_mesa_unmarshal_FrontFace(struct gl_context *ctx, const struct marshal_cmd_FrontFace *cmd, const uint64_t *last)
4582{
4583   GLenum mode = cmd->mode;
4584   CALL_FrontFace(ctx->CurrentServerDispatch, (mode));
4585   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_FrontFace), 8) / 8);
4586   assert (cmd_size == cmd->cmd_base.cmd_size);
4587   return cmd_size;
4588}
4589void GLAPIENTRY
4590_mesa_marshal_FrontFace(GLenum mode)
4591{
4592   GET_CURRENT_CONTEXT(ctx);
4593   int cmd_size = sizeof(struct marshal_cmd_FrontFace);
4594   struct marshal_cmd_FrontFace *cmd;
4595   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_FrontFace, cmd_size);
4596   cmd->mode = mode;
4597}
4598
4599
4600/* Hint: marshalled asynchronously */
4601struct marshal_cmd_Hint
4602{
4603   struct marshal_cmd_base cmd_base;
4604   GLenum target;
4605   GLenum mode;
4606};
4607uint32_t
4608_mesa_unmarshal_Hint(struct gl_context *ctx, const struct marshal_cmd_Hint *cmd, const uint64_t *last)
4609{
4610   GLenum target = cmd->target;
4611   GLenum mode = cmd->mode;
4612   CALL_Hint(ctx->CurrentServerDispatch, (target, mode));
4613   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Hint), 8) / 8);
4614   assert (cmd_size == cmd->cmd_base.cmd_size);
4615   return cmd_size;
4616}
4617void GLAPIENTRY
4618_mesa_marshal_Hint(GLenum target, GLenum mode)
4619{
4620   GET_CURRENT_CONTEXT(ctx);
4621   int cmd_size = sizeof(struct marshal_cmd_Hint);
4622   struct marshal_cmd_Hint *cmd;
4623   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Hint, cmd_size);
4624   cmd->target = target;
4625   cmd->mode = mode;
4626}
4627
4628
4629/* Lightf: marshalled asynchronously */
4630struct marshal_cmd_Lightf
4631{
4632   struct marshal_cmd_base cmd_base;
4633   GLenum light;
4634   GLenum pname;
4635   GLfloat param;
4636};
4637uint32_t
4638_mesa_unmarshal_Lightf(struct gl_context *ctx, const struct marshal_cmd_Lightf *cmd, const uint64_t *last)
4639{
4640   GLenum light = cmd->light;
4641   GLenum pname = cmd->pname;
4642   GLfloat param = cmd->param;
4643   CALL_Lightf(ctx->CurrentServerDispatch, (light, pname, param));
4644   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Lightf), 8) / 8);
4645   assert (cmd_size == cmd->cmd_base.cmd_size);
4646   return cmd_size;
4647}
4648void GLAPIENTRY
4649_mesa_marshal_Lightf(GLenum light, GLenum pname, GLfloat param)
4650{
4651   GET_CURRENT_CONTEXT(ctx);
4652   int cmd_size = sizeof(struct marshal_cmd_Lightf);
4653   struct marshal_cmd_Lightf *cmd;
4654   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Lightf, cmd_size);
4655   cmd->light = light;
4656   cmd->pname = pname;
4657   cmd->param = param;
4658}
4659
4660
4661/* Lightfv: marshalled asynchronously */
4662struct marshal_cmd_Lightfv
4663{
4664   struct marshal_cmd_base cmd_base;
4665   GLenum light;
4666   GLenum pname;
4667   /* Next safe_mul(_mesa_light_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat params[None] */
4668};
4669uint32_t
4670_mesa_unmarshal_Lightfv(struct gl_context *ctx, const struct marshal_cmd_Lightfv *cmd, const uint64_t *last)
4671{
4672   GLenum light = cmd->light;
4673   GLenum pname = cmd->pname;
4674   GLfloat * params;
4675   const char *variable_data = (const char *) (cmd + 1);
4676   params = (GLfloat *) variable_data;
4677   CALL_Lightfv(ctx->CurrentServerDispatch, (light, pname, params));
4678   return cmd->cmd_base.cmd_size;
4679}
4680void GLAPIENTRY
4681_mesa_marshal_Lightfv(GLenum light, GLenum pname, const GLfloat * params)
4682{
4683   GET_CURRENT_CONTEXT(ctx);
4684   int params_size = safe_mul(_mesa_light_enum_to_count(pname), 1 * sizeof(GLfloat));
4685   int cmd_size = sizeof(struct marshal_cmd_Lightfv) + params_size;
4686   struct marshal_cmd_Lightfv *cmd;
4687   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
4688      _mesa_glthread_finish_before(ctx, "Lightfv");
4689      CALL_Lightfv(ctx->CurrentServerDispatch, (light, pname, params));
4690      return;
4691   }
4692   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Lightfv, cmd_size);
4693   cmd->light = light;
4694   cmd->pname = pname;
4695   char *variable_data = (char *) (cmd + 1);
4696   memcpy(variable_data, params, params_size);
4697}
4698
4699
4700/* Lighti: marshalled asynchronously */
4701struct marshal_cmd_Lighti
4702{
4703   struct marshal_cmd_base cmd_base;
4704   GLenum light;
4705   GLenum pname;
4706   GLint param;
4707};
4708uint32_t
4709_mesa_unmarshal_Lighti(struct gl_context *ctx, const struct marshal_cmd_Lighti *cmd, const uint64_t *last)
4710{
4711   GLenum light = cmd->light;
4712   GLenum pname = cmd->pname;
4713   GLint param = cmd->param;
4714   CALL_Lighti(ctx->CurrentServerDispatch, (light, pname, param));
4715   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Lighti), 8) / 8);
4716   assert (cmd_size == cmd->cmd_base.cmd_size);
4717   return cmd_size;
4718}
4719void GLAPIENTRY
4720_mesa_marshal_Lighti(GLenum light, GLenum pname, GLint param)
4721{
4722   GET_CURRENT_CONTEXT(ctx);
4723   int cmd_size = sizeof(struct marshal_cmd_Lighti);
4724   struct marshal_cmd_Lighti *cmd;
4725   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Lighti, cmd_size);
4726   cmd->light = light;
4727   cmd->pname = pname;
4728   cmd->param = param;
4729}
4730
4731
4732/* Lightiv: marshalled asynchronously */
4733struct marshal_cmd_Lightiv
4734{
4735   struct marshal_cmd_base cmd_base;
4736   GLenum light;
4737   GLenum pname;
4738   /* Next safe_mul(_mesa_light_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint params[None] */
4739};
4740uint32_t
4741_mesa_unmarshal_Lightiv(struct gl_context *ctx, const struct marshal_cmd_Lightiv *cmd, const uint64_t *last)
4742{
4743   GLenum light = cmd->light;
4744   GLenum pname = cmd->pname;
4745   GLint * params;
4746   const char *variable_data = (const char *) (cmd + 1);
4747   params = (GLint *) variable_data;
4748   CALL_Lightiv(ctx->CurrentServerDispatch, (light, pname, params));
4749   return cmd->cmd_base.cmd_size;
4750}
4751void GLAPIENTRY
4752_mesa_marshal_Lightiv(GLenum light, GLenum pname, const GLint * params)
4753{
4754   GET_CURRENT_CONTEXT(ctx);
4755   int params_size = safe_mul(_mesa_light_enum_to_count(pname), 1 * sizeof(GLint));
4756   int cmd_size = sizeof(struct marshal_cmd_Lightiv) + params_size;
4757   struct marshal_cmd_Lightiv *cmd;
4758   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
4759      _mesa_glthread_finish_before(ctx, "Lightiv");
4760      CALL_Lightiv(ctx->CurrentServerDispatch, (light, pname, params));
4761      return;
4762   }
4763   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Lightiv, cmd_size);
4764   cmd->light = light;
4765   cmd->pname = pname;
4766   char *variable_data = (char *) (cmd + 1);
4767   memcpy(variable_data, params, params_size);
4768}
4769
4770
4771/* LightModelf: marshalled asynchronously */
4772struct marshal_cmd_LightModelf
4773{
4774   struct marshal_cmd_base cmd_base;
4775   GLenum pname;
4776   GLfloat param;
4777};
4778uint32_t
4779_mesa_unmarshal_LightModelf(struct gl_context *ctx, const struct marshal_cmd_LightModelf *cmd, const uint64_t *last)
4780{
4781   GLenum pname = cmd->pname;
4782   GLfloat param = cmd->param;
4783   CALL_LightModelf(ctx->CurrentServerDispatch, (pname, param));
4784   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_LightModelf), 8) / 8);
4785   assert (cmd_size == cmd->cmd_base.cmd_size);
4786   return cmd_size;
4787}
4788void GLAPIENTRY
4789_mesa_marshal_LightModelf(GLenum pname, GLfloat param)
4790{
4791   GET_CURRENT_CONTEXT(ctx);
4792   int cmd_size = sizeof(struct marshal_cmd_LightModelf);
4793   struct marshal_cmd_LightModelf *cmd;
4794   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_LightModelf, cmd_size);
4795   cmd->pname = pname;
4796   cmd->param = param;
4797}
4798
4799
4800/* LightModelfv: marshalled asynchronously */
4801struct marshal_cmd_LightModelfv
4802{
4803   struct marshal_cmd_base cmd_base;
4804   GLenum pname;
4805   /* Next safe_mul(_mesa_light_model_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat params[None] */
4806};
4807uint32_t
4808_mesa_unmarshal_LightModelfv(struct gl_context *ctx, const struct marshal_cmd_LightModelfv *cmd, const uint64_t *last)
4809{
4810   GLenum pname = cmd->pname;
4811   GLfloat * params;
4812   const char *variable_data = (const char *) (cmd + 1);
4813   params = (GLfloat *) variable_data;
4814   CALL_LightModelfv(ctx->CurrentServerDispatch, (pname, params));
4815   return cmd->cmd_base.cmd_size;
4816}
4817void GLAPIENTRY
4818_mesa_marshal_LightModelfv(GLenum pname, const GLfloat * params)
4819{
4820   GET_CURRENT_CONTEXT(ctx);
4821   int params_size = safe_mul(_mesa_light_model_enum_to_count(pname), 1 * sizeof(GLfloat));
4822   int cmd_size = sizeof(struct marshal_cmd_LightModelfv) + params_size;
4823   struct marshal_cmd_LightModelfv *cmd;
4824   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
4825      _mesa_glthread_finish_before(ctx, "LightModelfv");
4826      CALL_LightModelfv(ctx->CurrentServerDispatch, (pname, params));
4827      return;
4828   }
4829   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_LightModelfv, cmd_size);
4830   cmd->pname = pname;
4831   char *variable_data = (char *) (cmd + 1);
4832   memcpy(variable_data, params, params_size);
4833}
4834
4835
4836/* LightModeli: marshalled asynchronously */
4837struct marshal_cmd_LightModeli
4838{
4839   struct marshal_cmd_base cmd_base;
4840   GLenum pname;
4841   GLint param;
4842};
4843uint32_t
4844_mesa_unmarshal_LightModeli(struct gl_context *ctx, const struct marshal_cmd_LightModeli *cmd, const uint64_t *last)
4845{
4846   GLenum pname = cmd->pname;
4847   GLint param = cmd->param;
4848   CALL_LightModeli(ctx->CurrentServerDispatch, (pname, param));
4849   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_LightModeli), 8) / 8);
4850   assert (cmd_size == cmd->cmd_base.cmd_size);
4851   return cmd_size;
4852}
4853void GLAPIENTRY
4854_mesa_marshal_LightModeli(GLenum pname, GLint param)
4855{
4856   GET_CURRENT_CONTEXT(ctx);
4857   int cmd_size = sizeof(struct marshal_cmd_LightModeli);
4858   struct marshal_cmd_LightModeli *cmd;
4859   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_LightModeli, cmd_size);
4860   cmd->pname = pname;
4861   cmd->param = param;
4862}
4863
4864
4865/* LightModeliv: marshalled asynchronously */
4866struct marshal_cmd_LightModeliv
4867{
4868   struct marshal_cmd_base cmd_base;
4869   GLenum pname;
4870   /* Next safe_mul(_mesa_light_model_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint params[None] */
4871};
4872uint32_t
4873_mesa_unmarshal_LightModeliv(struct gl_context *ctx, const struct marshal_cmd_LightModeliv *cmd, const uint64_t *last)
4874{
4875   GLenum pname = cmd->pname;
4876   GLint * params;
4877   const char *variable_data = (const char *) (cmd + 1);
4878   params = (GLint *) variable_data;
4879   CALL_LightModeliv(ctx->CurrentServerDispatch, (pname, params));
4880   return cmd->cmd_base.cmd_size;
4881}
4882void GLAPIENTRY
4883_mesa_marshal_LightModeliv(GLenum pname, const GLint * params)
4884{
4885   GET_CURRENT_CONTEXT(ctx);
4886   int params_size = safe_mul(_mesa_light_model_enum_to_count(pname), 1 * sizeof(GLint));
4887   int cmd_size = sizeof(struct marshal_cmd_LightModeliv) + params_size;
4888   struct marshal_cmd_LightModeliv *cmd;
4889   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
4890      _mesa_glthread_finish_before(ctx, "LightModeliv");
4891      CALL_LightModeliv(ctx->CurrentServerDispatch, (pname, params));
4892      return;
4893   }
4894   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_LightModeliv, cmd_size);
4895   cmd->pname = pname;
4896   char *variable_data = (char *) (cmd + 1);
4897   memcpy(variable_data, params, params_size);
4898}
4899
4900
4901/* LineStipple: marshalled asynchronously */
4902struct marshal_cmd_LineStipple
4903{
4904   struct marshal_cmd_base cmd_base;
4905   GLushort pattern;
4906   GLint factor;
4907};
4908uint32_t
4909_mesa_unmarshal_LineStipple(struct gl_context *ctx, const struct marshal_cmd_LineStipple *cmd, const uint64_t *last)
4910{
4911   GLint factor = cmd->factor;
4912   GLushort pattern = cmd->pattern;
4913   CALL_LineStipple(ctx->CurrentServerDispatch, (factor, pattern));
4914   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_LineStipple), 8) / 8);
4915   assert (cmd_size == cmd->cmd_base.cmd_size);
4916   return cmd_size;
4917}
4918void GLAPIENTRY
4919_mesa_marshal_LineStipple(GLint factor, GLushort pattern)
4920{
4921   GET_CURRENT_CONTEXT(ctx);
4922   int cmd_size = sizeof(struct marshal_cmd_LineStipple);
4923   struct marshal_cmd_LineStipple *cmd;
4924   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_LineStipple, cmd_size);
4925   cmd->factor = factor;
4926   cmd->pattern = pattern;
4927}
4928
4929
4930/* LineWidth: marshalled asynchronously */
4931struct marshal_cmd_LineWidth
4932{
4933   struct marshal_cmd_base cmd_base;
4934   GLfloat width;
4935};
4936uint32_t
4937_mesa_unmarshal_LineWidth(struct gl_context *ctx, const struct marshal_cmd_LineWidth *cmd, const uint64_t *last)
4938{
4939   GLfloat width = cmd->width;
4940   CALL_LineWidth(ctx->CurrentServerDispatch, (width));
4941   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_LineWidth), 8) / 8);
4942   assert (cmd_size == cmd->cmd_base.cmd_size);
4943   return cmd_size;
4944}
4945void GLAPIENTRY
4946_mesa_marshal_LineWidth(GLfloat width)
4947{
4948   GET_CURRENT_CONTEXT(ctx);
4949   int cmd_size = sizeof(struct marshal_cmd_LineWidth);
4950   struct marshal_cmd_LineWidth *cmd;
4951   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_LineWidth, cmd_size);
4952   cmd->width = width;
4953}
4954
4955
4956/* Materialf: marshalled asynchronously */
4957struct marshal_cmd_Materialf
4958{
4959   struct marshal_cmd_base cmd_base;
4960   GLenum face;
4961   GLenum pname;
4962   GLfloat param;
4963};
4964uint32_t
4965_mesa_unmarshal_Materialf(struct gl_context *ctx, const struct marshal_cmd_Materialf *cmd, const uint64_t *last)
4966{
4967   GLenum face = cmd->face;
4968   GLenum pname = cmd->pname;
4969   GLfloat param = cmd->param;
4970   CALL_Materialf(ctx->CurrentServerDispatch, (face, pname, param));
4971   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Materialf), 8) / 8);
4972   assert (cmd_size == cmd->cmd_base.cmd_size);
4973   return cmd_size;
4974}
4975void GLAPIENTRY
4976_mesa_marshal_Materialf(GLenum face, GLenum pname, GLfloat param)
4977{
4978   GET_CURRENT_CONTEXT(ctx);
4979   int cmd_size = sizeof(struct marshal_cmd_Materialf);
4980   struct marshal_cmd_Materialf *cmd;
4981   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Materialf, cmd_size);
4982   cmd->face = face;
4983   cmd->pname = pname;
4984   cmd->param = param;
4985}
4986
4987
4988/* Materialfv: marshalled asynchronously */
4989struct marshal_cmd_Materialfv
4990{
4991   struct marshal_cmd_base cmd_base;
4992   GLenum face;
4993   GLenum pname;
4994   /* Next safe_mul(_mesa_material_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat params[None] */
4995};
4996uint32_t
4997_mesa_unmarshal_Materialfv(struct gl_context *ctx, const struct marshal_cmd_Materialfv *cmd, const uint64_t *last)
4998{
4999   GLenum face = cmd->face;
5000   GLenum pname = cmd->pname;
5001   GLfloat * params;
5002   const char *variable_data = (const char *) (cmd + 1);
5003   params = (GLfloat *) variable_data;
5004   CALL_Materialfv(ctx->CurrentServerDispatch, (face, pname, params));
5005   return cmd->cmd_base.cmd_size;
5006}
5007void GLAPIENTRY
5008_mesa_marshal_Materialfv(GLenum face, GLenum pname, const GLfloat * params)
5009{
5010   GET_CURRENT_CONTEXT(ctx);
5011   int params_size = safe_mul(_mesa_material_enum_to_count(pname), 1 * sizeof(GLfloat));
5012   int cmd_size = sizeof(struct marshal_cmd_Materialfv) + params_size;
5013   struct marshal_cmd_Materialfv *cmd;
5014   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
5015      _mesa_glthread_finish_before(ctx, "Materialfv");
5016      CALL_Materialfv(ctx->CurrentServerDispatch, (face, pname, params));
5017      return;
5018   }
5019   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Materialfv, cmd_size);
5020   cmd->face = face;
5021   cmd->pname = pname;
5022   char *variable_data = (char *) (cmd + 1);
5023   memcpy(variable_data, params, params_size);
5024}
5025
5026
5027/* Materiali: marshalled asynchronously */
5028struct marshal_cmd_Materiali
5029{
5030   struct marshal_cmd_base cmd_base;
5031   GLenum face;
5032   GLenum pname;
5033   GLint param;
5034};
5035uint32_t
5036_mesa_unmarshal_Materiali(struct gl_context *ctx, const struct marshal_cmd_Materiali *cmd, const uint64_t *last)
5037{
5038   GLenum face = cmd->face;
5039   GLenum pname = cmd->pname;
5040   GLint param = cmd->param;
5041   CALL_Materiali(ctx->CurrentServerDispatch, (face, pname, param));
5042   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Materiali), 8) / 8);
5043   assert (cmd_size == cmd->cmd_base.cmd_size);
5044   return cmd_size;
5045}
5046void GLAPIENTRY
5047_mesa_marshal_Materiali(GLenum face, GLenum pname, GLint param)
5048{
5049   GET_CURRENT_CONTEXT(ctx);
5050   int cmd_size = sizeof(struct marshal_cmd_Materiali);
5051   struct marshal_cmd_Materiali *cmd;
5052   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Materiali, cmd_size);
5053   cmd->face = face;
5054   cmd->pname = pname;
5055   cmd->param = param;
5056}
5057
5058
5059/* Materialiv: marshalled asynchronously */
5060struct marshal_cmd_Materialiv
5061{
5062   struct marshal_cmd_base cmd_base;
5063   GLenum face;
5064   GLenum pname;
5065   /* Next safe_mul(_mesa_material_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint params[None] */
5066};
5067uint32_t
5068_mesa_unmarshal_Materialiv(struct gl_context *ctx, const struct marshal_cmd_Materialiv *cmd, const uint64_t *last)
5069{
5070   GLenum face = cmd->face;
5071   GLenum pname = cmd->pname;
5072   GLint * params;
5073   const char *variable_data = (const char *) (cmd + 1);
5074   params = (GLint *) variable_data;
5075   CALL_Materialiv(ctx->CurrentServerDispatch, (face, pname, params));
5076   return cmd->cmd_base.cmd_size;
5077}
5078void GLAPIENTRY
5079_mesa_marshal_Materialiv(GLenum face, GLenum pname, const GLint * params)
5080{
5081   GET_CURRENT_CONTEXT(ctx);
5082   int params_size = safe_mul(_mesa_material_enum_to_count(pname), 1 * sizeof(GLint));
5083   int cmd_size = sizeof(struct marshal_cmd_Materialiv) + params_size;
5084   struct marshal_cmd_Materialiv *cmd;
5085   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
5086      _mesa_glthread_finish_before(ctx, "Materialiv");
5087      CALL_Materialiv(ctx->CurrentServerDispatch, (face, pname, params));
5088      return;
5089   }
5090   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Materialiv, cmd_size);
5091   cmd->face = face;
5092   cmd->pname = pname;
5093   char *variable_data = (char *) (cmd + 1);
5094   memcpy(variable_data, params, params_size);
5095}
5096
5097
5098/* PointSize: marshalled asynchronously */
5099struct marshal_cmd_PointSize
5100{
5101   struct marshal_cmd_base cmd_base;
5102   GLfloat size;
5103};
5104uint32_t
5105_mesa_unmarshal_PointSize(struct gl_context *ctx, const struct marshal_cmd_PointSize *cmd, const uint64_t *last)
5106{
5107   GLfloat size = cmd->size;
5108   CALL_PointSize(ctx->CurrentServerDispatch, (size));
5109   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PointSize), 8) / 8);
5110   assert (cmd_size == cmd->cmd_base.cmd_size);
5111   return cmd_size;
5112}
5113void GLAPIENTRY
5114_mesa_marshal_PointSize(GLfloat size)
5115{
5116   GET_CURRENT_CONTEXT(ctx);
5117   int cmd_size = sizeof(struct marshal_cmd_PointSize);
5118   struct marshal_cmd_PointSize *cmd;
5119   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PointSize, cmd_size);
5120   cmd->size = size;
5121}
5122
5123
5124/* PolygonMode: marshalled asynchronously */
5125struct marshal_cmd_PolygonMode
5126{
5127   struct marshal_cmd_base cmd_base;
5128   GLenum face;
5129   GLenum mode;
5130};
5131uint32_t
5132_mesa_unmarshal_PolygonMode(struct gl_context *ctx, const struct marshal_cmd_PolygonMode *cmd, const uint64_t *last)
5133{
5134   GLenum face = cmd->face;
5135   GLenum mode = cmd->mode;
5136   CALL_PolygonMode(ctx->CurrentServerDispatch, (face, mode));
5137   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PolygonMode), 8) / 8);
5138   assert (cmd_size == cmd->cmd_base.cmd_size);
5139   return cmd_size;
5140}
5141void GLAPIENTRY
5142_mesa_marshal_PolygonMode(GLenum face, GLenum mode)
5143{
5144   GET_CURRENT_CONTEXT(ctx);
5145   int cmd_size = sizeof(struct marshal_cmd_PolygonMode);
5146   struct marshal_cmd_PolygonMode *cmd;
5147   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PolygonMode, cmd_size);
5148   cmd->face = face;
5149   cmd->mode = mode;
5150}
5151
5152
5153/* PolygonStipple: marshalled asynchronously */
5154struct marshal_cmd_PolygonStipple
5155{
5156   struct marshal_cmd_base cmd_base;
5157   const GLubyte * mask;
5158};
5159uint32_t
5160_mesa_unmarshal_PolygonStipple(struct gl_context *ctx, const struct marshal_cmd_PolygonStipple *cmd, const uint64_t *last)
5161{
5162   const GLubyte * mask = cmd->mask;
5163   CALL_PolygonStipple(ctx->CurrentServerDispatch, (mask));
5164   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PolygonStipple), 8) / 8);
5165   assert (cmd_size == cmd->cmd_base.cmd_size);
5166   return cmd_size;
5167}
5168void GLAPIENTRY
5169_mesa_marshal_PolygonStipple(const GLubyte * mask)
5170{
5171   GET_CURRENT_CONTEXT(ctx);
5172   int cmd_size = sizeof(struct marshal_cmd_PolygonStipple);
5173   struct marshal_cmd_PolygonStipple *cmd;
5174   if (_mesa_glthread_has_no_unpack_buffer(ctx)) {
5175      _mesa_glthread_finish_before(ctx, "PolygonStipple");
5176      CALL_PolygonStipple(ctx->CurrentServerDispatch, (mask));
5177      return;
5178   }
5179   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PolygonStipple, cmd_size);
5180   cmd->mask = mask;
5181}
5182
5183
5184/* Scissor: marshalled asynchronously */
5185struct marshal_cmd_Scissor
5186{
5187   struct marshal_cmd_base cmd_base;
5188   GLint x;
5189   GLint y;
5190   GLsizei width;
5191   GLsizei height;
5192};
5193uint32_t
5194_mesa_unmarshal_Scissor(struct gl_context *ctx, const struct marshal_cmd_Scissor *cmd, const uint64_t *last)
5195{
5196   GLint x = cmd->x;
5197   GLint y = cmd->y;
5198   GLsizei width = cmd->width;
5199   GLsizei height = cmd->height;
5200   CALL_Scissor(ctx->CurrentServerDispatch, (x, y, width, height));
5201   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Scissor), 8) / 8);
5202   assert (cmd_size == cmd->cmd_base.cmd_size);
5203   return cmd_size;
5204}
5205void GLAPIENTRY
5206_mesa_marshal_Scissor(GLint x, GLint y, GLsizei width, GLsizei height)
5207{
5208   GET_CURRENT_CONTEXT(ctx);
5209   int cmd_size = sizeof(struct marshal_cmd_Scissor);
5210   struct marshal_cmd_Scissor *cmd;
5211   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Scissor, cmd_size);
5212   cmd->x = x;
5213   cmd->y = y;
5214   cmd->width = width;
5215   cmd->height = height;
5216}
5217
5218
5219/* ShadeModel: marshalled asynchronously */
5220struct marshal_cmd_ShadeModel
5221{
5222   struct marshal_cmd_base cmd_base;
5223   GLenum mode;
5224};
5225uint32_t
5226_mesa_unmarshal_ShadeModel(struct gl_context *ctx, const struct marshal_cmd_ShadeModel *cmd, const uint64_t *last)
5227{
5228   GLenum mode = cmd->mode;
5229   CALL_ShadeModel(ctx->CurrentServerDispatch, (mode));
5230   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ShadeModel), 8) / 8);
5231   assert (cmd_size == cmd->cmd_base.cmd_size);
5232   return cmd_size;
5233}
5234void GLAPIENTRY
5235_mesa_marshal_ShadeModel(GLenum mode)
5236{
5237   GET_CURRENT_CONTEXT(ctx);
5238   int cmd_size = sizeof(struct marshal_cmd_ShadeModel);
5239   struct marshal_cmd_ShadeModel *cmd;
5240   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ShadeModel, cmd_size);
5241   cmd->mode = mode;
5242}
5243
5244
5245/* TexParameterf: marshalled asynchronously */
5246struct marshal_cmd_TexParameterf
5247{
5248   struct marshal_cmd_base cmd_base;
5249   GLenum target;
5250   GLenum pname;
5251   GLfloat param;
5252};
5253uint32_t
5254_mesa_unmarshal_TexParameterf(struct gl_context *ctx, const struct marshal_cmd_TexParameterf *cmd, const uint64_t *last)
5255{
5256   GLenum target = cmd->target;
5257   GLenum pname = cmd->pname;
5258   GLfloat param = cmd->param;
5259   CALL_TexParameterf(ctx->CurrentServerDispatch, (target, pname, param));
5260   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexParameterf), 8) / 8);
5261   assert (cmd_size == cmd->cmd_base.cmd_size);
5262   return cmd_size;
5263}
5264void GLAPIENTRY
5265_mesa_marshal_TexParameterf(GLenum target, GLenum pname, GLfloat param)
5266{
5267   GET_CURRENT_CONTEXT(ctx);
5268   int cmd_size = sizeof(struct marshal_cmd_TexParameterf);
5269   struct marshal_cmd_TexParameterf *cmd;
5270   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexParameterf, cmd_size);
5271   cmd->target = target;
5272   cmd->pname = pname;
5273   cmd->param = param;
5274}
5275
5276
5277/* TexParameterfv: marshalled asynchronously */
5278struct marshal_cmd_TexParameterfv
5279{
5280   struct marshal_cmd_base cmd_base;
5281   GLenum target;
5282   GLenum pname;
5283   /* Next safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat params[None] */
5284};
5285uint32_t
5286_mesa_unmarshal_TexParameterfv(struct gl_context *ctx, const struct marshal_cmd_TexParameterfv *cmd, const uint64_t *last)
5287{
5288   GLenum target = cmd->target;
5289   GLenum pname = cmd->pname;
5290   GLfloat * params;
5291   const char *variable_data = (const char *) (cmd + 1);
5292   params = (GLfloat *) variable_data;
5293   CALL_TexParameterfv(ctx->CurrentServerDispatch, (target, pname, params));
5294   return cmd->cmd_base.cmd_size;
5295}
5296void GLAPIENTRY
5297_mesa_marshal_TexParameterfv(GLenum target, GLenum pname, const GLfloat * params)
5298{
5299   GET_CURRENT_CONTEXT(ctx);
5300   int params_size = safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLfloat));
5301   int cmd_size = sizeof(struct marshal_cmd_TexParameterfv) + params_size;
5302   struct marshal_cmd_TexParameterfv *cmd;
5303   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
5304      _mesa_glthread_finish_before(ctx, "TexParameterfv");
5305      CALL_TexParameterfv(ctx->CurrentServerDispatch, (target, pname, params));
5306      return;
5307   }
5308   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexParameterfv, cmd_size);
5309   cmd->target = target;
5310   cmd->pname = pname;
5311   char *variable_data = (char *) (cmd + 1);
5312   memcpy(variable_data, params, params_size);
5313}
5314
5315
5316/* TexParameteri: marshalled asynchronously */
5317struct marshal_cmd_TexParameteri
5318{
5319   struct marshal_cmd_base cmd_base;
5320   GLenum target;
5321   GLenum pname;
5322   GLint param;
5323};
5324uint32_t
5325_mesa_unmarshal_TexParameteri(struct gl_context *ctx, const struct marshal_cmd_TexParameteri *cmd, const uint64_t *last)
5326{
5327   GLenum target = cmd->target;
5328   GLenum pname = cmd->pname;
5329   GLint param = cmd->param;
5330   CALL_TexParameteri(ctx->CurrentServerDispatch, (target, pname, param));
5331   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexParameteri), 8) / 8);
5332   assert (cmd_size == cmd->cmd_base.cmd_size);
5333   return cmd_size;
5334}
5335void GLAPIENTRY
5336_mesa_marshal_TexParameteri(GLenum target, GLenum pname, GLint param)
5337{
5338   GET_CURRENT_CONTEXT(ctx);
5339   int cmd_size = sizeof(struct marshal_cmd_TexParameteri);
5340   struct marshal_cmd_TexParameteri *cmd;
5341   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexParameteri, cmd_size);
5342   cmd->target = target;
5343   cmd->pname = pname;
5344   cmd->param = param;
5345}
5346
5347
5348/* TexParameteriv: marshalled asynchronously */
5349struct marshal_cmd_TexParameteriv
5350{
5351   struct marshal_cmd_base cmd_base;
5352   GLenum target;
5353   GLenum pname;
5354   /* Next safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint params[None] */
5355};
5356uint32_t
5357_mesa_unmarshal_TexParameteriv(struct gl_context *ctx, const struct marshal_cmd_TexParameteriv *cmd, const uint64_t *last)
5358{
5359   GLenum target = cmd->target;
5360   GLenum pname = cmd->pname;
5361   GLint * params;
5362   const char *variable_data = (const char *) (cmd + 1);
5363   params = (GLint *) variable_data;
5364   CALL_TexParameteriv(ctx->CurrentServerDispatch, (target, pname, params));
5365   return cmd->cmd_base.cmd_size;
5366}
5367void GLAPIENTRY
5368_mesa_marshal_TexParameteriv(GLenum target, GLenum pname, const GLint * params)
5369{
5370   GET_CURRENT_CONTEXT(ctx);
5371   int params_size = safe_mul(_mesa_tex_param_enum_to_count(pname), 1 * sizeof(GLint));
5372   int cmd_size = sizeof(struct marshal_cmd_TexParameteriv) + params_size;
5373   struct marshal_cmd_TexParameteriv *cmd;
5374   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
5375      _mesa_glthread_finish_before(ctx, "TexParameteriv");
5376      CALL_TexParameteriv(ctx->CurrentServerDispatch, (target, pname, params));
5377      return;
5378   }
5379   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexParameteriv, cmd_size);
5380   cmd->target = target;
5381   cmd->pname = pname;
5382   char *variable_data = (char *) (cmd + 1);
5383   memcpy(variable_data, params, params_size);
5384}
5385
5386
5387/* TexImage1D: marshalled asynchronously */
5388struct marshal_cmd_TexImage1D
5389{
5390   struct marshal_cmd_base cmd_base;
5391   GLenum target;
5392   GLint level;
5393   GLint internalformat;
5394   GLsizei width;
5395   GLint border;
5396   GLenum format;
5397   GLenum type;
5398   const GLvoid * pixels;
5399};
5400uint32_t
5401_mesa_unmarshal_TexImage1D(struct gl_context *ctx, const struct marshal_cmd_TexImage1D *cmd, const uint64_t *last)
5402{
5403   GLenum target = cmd->target;
5404   GLint level = cmd->level;
5405   GLint internalformat = cmd->internalformat;
5406   GLsizei width = cmd->width;
5407   GLint border = cmd->border;
5408   GLenum format = cmd->format;
5409   GLenum type = cmd->type;
5410   const GLvoid * pixels = cmd->pixels;
5411   CALL_TexImage1D(ctx->CurrentServerDispatch, (target, level, internalformat, width, border, format, type, pixels));
5412   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexImage1D), 8) / 8);
5413   assert (cmd_size == cmd->cmd_base.cmd_size);
5414   return cmd_size;
5415}
5416void GLAPIENTRY
5417_mesa_marshal_TexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
5418{
5419   GET_CURRENT_CONTEXT(ctx);
5420   int cmd_size = sizeof(struct marshal_cmd_TexImage1D);
5421   struct marshal_cmd_TexImage1D *cmd;
5422   if (_mesa_glthread_has_no_unpack_buffer(ctx)) {
5423      _mesa_glthread_finish_before(ctx, "TexImage1D");
5424      CALL_TexImage1D(ctx->CurrentServerDispatch, (target, level, internalformat, width, border, format, type, pixels));
5425      return;
5426   }
5427   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexImage1D, cmd_size);
5428   cmd->target = target;
5429   cmd->level = level;
5430   cmd->internalformat = internalformat;
5431   cmd->width = width;
5432   cmd->border = border;
5433   cmd->format = format;
5434   cmd->type = type;
5435   cmd->pixels = pixels;
5436}
5437
5438
5439/* TexImage2D: marshalled asynchronously */
5440struct marshal_cmd_TexImage2D
5441{
5442   struct marshal_cmd_base cmd_base;
5443   GLenum target;
5444   GLint level;
5445   GLint internalformat;
5446   GLsizei width;
5447   GLsizei height;
5448   GLint border;
5449   GLenum format;
5450   GLenum type;
5451   const GLvoid * pixels;
5452};
5453uint32_t
5454_mesa_unmarshal_TexImage2D(struct gl_context *ctx, const struct marshal_cmd_TexImage2D *cmd, const uint64_t *last)
5455{
5456   GLenum target = cmd->target;
5457   GLint level = cmd->level;
5458   GLint internalformat = cmd->internalformat;
5459   GLsizei width = cmd->width;
5460   GLsizei height = cmd->height;
5461   GLint border = cmd->border;
5462   GLenum format = cmd->format;
5463   GLenum type = cmd->type;
5464   const GLvoid * pixels = cmd->pixels;
5465   CALL_TexImage2D(ctx->CurrentServerDispatch, (target, level, internalformat, width, height, border, format, type, pixels));
5466   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexImage2D), 8) / 8);
5467   assert (cmd_size == cmd->cmd_base.cmd_size);
5468   return cmd_size;
5469}
5470void GLAPIENTRY
5471_mesa_marshal_TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels)
5472{
5473   GET_CURRENT_CONTEXT(ctx);
5474   int cmd_size = sizeof(struct marshal_cmd_TexImage2D);
5475   struct marshal_cmd_TexImage2D *cmd;
5476   if (_mesa_glthread_has_no_unpack_buffer(ctx)) {
5477      _mesa_glthread_finish_before(ctx, "TexImage2D");
5478      CALL_TexImage2D(ctx->CurrentServerDispatch, (target, level, internalformat, width, height, border, format, type, pixels));
5479      return;
5480   }
5481   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexImage2D, cmd_size);
5482   cmd->target = target;
5483   cmd->level = level;
5484   cmd->internalformat = internalformat;
5485   cmd->width = width;
5486   cmd->height = height;
5487   cmd->border = border;
5488   cmd->format = format;
5489   cmd->type = type;
5490   cmd->pixels = pixels;
5491}
5492
5493
5494/* TexEnvf: marshalled asynchronously */
5495struct marshal_cmd_TexEnvf
5496{
5497   struct marshal_cmd_base cmd_base;
5498   GLenum target;
5499   GLenum pname;
5500   GLfloat param;
5501};
5502uint32_t
5503_mesa_unmarshal_TexEnvf(struct gl_context *ctx, const struct marshal_cmd_TexEnvf *cmd, const uint64_t *last)
5504{
5505   GLenum target = cmd->target;
5506   GLenum pname = cmd->pname;
5507   GLfloat param = cmd->param;
5508   CALL_TexEnvf(ctx->CurrentServerDispatch, (target, pname, param));
5509   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexEnvf), 8) / 8);
5510   assert (cmd_size == cmd->cmd_base.cmd_size);
5511   return cmd_size;
5512}
5513void GLAPIENTRY
5514_mesa_marshal_TexEnvf(GLenum target, GLenum pname, GLfloat param)
5515{
5516   GET_CURRENT_CONTEXT(ctx);
5517   int cmd_size = sizeof(struct marshal_cmd_TexEnvf);
5518   struct marshal_cmd_TexEnvf *cmd;
5519   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexEnvf, cmd_size);
5520   cmd->target = target;
5521   cmd->pname = pname;
5522   cmd->param = param;
5523}
5524
5525
5526/* TexEnvfv: marshalled asynchronously */
5527struct marshal_cmd_TexEnvfv
5528{
5529   struct marshal_cmd_base cmd_base;
5530   GLenum target;
5531   GLenum pname;
5532   /* Next safe_mul(_mesa_texenv_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat params[None] */
5533};
5534uint32_t
5535_mesa_unmarshal_TexEnvfv(struct gl_context *ctx, const struct marshal_cmd_TexEnvfv *cmd, const uint64_t *last)
5536{
5537   GLenum target = cmd->target;
5538   GLenum pname = cmd->pname;
5539   GLfloat * params;
5540   const char *variable_data = (const char *) (cmd + 1);
5541   params = (GLfloat *) variable_data;
5542   CALL_TexEnvfv(ctx->CurrentServerDispatch, (target, pname, params));
5543   return cmd->cmd_base.cmd_size;
5544}
5545void GLAPIENTRY
5546_mesa_marshal_TexEnvfv(GLenum target, GLenum pname, const GLfloat * params)
5547{
5548   GET_CURRENT_CONTEXT(ctx);
5549   int params_size = safe_mul(_mesa_texenv_enum_to_count(pname), 1 * sizeof(GLfloat));
5550   int cmd_size = sizeof(struct marshal_cmd_TexEnvfv) + params_size;
5551   struct marshal_cmd_TexEnvfv *cmd;
5552   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
5553      _mesa_glthread_finish_before(ctx, "TexEnvfv");
5554      CALL_TexEnvfv(ctx->CurrentServerDispatch, (target, pname, params));
5555      return;
5556   }
5557   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexEnvfv, cmd_size);
5558   cmd->target = target;
5559   cmd->pname = pname;
5560   char *variable_data = (char *) (cmd + 1);
5561   memcpy(variable_data, params, params_size);
5562}
5563
5564
5565/* TexEnvi: marshalled asynchronously */
5566struct marshal_cmd_TexEnvi
5567{
5568   struct marshal_cmd_base cmd_base;
5569   GLenum target;
5570   GLenum pname;
5571   GLint param;
5572};
5573uint32_t
5574_mesa_unmarshal_TexEnvi(struct gl_context *ctx, const struct marshal_cmd_TexEnvi *cmd, const uint64_t *last)
5575{
5576   GLenum target = cmd->target;
5577   GLenum pname = cmd->pname;
5578   GLint param = cmd->param;
5579   CALL_TexEnvi(ctx->CurrentServerDispatch, (target, pname, param));
5580   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexEnvi), 8) / 8);
5581   assert (cmd_size == cmd->cmd_base.cmd_size);
5582   return cmd_size;
5583}
5584void GLAPIENTRY
5585_mesa_marshal_TexEnvi(GLenum target, GLenum pname, GLint param)
5586{
5587   GET_CURRENT_CONTEXT(ctx);
5588   int cmd_size = sizeof(struct marshal_cmd_TexEnvi);
5589   struct marshal_cmd_TexEnvi *cmd;
5590   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexEnvi, cmd_size);
5591   cmd->target = target;
5592   cmd->pname = pname;
5593   cmd->param = param;
5594}
5595
5596
5597/* TexEnviv: marshalled asynchronously */
5598struct marshal_cmd_TexEnviv
5599{
5600   struct marshal_cmd_base cmd_base;
5601   GLenum target;
5602   GLenum pname;
5603   /* Next safe_mul(_mesa_texenv_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint params[None] */
5604};
5605uint32_t
5606_mesa_unmarshal_TexEnviv(struct gl_context *ctx, const struct marshal_cmd_TexEnviv *cmd, const uint64_t *last)
5607{
5608   GLenum target = cmd->target;
5609   GLenum pname = cmd->pname;
5610   GLint * params;
5611   const char *variable_data = (const char *) (cmd + 1);
5612   params = (GLint *) variable_data;
5613   CALL_TexEnviv(ctx->CurrentServerDispatch, (target, pname, params));
5614   return cmd->cmd_base.cmd_size;
5615}
5616void GLAPIENTRY
5617_mesa_marshal_TexEnviv(GLenum target, GLenum pname, const GLint * params)
5618{
5619   GET_CURRENT_CONTEXT(ctx);
5620   int params_size = safe_mul(_mesa_texenv_enum_to_count(pname), 1 * sizeof(GLint));
5621   int cmd_size = sizeof(struct marshal_cmd_TexEnviv) + params_size;
5622   struct marshal_cmd_TexEnviv *cmd;
5623   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
5624      _mesa_glthread_finish_before(ctx, "TexEnviv");
5625      CALL_TexEnviv(ctx->CurrentServerDispatch, (target, pname, params));
5626      return;
5627   }
5628   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexEnviv, cmd_size);
5629   cmd->target = target;
5630   cmd->pname = pname;
5631   char *variable_data = (char *) (cmd + 1);
5632   memcpy(variable_data, params, params_size);
5633}
5634
5635
5636/* TexGend: marshalled asynchronously */
5637struct marshal_cmd_TexGend
5638{
5639   struct marshal_cmd_base cmd_base;
5640   GLenum coord;
5641   GLenum pname;
5642   GLdouble param;
5643};
5644uint32_t
5645_mesa_unmarshal_TexGend(struct gl_context *ctx, const struct marshal_cmd_TexGend *cmd, const uint64_t *last)
5646{
5647   GLenum coord = cmd->coord;
5648   GLenum pname = cmd->pname;
5649   GLdouble param = cmd->param;
5650   CALL_TexGend(ctx->CurrentServerDispatch, (coord, pname, param));
5651   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexGend), 8) / 8);
5652   assert (cmd_size == cmd->cmd_base.cmd_size);
5653   return cmd_size;
5654}
5655void GLAPIENTRY
5656_mesa_marshal_TexGend(GLenum coord, GLenum pname, GLdouble param)
5657{
5658   GET_CURRENT_CONTEXT(ctx);
5659   int cmd_size = sizeof(struct marshal_cmd_TexGend);
5660   struct marshal_cmd_TexGend *cmd;
5661   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexGend, cmd_size);
5662   cmd->coord = coord;
5663   cmd->pname = pname;
5664   cmd->param = param;
5665}
5666
5667
5668/* TexGendv: marshalled asynchronously */
5669struct marshal_cmd_TexGendv
5670{
5671   struct marshal_cmd_base cmd_base;
5672   GLenum coord;
5673   GLenum pname;
5674   /* Next safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLdouble)) bytes are GLdouble params[None] */
5675};
5676uint32_t
5677_mesa_unmarshal_TexGendv(struct gl_context *ctx, const struct marshal_cmd_TexGendv *cmd, const uint64_t *last)
5678{
5679   GLenum coord = cmd->coord;
5680   GLenum pname = cmd->pname;
5681   GLdouble * params;
5682   const char *variable_data = (const char *) (cmd + 1);
5683   params = (GLdouble *) variable_data;
5684   CALL_TexGendv(ctx->CurrentServerDispatch, (coord, pname, params));
5685   return cmd->cmd_base.cmd_size;
5686}
5687void GLAPIENTRY
5688_mesa_marshal_TexGendv(GLenum coord, GLenum pname, const GLdouble * params)
5689{
5690   GET_CURRENT_CONTEXT(ctx);
5691   int params_size = safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLdouble));
5692   int cmd_size = sizeof(struct marshal_cmd_TexGendv) + params_size;
5693   struct marshal_cmd_TexGendv *cmd;
5694   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
5695      _mesa_glthread_finish_before(ctx, "TexGendv");
5696      CALL_TexGendv(ctx->CurrentServerDispatch, (coord, pname, params));
5697      return;
5698   }
5699   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexGendv, cmd_size);
5700   cmd->coord = coord;
5701   cmd->pname = pname;
5702   char *variable_data = (char *) (cmd + 1);
5703   memcpy(variable_data, params, params_size);
5704}
5705
5706
5707/* TexGenf: marshalled asynchronously */
5708struct marshal_cmd_TexGenf
5709{
5710   struct marshal_cmd_base cmd_base;
5711   GLenum coord;
5712   GLenum pname;
5713   GLfloat param;
5714};
5715uint32_t
5716_mesa_unmarshal_TexGenf(struct gl_context *ctx, const struct marshal_cmd_TexGenf *cmd, const uint64_t *last)
5717{
5718   GLenum coord = cmd->coord;
5719   GLenum pname = cmd->pname;
5720   GLfloat param = cmd->param;
5721   CALL_TexGenf(ctx->CurrentServerDispatch, (coord, pname, param));
5722   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexGenf), 8) / 8);
5723   assert (cmd_size == cmd->cmd_base.cmd_size);
5724   return cmd_size;
5725}
5726void GLAPIENTRY
5727_mesa_marshal_TexGenf(GLenum coord, GLenum pname, GLfloat param)
5728{
5729   GET_CURRENT_CONTEXT(ctx);
5730   int cmd_size = sizeof(struct marshal_cmd_TexGenf);
5731   struct marshal_cmd_TexGenf *cmd;
5732   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexGenf, cmd_size);
5733   cmd->coord = coord;
5734   cmd->pname = pname;
5735   cmd->param = param;
5736}
5737
5738
5739/* TexGenfv: marshalled asynchronously */
5740struct marshal_cmd_TexGenfv
5741{
5742   struct marshal_cmd_base cmd_base;
5743   GLenum coord;
5744   GLenum pname;
5745   /* Next safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLfloat)) bytes are GLfloat params[None] */
5746};
5747uint32_t
5748_mesa_unmarshal_TexGenfv(struct gl_context *ctx, const struct marshal_cmd_TexGenfv *cmd, const uint64_t *last)
5749{
5750   GLenum coord = cmd->coord;
5751   GLenum pname = cmd->pname;
5752   GLfloat * params;
5753   const char *variable_data = (const char *) (cmd + 1);
5754   params = (GLfloat *) variable_data;
5755   CALL_TexGenfv(ctx->CurrentServerDispatch, (coord, pname, params));
5756   return cmd->cmd_base.cmd_size;
5757}
5758void GLAPIENTRY
5759_mesa_marshal_TexGenfv(GLenum coord, GLenum pname, const GLfloat * params)
5760{
5761   GET_CURRENT_CONTEXT(ctx);
5762   int params_size = safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLfloat));
5763   int cmd_size = sizeof(struct marshal_cmd_TexGenfv) + params_size;
5764   struct marshal_cmd_TexGenfv *cmd;
5765   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
5766      _mesa_glthread_finish_before(ctx, "TexGenfv");
5767      CALL_TexGenfv(ctx->CurrentServerDispatch, (coord, pname, params));
5768      return;
5769   }
5770   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexGenfv, cmd_size);
5771   cmd->coord = coord;
5772   cmd->pname = pname;
5773   char *variable_data = (char *) (cmd + 1);
5774   memcpy(variable_data, params, params_size);
5775}
5776
5777
5778/* TexGeni: marshalled asynchronously */
5779struct marshal_cmd_TexGeni
5780{
5781   struct marshal_cmd_base cmd_base;
5782   GLenum coord;
5783   GLenum pname;
5784   GLint param;
5785};
5786uint32_t
5787_mesa_unmarshal_TexGeni(struct gl_context *ctx, const struct marshal_cmd_TexGeni *cmd, const uint64_t *last)
5788{
5789   GLenum coord = cmd->coord;
5790   GLenum pname = cmd->pname;
5791   GLint param = cmd->param;
5792   CALL_TexGeni(ctx->CurrentServerDispatch, (coord, pname, param));
5793   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_TexGeni), 8) / 8);
5794   assert (cmd_size == cmd->cmd_base.cmd_size);
5795   return cmd_size;
5796}
5797void GLAPIENTRY
5798_mesa_marshal_TexGeni(GLenum coord, GLenum pname, GLint param)
5799{
5800   GET_CURRENT_CONTEXT(ctx);
5801   int cmd_size = sizeof(struct marshal_cmd_TexGeni);
5802   struct marshal_cmd_TexGeni *cmd;
5803   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexGeni, cmd_size);
5804   cmd->coord = coord;
5805   cmd->pname = pname;
5806   cmd->param = param;
5807}
5808
5809
5810/* TexGeniv: marshalled asynchronously */
5811struct marshal_cmd_TexGeniv
5812{
5813   struct marshal_cmd_base cmd_base;
5814   GLenum coord;
5815   GLenum pname;
5816   /* Next safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLint)) bytes are GLint params[None] */
5817};
5818uint32_t
5819_mesa_unmarshal_TexGeniv(struct gl_context *ctx, const struct marshal_cmd_TexGeniv *cmd, const uint64_t *last)
5820{
5821   GLenum coord = cmd->coord;
5822   GLenum pname = cmd->pname;
5823   GLint * params;
5824   const char *variable_data = (const char *) (cmd + 1);
5825   params = (GLint *) variable_data;
5826   CALL_TexGeniv(ctx->CurrentServerDispatch, (coord, pname, params));
5827   return cmd->cmd_base.cmd_size;
5828}
5829void GLAPIENTRY
5830_mesa_marshal_TexGeniv(GLenum coord, GLenum pname, const GLint * params)
5831{
5832   GET_CURRENT_CONTEXT(ctx);
5833   int params_size = safe_mul(_mesa_texgen_enum_to_count(pname), 1 * sizeof(GLint));
5834   int cmd_size = sizeof(struct marshal_cmd_TexGeniv) + params_size;
5835   struct marshal_cmd_TexGeniv *cmd;
5836   if (unlikely(params_size < 0 || (params_size > 0 && !params) || (unsigned)cmd_size > MARSHAL_MAX_CMD_SIZE)) {
5837      _mesa_glthread_finish_before(ctx, "TexGeniv");
5838      CALL_TexGeniv(ctx->CurrentServerDispatch, (coord, pname, params));
5839      return;
5840   }
5841   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_TexGeniv, cmd_size);
5842   cmd->coord = coord;
5843   cmd->pname = pname;
5844   char *variable_data = (char *) (cmd + 1);
5845   memcpy(variable_data, params, params_size);
5846}
5847
5848
5849/* FeedbackBuffer: marshalled synchronously */
5850void GLAPIENTRY
5851_mesa_marshal_FeedbackBuffer(GLsizei size, GLenum type, GLfloat * buffer)
5852{
5853   GET_CURRENT_CONTEXT(ctx);
5854   _mesa_glthread_finish_before(ctx, "FeedbackBuffer");
5855   CALL_FeedbackBuffer(ctx->CurrentServerDispatch, (size, type, buffer));
5856}
5857
5858
5859/* SelectBuffer: marshalled synchronously */
5860void GLAPIENTRY
5861_mesa_marshal_SelectBuffer(GLsizei size, GLuint * buffer)
5862{
5863   GET_CURRENT_CONTEXT(ctx);
5864   _mesa_glthread_finish_before(ctx, "SelectBuffer");
5865   CALL_SelectBuffer(ctx->CurrentServerDispatch, (size, buffer));
5866}
5867
5868
5869/* RenderMode: marshalled synchronously */
5870GLint GLAPIENTRY
5871_mesa_marshal_RenderMode(GLenum mode)
5872{
5873   GET_CURRENT_CONTEXT(ctx);
5874   _mesa_glthread_finish_before(ctx, "RenderMode");
5875   return CALL_RenderMode(ctx->CurrentServerDispatch, (mode));
5876}
5877
5878
5879/* InitNames: marshalled asynchronously */
5880struct marshal_cmd_InitNames
5881{
5882   struct marshal_cmd_base cmd_base;
5883};
5884uint32_t
5885_mesa_unmarshal_InitNames(struct gl_context *ctx, const struct marshal_cmd_InitNames *cmd, const uint64_t *last)
5886{
5887   CALL_InitNames(ctx->CurrentServerDispatch, ());
5888   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_InitNames), 8) / 8);
5889   assert (cmd_size == cmd->cmd_base.cmd_size);
5890   return cmd_size;
5891}
5892void GLAPIENTRY
5893_mesa_marshal_InitNames(void)
5894{
5895   GET_CURRENT_CONTEXT(ctx);
5896   int cmd_size = sizeof(struct marshal_cmd_InitNames);
5897   struct marshal_cmd_InitNames *cmd;
5898   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_InitNames, cmd_size);
5899   (void) cmd;
5900}
5901
5902
5903/* LoadName: marshalled asynchronously */
5904struct marshal_cmd_LoadName
5905{
5906   struct marshal_cmd_base cmd_base;
5907   GLuint name;
5908};
5909uint32_t
5910_mesa_unmarshal_LoadName(struct gl_context *ctx, const struct marshal_cmd_LoadName *cmd, const uint64_t *last)
5911{
5912   GLuint name = cmd->name;
5913   CALL_LoadName(ctx->CurrentServerDispatch, (name));
5914   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_LoadName), 8) / 8);
5915   assert (cmd_size == cmd->cmd_base.cmd_size);
5916   return cmd_size;
5917}
5918void GLAPIENTRY
5919_mesa_marshal_LoadName(GLuint name)
5920{
5921   GET_CURRENT_CONTEXT(ctx);
5922   int cmd_size = sizeof(struct marshal_cmd_LoadName);
5923   struct marshal_cmd_LoadName *cmd;
5924   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_LoadName, cmd_size);
5925   cmd->name = name;
5926}
5927
5928
5929/* PassThrough: marshalled asynchronously */
5930struct marshal_cmd_PassThrough
5931{
5932   struct marshal_cmd_base cmd_base;
5933   GLfloat token;
5934};
5935uint32_t
5936_mesa_unmarshal_PassThrough(struct gl_context *ctx, const struct marshal_cmd_PassThrough *cmd, const uint64_t *last)
5937{
5938   GLfloat token = cmd->token;
5939   CALL_PassThrough(ctx->CurrentServerDispatch, (token));
5940   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PassThrough), 8) / 8);
5941   assert (cmd_size == cmd->cmd_base.cmd_size);
5942   return cmd_size;
5943}
5944void GLAPIENTRY
5945_mesa_marshal_PassThrough(GLfloat token)
5946{
5947   GET_CURRENT_CONTEXT(ctx);
5948   int cmd_size = sizeof(struct marshal_cmd_PassThrough);
5949   struct marshal_cmd_PassThrough *cmd;
5950   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PassThrough, cmd_size);
5951   cmd->token = token;
5952}
5953
5954
5955/* PopName: marshalled asynchronously */
5956struct marshal_cmd_PopName
5957{
5958   struct marshal_cmd_base cmd_base;
5959};
5960uint32_t
5961_mesa_unmarshal_PopName(struct gl_context *ctx, const struct marshal_cmd_PopName *cmd, const uint64_t *last)
5962{
5963   CALL_PopName(ctx->CurrentServerDispatch, ());
5964   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PopName), 8) / 8);
5965   assert (cmd_size == cmd->cmd_base.cmd_size);
5966   return cmd_size;
5967}
5968void GLAPIENTRY
5969_mesa_marshal_PopName(void)
5970{
5971   GET_CURRENT_CONTEXT(ctx);
5972   int cmd_size = sizeof(struct marshal_cmd_PopName);
5973   struct marshal_cmd_PopName *cmd;
5974   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PopName, cmd_size);
5975   (void) cmd;
5976}
5977
5978
5979/* PushName: marshalled asynchronously */
5980struct marshal_cmd_PushName
5981{
5982   struct marshal_cmd_base cmd_base;
5983   GLuint name;
5984};
5985uint32_t
5986_mesa_unmarshal_PushName(struct gl_context *ctx, const struct marshal_cmd_PushName *cmd, const uint64_t *last)
5987{
5988   GLuint name = cmd->name;
5989   CALL_PushName(ctx->CurrentServerDispatch, (name));
5990   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PushName), 8) / 8);
5991   assert (cmd_size == cmd->cmd_base.cmd_size);
5992   return cmd_size;
5993}
5994void GLAPIENTRY
5995_mesa_marshal_PushName(GLuint name)
5996{
5997   GET_CURRENT_CONTEXT(ctx);
5998   int cmd_size = sizeof(struct marshal_cmd_PushName);
5999   struct marshal_cmd_PushName *cmd;
6000   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PushName, cmd_size);
6001   cmd->name = name;
6002}
6003
6004
6005/* DrawBuffer: marshalled asynchronously */
6006struct marshal_cmd_DrawBuffer
6007{
6008   struct marshal_cmd_base cmd_base;
6009   GLenum mode;
6010};
6011uint32_t
6012_mesa_unmarshal_DrawBuffer(struct gl_context *ctx, const struct marshal_cmd_DrawBuffer *cmd, const uint64_t *last)
6013{
6014   GLenum mode = cmd->mode;
6015   CALL_DrawBuffer(ctx->CurrentServerDispatch, (mode));
6016   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DrawBuffer), 8) / 8);
6017   assert (cmd_size == cmd->cmd_base.cmd_size);
6018   return cmd_size;
6019}
6020void GLAPIENTRY
6021_mesa_marshal_DrawBuffer(GLenum mode)
6022{
6023   GET_CURRENT_CONTEXT(ctx);
6024   int cmd_size = sizeof(struct marshal_cmd_DrawBuffer);
6025   struct marshal_cmd_DrawBuffer *cmd;
6026   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DrawBuffer, cmd_size);
6027   cmd->mode = mode;
6028}
6029
6030
6031/* Clear: marshalled asynchronously */
6032struct marshal_cmd_Clear
6033{
6034   struct marshal_cmd_base cmd_base;
6035   GLbitfield mask;
6036};
6037uint32_t
6038_mesa_unmarshal_Clear(struct gl_context *ctx, const struct marshal_cmd_Clear *cmd, const uint64_t *last)
6039{
6040   GLbitfield mask = cmd->mask;
6041   CALL_Clear(ctx->CurrentServerDispatch, (mask));
6042   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Clear), 8) / 8);
6043   assert (cmd_size == cmd->cmd_base.cmd_size);
6044   return cmd_size;
6045}
6046void GLAPIENTRY
6047_mesa_marshal_Clear(GLbitfield mask)
6048{
6049   GET_CURRENT_CONTEXT(ctx);
6050   int cmd_size = sizeof(struct marshal_cmd_Clear);
6051   struct marshal_cmd_Clear *cmd;
6052   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Clear, cmd_size);
6053   cmd->mask = mask;
6054}
6055
6056
6057/* ClearAccum: marshalled asynchronously */
6058struct marshal_cmd_ClearAccum
6059{
6060   struct marshal_cmd_base cmd_base;
6061   GLfloat red;
6062   GLfloat green;
6063   GLfloat blue;
6064   GLfloat alpha;
6065};
6066uint32_t
6067_mesa_unmarshal_ClearAccum(struct gl_context *ctx, const struct marshal_cmd_ClearAccum *cmd, const uint64_t *last)
6068{
6069   GLfloat red = cmd->red;
6070   GLfloat green = cmd->green;
6071   GLfloat blue = cmd->blue;
6072   GLfloat alpha = cmd->alpha;
6073   CALL_ClearAccum(ctx->CurrentServerDispatch, (red, green, blue, alpha));
6074   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ClearAccum), 8) / 8);
6075   assert (cmd_size == cmd->cmd_base.cmd_size);
6076   return cmd_size;
6077}
6078void GLAPIENTRY
6079_mesa_marshal_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
6080{
6081   GET_CURRENT_CONTEXT(ctx);
6082   int cmd_size = sizeof(struct marshal_cmd_ClearAccum);
6083   struct marshal_cmd_ClearAccum *cmd;
6084   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ClearAccum, cmd_size);
6085   cmd->red = red;
6086   cmd->green = green;
6087   cmd->blue = blue;
6088   cmd->alpha = alpha;
6089}
6090
6091
6092/* ClearIndex: marshalled asynchronously */
6093struct marshal_cmd_ClearIndex
6094{
6095   struct marshal_cmd_base cmd_base;
6096   GLfloat c;
6097};
6098uint32_t
6099_mesa_unmarshal_ClearIndex(struct gl_context *ctx, const struct marshal_cmd_ClearIndex *cmd, const uint64_t *last)
6100{
6101   GLfloat c = cmd->c;
6102   CALL_ClearIndex(ctx->CurrentServerDispatch, (c));
6103   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ClearIndex), 8) / 8);
6104   assert (cmd_size == cmd->cmd_base.cmd_size);
6105   return cmd_size;
6106}
6107void GLAPIENTRY
6108_mesa_marshal_ClearIndex(GLfloat c)
6109{
6110   GET_CURRENT_CONTEXT(ctx);
6111   int cmd_size = sizeof(struct marshal_cmd_ClearIndex);
6112   struct marshal_cmd_ClearIndex *cmd;
6113   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ClearIndex, cmd_size);
6114   cmd->c = c;
6115}
6116
6117
6118/* ClearColor: marshalled asynchronously */
6119struct marshal_cmd_ClearColor
6120{
6121   struct marshal_cmd_base cmd_base;
6122   GLclampf red;
6123   GLclampf green;
6124   GLclampf blue;
6125   GLclampf alpha;
6126};
6127uint32_t
6128_mesa_unmarshal_ClearColor(struct gl_context *ctx, const struct marshal_cmd_ClearColor *cmd, const uint64_t *last)
6129{
6130   GLclampf red = cmd->red;
6131   GLclampf green = cmd->green;
6132   GLclampf blue = cmd->blue;
6133   GLclampf alpha = cmd->alpha;
6134   CALL_ClearColor(ctx->CurrentServerDispatch, (red, green, blue, alpha));
6135   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ClearColor), 8) / 8);
6136   assert (cmd_size == cmd->cmd_base.cmd_size);
6137   return cmd_size;
6138}
6139void GLAPIENTRY
6140_mesa_marshal_ClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
6141{
6142   GET_CURRENT_CONTEXT(ctx);
6143   int cmd_size = sizeof(struct marshal_cmd_ClearColor);
6144   struct marshal_cmd_ClearColor *cmd;
6145   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ClearColor, cmd_size);
6146   cmd->red = red;
6147   cmd->green = green;
6148   cmd->blue = blue;
6149   cmd->alpha = alpha;
6150}
6151
6152
6153/* ClearStencil: marshalled asynchronously */
6154struct marshal_cmd_ClearStencil
6155{
6156   struct marshal_cmd_base cmd_base;
6157   GLint s;
6158};
6159uint32_t
6160_mesa_unmarshal_ClearStencil(struct gl_context *ctx, const struct marshal_cmd_ClearStencil *cmd, const uint64_t *last)
6161{
6162   GLint s = cmd->s;
6163   CALL_ClearStencil(ctx->CurrentServerDispatch, (s));
6164   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ClearStencil), 8) / 8);
6165   assert (cmd_size == cmd->cmd_base.cmd_size);
6166   return cmd_size;
6167}
6168void GLAPIENTRY
6169_mesa_marshal_ClearStencil(GLint s)
6170{
6171   GET_CURRENT_CONTEXT(ctx);
6172   int cmd_size = sizeof(struct marshal_cmd_ClearStencil);
6173   struct marshal_cmd_ClearStencil *cmd;
6174   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ClearStencil, cmd_size);
6175   cmd->s = s;
6176}
6177
6178
6179/* ClearDepth: marshalled asynchronously */
6180struct marshal_cmd_ClearDepth
6181{
6182   struct marshal_cmd_base cmd_base;
6183   GLclampd depth;
6184};
6185uint32_t
6186_mesa_unmarshal_ClearDepth(struct gl_context *ctx, const struct marshal_cmd_ClearDepth *cmd, const uint64_t *last)
6187{
6188   GLclampd depth = cmd->depth;
6189   CALL_ClearDepth(ctx->CurrentServerDispatch, (depth));
6190   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ClearDepth), 8) / 8);
6191   assert (cmd_size == cmd->cmd_base.cmd_size);
6192   return cmd_size;
6193}
6194void GLAPIENTRY
6195_mesa_marshal_ClearDepth(GLclampd depth)
6196{
6197   GET_CURRENT_CONTEXT(ctx);
6198   int cmd_size = sizeof(struct marshal_cmd_ClearDepth);
6199   struct marshal_cmd_ClearDepth *cmd;
6200   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ClearDepth, cmd_size);
6201   cmd->depth = depth;
6202}
6203
6204
6205/* StencilMask: marshalled asynchronously */
6206struct marshal_cmd_StencilMask
6207{
6208   struct marshal_cmd_base cmd_base;
6209   GLuint mask;
6210};
6211uint32_t
6212_mesa_unmarshal_StencilMask(struct gl_context *ctx, const struct marshal_cmd_StencilMask *cmd, const uint64_t *last)
6213{
6214   GLuint mask = cmd->mask;
6215   CALL_StencilMask(ctx->CurrentServerDispatch, (mask));
6216   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_StencilMask), 8) / 8);
6217   assert (cmd_size == cmd->cmd_base.cmd_size);
6218   return cmd_size;
6219}
6220void GLAPIENTRY
6221_mesa_marshal_StencilMask(GLuint mask)
6222{
6223   GET_CURRENT_CONTEXT(ctx);
6224   int cmd_size = sizeof(struct marshal_cmd_StencilMask);
6225   struct marshal_cmd_StencilMask *cmd;
6226   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_StencilMask, cmd_size);
6227   cmd->mask = mask;
6228}
6229
6230
6231/* ColorMask: marshalled asynchronously */
6232struct marshal_cmd_ColorMask
6233{
6234   struct marshal_cmd_base cmd_base;
6235   GLboolean red;
6236   GLboolean green;
6237   GLboolean blue;
6238   GLboolean alpha;
6239};
6240uint32_t
6241_mesa_unmarshal_ColorMask(struct gl_context *ctx, const struct marshal_cmd_ColorMask *cmd, const uint64_t *last)
6242{
6243   GLboolean red = cmd->red;
6244   GLboolean green = cmd->green;
6245   GLboolean blue = cmd->blue;
6246   GLboolean alpha = cmd->alpha;
6247   CALL_ColorMask(ctx->CurrentServerDispatch, (red, green, blue, alpha));
6248   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ColorMask), 8) / 8);
6249   assert (cmd_size == cmd->cmd_base.cmd_size);
6250   return cmd_size;
6251}
6252void GLAPIENTRY
6253_mesa_marshal_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
6254{
6255   GET_CURRENT_CONTEXT(ctx);
6256   int cmd_size = sizeof(struct marshal_cmd_ColorMask);
6257   struct marshal_cmd_ColorMask *cmd;
6258   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ColorMask, cmd_size);
6259   cmd->red = red;
6260   cmd->green = green;
6261   cmd->blue = blue;
6262   cmd->alpha = alpha;
6263}
6264
6265
6266/* DepthMask: marshalled asynchronously */
6267struct marshal_cmd_DepthMask
6268{
6269   struct marshal_cmd_base cmd_base;
6270   GLboolean flag;
6271};
6272uint32_t
6273_mesa_unmarshal_DepthMask(struct gl_context *ctx, const struct marshal_cmd_DepthMask *cmd, const uint64_t *last)
6274{
6275   GLboolean flag = cmd->flag;
6276   CALL_DepthMask(ctx->CurrentServerDispatch, (flag));
6277   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DepthMask), 8) / 8);
6278   assert (cmd_size == cmd->cmd_base.cmd_size);
6279   return cmd_size;
6280}
6281void GLAPIENTRY
6282_mesa_marshal_DepthMask(GLboolean flag)
6283{
6284   GET_CURRENT_CONTEXT(ctx);
6285   int cmd_size = sizeof(struct marshal_cmd_DepthMask);
6286   struct marshal_cmd_DepthMask *cmd;
6287   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DepthMask, cmd_size);
6288   cmd->flag = flag;
6289}
6290
6291
6292/* IndexMask: marshalled asynchronously */
6293struct marshal_cmd_IndexMask
6294{
6295   struct marshal_cmd_base cmd_base;
6296   GLuint mask;
6297};
6298uint32_t
6299_mesa_unmarshal_IndexMask(struct gl_context *ctx, const struct marshal_cmd_IndexMask *cmd, const uint64_t *last)
6300{
6301   GLuint mask = cmd->mask;
6302   CALL_IndexMask(ctx->CurrentServerDispatch, (mask));
6303   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_IndexMask), 8) / 8);
6304   assert (cmd_size == cmd->cmd_base.cmd_size);
6305   return cmd_size;
6306}
6307void GLAPIENTRY
6308_mesa_marshal_IndexMask(GLuint mask)
6309{
6310   GET_CURRENT_CONTEXT(ctx);
6311   int cmd_size = sizeof(struct marshal_cmd_IndexMask);
6312   struct marshal_cmd_IndexMask *cmd;
6313   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_IndexMask, cmd_size);
6314   cmd->mask = mask;
6315}
6316
6317
6318/* Accum: marshalled asynchronously */
6319struct marshal_cmd_Accum
6320{
6321   struct marshal_cmd_base cmd_base;
6322   GLenum op;
6323   GLfloat value;
6324};
6325uint32_t
6326_mesa_unmarshal_Accum(struct gl_context *ctx, const struct marshal_cmd_Accum *cmd, const uint64_t *last)
6327{
6328   GLenum op = cmd->op;
6329   GLfloat value = cmd->value;
6330   CALL_Accum(ctx->CurrentServerDispatch, (op, value));
6331   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Accum), 8) / 8);
6332   assert (cmd_size == cmd->cmd_base.cmd_size);
6333   return cmd_size;
6334}
6335void GLAPIENTRY
6336_mesa_marshal_Accum(GLenum op, GLfloat value)
6337{
6338   GET_CURRENT_CONTEXT(ctx);
6339   int cmd_size = sizeof(struct marshal_cmd_Accum);
6340   struct marshal_cmd_Accum *cmd;
6341   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Accum, cmd_size);
6342   cmd->op = op;
6343   cmd->value = value;
6344}
6345
6346
6347/* Disable: marshalled asynchronously */
6348struct marshal_cmd_Disable
6349{
6350   struct marshal_cmd_base cmd_base;
6351   GLenum cap;
6352};
6353uint32_t
6354_mesa_unmarshal_Disable(struct gl_context *ctx, const struct marshal_cmd_Disable *cmd, const uint64_t *last)
6355{
6356   GLenum cap = cmd->cap;
6357   CALL_Disable(ctx->CurrentServerDispatch, (cap));
6358   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Disable), 8) / 8);
6359   assert (cmd_size == cmd->cmd_base.cmd_size);
6360   return cmd_size;
6361}
6362void GLAPIENTRY
6363_mesa_marshal_Disable(GLenum cap)
6364{
6365   GET_CURRENT_CONTEXT(ctx);
6366   int cmd_size = sizeof(struct marshal_cmd_Disable);
6367   struct marshal_cmd_Disable *cmd;
6368   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Disable, cmd_size);
6369   cmd->cap = cap;
6370   _mesa_glthread_Disable(ctx, cap);
6371}
6372
6373
6374/* Enable: marshalled asynchronously */
6375struct marshal_cmd_Enable
6376{
6377   struct marshal_cmd_base cmd_base;
6378   GLenum cap;
6379};
6380uint32_t
6381_mesa_unmarshal_Enable(struct gl_context *ctx, const struct marshal_cmd_Enable *cmd, const uint64_t *last)
6382{
6383   GLenum cap = cmd->cap;
6384   CALL_Enable(ctx->CurrentServerDispatch, (cap));
6385   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Enable), 8) / 8);
6386   assert (cmd_size == cmd->cmd_base.cmd_size);
6387   return cmd_size;
6388}
6389void GLAPIENTRY
6390_mesa_marshal_Enable(GLenum cap)
6391{
6392   GET_CURRENT_CONTEXT(ctx);
6393   int cmd_size = sizeof(struct marshal_cmd_Enable);
6394   struct marshal_cmd_Enable *cmd;
6395   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Enable, cmd_size);
6396   cmd->cap = cap;
6397   _mesa_glthread_Enable(ctx, cap);
6398}
6399
6400
6401/* Finish: marshalled synchronously */
6402void GLAPIENTRY
6403_mesa_marshal_Finish(void)
6404{
6405   GET_CURRENT_CONTEXT(ctx);
6406   _mesa_glthread_finish_before(ctx, "Finish");
6407   CALL_Finish(ctx->CurrentServerDispatch, ());
6408}
6409
6410
6411/* Flush: marshalled asynchronously */
6412struct marshal_cmd_Flush
6413{
6414   struct marshal_cmd_base cmd_base;
6415};
6416uint32_t
6417_mesa_unmarshal_Flush(struct gl_context *ctx, const struct marshal_cmd_Flush *cmd, const uint64_t *last)
6418{
6419   CALL_Flush(ctx->CurrentServerDispatch, ());
6420   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_Flush), 8) / 8);
6421   assert (cmd_size == cmd->cmd_base.cmd_size);
6422   return cmd_size;
6423}
6424void GLAPIENTRY
6425_mesa_marshal_Flush(void)
6426{
6427   GET_CURRENT_CONTEXT(ctx);
6428   int cmd_size = sizeof(struct marshal_cmd_Flush);
6429   struct marshal_cmd_Flush *cmd;
6430   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_Flush, cmd_size);
6431   (void) cmd;
6432   _mesa_glthread_flush_batch(ctx); if (ctx->Shared->HasExternallySharedImages) _mesa_glthread_finish(ctx);
6433}
6434
6435
6436/* PopAttrib: marshalled asynchronously */
6437struct marshal_cmd_PopAttrib
6438{
6439   struct marshal_cmd_base cmd_base;
6440};
6441uint32_t
6442_mesa_unmarshal_PopAttrib(struct gl_context *ctx, const struct marshal_cmd_PopAttrib *cmd, const uint64_t *last)
6443{
6444   CALL_PopAttrib(ctx->CurrentServerDispatch, ());
6445   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PopAttrib), 8) / 8);
6446   assert (cmd_size == cmd->cmd_base.cmd_size);
6447   return cmd_size;
6448}
6449void GLAPIENTRY
6450_mesa_marshal_PopAttrib(void)
6451{
6452   GET_CURRENT_CONTEXT(ctx);
6453   int cmd_size = sizeof(struct marshal_cmd_PopAttrib);
6454   struct marshal_cmd_PopAttrib *cmd;
6455   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PopAttrib, cmd_size);
6456   (void) cmd;
6457   _mesa_glthread_PopAttrib(ctx);
6458}
6459
6460
6461/* PushAttrib: marshalled asynchronously */
6462struct marshal_cmd_PushAttrib
6463{
6464   struct marshal_cmd_base cmd_base;
6465   GLbitfield mask;
6466};
6467uint32_t
6468_mesa_unmarshal_PushAttrib(struct gl_context *ctx, const struct marshal_cmd_PushAttrib *cmd, const uint64_t *last)
6469{
6470   GLbitfield mask = cmd->mask;
6471   CALL_PushAttrib(ctx->CurrentServerDispatch, (mask));
6472   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PushAttrib), 8) / 8);
6473   assert (cmd_size == cmd->cmd_base.cmd_size);
6474   return cmd_size;
6475}
6476void GLAPIENTRY
6477_mesa_marshal_PushAttrib(GLbitfield mask)
6478{
6479   GET_CURRENT_CONTEXT(ctx);
6480   int cmd_size = sizeof(struct marshal_cmd_PushAttrib);
6481   struct marshal_cmd_PushAttrib *cmd;
6482   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PushAttrib, cmd_size);
6483   cmd->mask = mask;
6484   _mesa_glthread_PushAttrib(ctx, mask);
6485}
6486
6487
6488/* Map1d: marshalled synchronously */
6489void GLAPIENTRY
6490_mesa_marshal_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points)
6491{
6492   GET_CURRENT_CONTEXT(ctx);
6493   _mesa_glthread_finish_before(ctx, "Map1d");
6494   CALL_Map1d(ctx->CurrentServerDispatch, (target, u1, u2, stride, order, points));
6495}
6496
6497
6498/* Map1f: marshalled synchronously */
6499void GLAPIENTRY
6500_mesa_marshal_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points)
6501{
6502   GET_CURRENT_CONTEXT(ctx);
6503   _mesa_glthread_finish_before(ctx, "Map1f");
6504   CALL_Map1f(ctx->CurrentServerDispatch, (target, u1, u2, stride, order, points));
6505}
6506
6507
6508/* Map2d: marshalled synchronously */
6509void GLAPIENTRY
6510_mesa_marshal_Map2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points)
6511{
6512   GET_CURRENT_CONTEXT(ctx);
6513   _mesa_glthread_finish_before(ctx, "Map2d");
6514   CALL_Map2d(ctx->CurrentServerDispatch, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points));
6515}
6516
6517
6518/* Map2f: marshalled synchronously */
6519void GLAPIENTRY
6520_mesa_marshal_Map2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points)
6521{
6522   GET_CURRENT_CONTEXT(ctx);
6523   _mesa_glthread_finish_before(ctx, "Map2f");
6524   CALL_Map2f(ctx->CurrentServerDispatch, (target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points));
6525}
6526
6527
6528/* MapGrid1d: marshalled asynchronously */
6529struct marshal_cmd_MapGrid1d
6530{
6531   struct marshal_cmd_base cmd_base;
6532   GLint un;
6533   GLdouble u1;
6534   GLdouble u2;
6535};
6536uint32_t
6537_mesa_unmarshal_MapGrid1d(struct gl_context *ctx, const struct marshal_cmd_MapGrid1d *cmd, const uint64_t *last)
6538{
6539   GLint un = cmd->un;
6540   GLdouble u1 = cmd->u1;
6541   GLdouble u2 = cmd->u2;
6542   CALL_MapGrid1d(ctx->CurrentServerDispatch, (un, u1, u2));
6543   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MapGrid1d), 8) / 8);
6544   assert (cmd_size == cmd->cmd_base.cmd_size);
6545   return cmd_size;
6546}
6547void GLAPIENTRY
6548_mesa_marshal_MapGrid1d(GLint un, GLdouble u1, GLdouble u2)
6549{
6550   GET_CURRENT_CONTEXT(ctx);
6551   int cmd_size = sizeof(struct marshal_cmd_MapGrid1d);
6552   struct marshal_cmd_MapGrid1d *cmd;
6553   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MapGrid1d, cmd_size);
6554   cmd->un = un;
6555   cmd->u1 = u1;
6556   cmd->u2 = u2;
6557}
6558
6559
6560/* MapGrid1f: marshalled asynchronously */
6561struct marshal_cmd_MapGrid1f
6562{
6563   struct marshal_cmd_base cmd_base;
6564   GLint un;
6565   GLfloat u1;
6566   GLfloat u2;
6567};
6568uint32_t
6569_mesa_unmarshal_MapGrid1f(struct gl_context *ctx, const struct marshal_cmd_MapGrid1f *cmd, const uint64_t *last)
6570{
6571   GLint un = cmd->un;
6572   GLfloat u1 = cmd->u1;
6573   GLfloat u2 = cmd->u2;
6574   CALL_MapGrid1f(ctx->CurrentServerDispatch, (un, u1, u2));
6575   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MapGrid1f), 8) / 8);
6576   assert (cmd_size == cmd->cmd_base.cmd_size);
6577   return cmd_size;
6578}
6579void GLAPIENTRY
6580_mesa_marshal_MapGrid1f(GLint un, GLfloat u1, GLfloat u2)
6581{
6582   GET_CURRENT_CONTEXT(ctx);
6583   int cmd_size = sizeof(struct marshal_cmd_MapGrid1f);
6584   struct marshal_cmd_MapGrid1f *cmd;
6585   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MapGrid1f, cmd_size);
6586   cmd->un = un;
6587   cmd->u1 = u1;
6588   cmd->u2 = u2;
6589}
6590
6591
6592/* MapGrid2d: marshalled asynchronously */
6593struct marshal_cmd_MapGrid2d
6594{
6595   struct marshal_cmd_base cmd_base;
6596   GLint un;
6597   GLint vn;
6598   GLdouble u1;
6599   GLdouble u2;
6600   GLdouble v1;
6601   GLdouble v2;
6602};
6603uint32_t
6604_mesa_unmarshal_MapGrid2d(struct gl_context *ctx, const struct marshal_cmd_MapGrid2d *cmd, const uint64_t *last)
6605{
6606   GLint un = cmd->un;
6607   GLdouble u1 = cmd->u1;
6608   GLdouble u2 = cmd->u2;
6609   GLint vn = cmd->vn;
6610   GLdouble v1 = cmd->v1;
6611   GLdouble v2 = cmd->v2;
6612   CALL_MapGrid2d(ctx->CurrentServerDispatch, (un, u1, u2, vn, v1, v2));
6613   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MapGrid2d), 8) / 8);
6614   assert (cmd_size == cmd->cmd_base.cmd_size);
6615   return cmd_size;
6616}
6617void GLAPIENTRY
6618_mesa_marshal_MapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
6619{
6620   GET_CURRENT_CONTEXT(ctx);
6621   int cmd_size = sizeof(struct marshal_cmd_MapGrid2d);
6622   struct marshal_cmd_MapGrid2d *cmd;
6623   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MapGrid2d, cmd_size);
6624   cmd->un = un;
6625   cmd->u1 = u1;
6626   cmd->u2 = u2;
6627   cmd->vn = vn;
6628   cmd->v1 = v1;
6629   cmd->v2 = v2;
6630}
6631
6632
6633/* MapGrid2f: marshalled asynchronously */
6634struct marshal_cmd_MapGrid2f
6635{
6636   struct marshal_cmd_base cmd_base;
6637   GLint un;
6638   GLfloat u1;
6639   GLfloat u2;
6640   GLint vn;
6641   GLfloat v1;
6642   GLfloat v2;
6643};
6644uint32_t
6645_mesa_unmarshal_MapGrid2f(struct gl_context *ctx, const struct marshal_cmd_MapGrid2f *cmd, const uint64_t *last)
6646{
6647   GLint un = cmd->un;
6648   GLfloat u1 = cmd->u1;
6649   GLfloat u2 = cmd->u2;
6650   GLint vn = cmd->vn;
6651   GLfloat v1 = cmd->v1;
6652   GLfloat v2 = cmd->v2;
6653   CALL_MapGrid2f(ctx->CurrentServerDispatch, (un, u1, u2, vn, v1, v2));
6654   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_MapGrid2f), 8) / 8);
6655   assert (cmd_size == cmd->cmd_base.cmd_size);
6656   return cmd_size;
6657}
6658void GLAPIENTRY
6659_mesa_marshal_MapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
6660{
6661   GET_CURRENT_CONTEXT(ctx);
6662   int cmd_size = sizeof(struct marshal_cmd_MapGrid2f);
6663   struct marshal_cmd_MapGrid2f *cmd;
6664   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_MapGrid2f, cmd_size);
6665   cmd->un = un;
6666   cmd->u1 = u1;
6667   cmd->u2 = u2;
6668   cmd->vn = vn;
6669   cmd->v1 = v1;
6670   cmd->v2 = v2;
6671}
6672
6673
6674/* EvalCoord1d: marshalled asynchronously */
6675struct marshal_cmd_EvalCoord1d
6676{
6677   struct marshal_cmd_base cmd_base;
6678   GLdouble u;
6679};
6680uint32_t
6681_mesa_unmarshal_EvalCoord1d(struct gl_context *ctx, const struct marshal_cmd_EvalCoord1d *cmd, const uint64_t *last)
6682{
6683   GLdouble u = cmd->u;
6684   CALL_EvalCoord1d(ctx->CurrentServerDispatch, (u));
6685   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalCoord1d), 8) / 8);
6686   assert (cmd_size == cmd->cmd_base.cmd_size);
6687   return cmd_size;
6688}
6689void GLAPIENTRY
6690_mesa_marshal_EvalCoord1d(GLdouble u)
6691{
6692   GET_CURRENT_CONTEXT(ctx);
6693   int cmd_size = sizeof(struct marshal_cmd_EvalCoord1d);
6694   struct marshal_cmd_EvalCoord1d *cmd;
6695   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalCoord1d, cmd_size);
6696   cmd->u = u;
6697}
6698
6699
6700/* EvalCoord1dv: marshalled asynchronously */
6701struct marshal_cmd_EvalCoord1dv
6702{
6703   struct marshal_cmd_base cmd_base;
6704   GLdouble u[1];
6705};
6706uint32_t
6707_mesa_unmarshal_EvalCoord1dv(struct gl_context *ctx, const struct marshal_cmd_EvalCoord1dv *cmd, const uint64_t *last)
6708{
6709   const GLdouble * u = cmd->u;
6710   CALL_EvalCoord1dv(ctx->CurrentServerDispatch, (u));
6711   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalCoord1dv), 8) / 8);
6712   assert (cmd_size == cmd->cmd_base.cmd_size);
6713   return cmd_size;
6714}
6715void GLAPIENTRY
6716_mesa_marshal_EvalCoord1dv(const GLdouble * u)
6717{
6718   GET_CURRENT_CONTEXT(ctx);
6719   int cmd_size = sizeof(struct marshal_cmd_EvalCoord1dv);
6720   struct marshal_cmd_EvalCoord1dv *cmd;
6721   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalCoord1dv, cmd_size);
6722   memcpy(cmd->u, u, 1 * sizeof(GLdouble));
6723}
6724
6725
6726/* EvalCoord1f: marshalled asynchronously */
6727struct marshal_cmd_EvalCoord1f
6728{
6729   struct marshal_cmd_base cmd_base;
6730   GLfloat u;
6731};
6732uint32_t
6733_mesa_unmarshal_EvalCoord1f(struct gl_context *ctx, const struct marshal_cmd_EvalCoord1f *cmd, const uint64_t *last)
6734{
6735   GLfloat u = cmd->u;
6736   CALL_EvalCoord1f(ctx->CurrentServerDispatch, (u));
6737   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalCoord1f), 8) / 8);
6738   assert (cmd_size == cmd->cmd_base.cmd_size);
6739   return cmd_size;
6740}
6741void GLAPIENTRY
6742_mesa_marshal_EvalCoord1f(GLfloat u)
6743{
6744   GET_CURRENT_CONTEXT(ctx);
6745   int cmd_size = sizeof(struct marshal_cmd_EvalCoord1f);
6746   struct marshal_cmd_EvalCoord1f *cmd;
6747   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalCoord1f, cmd_size);
6748   cmd->u = u;
6749}
6750
6751
6752/* EvalCoord1fv: marshalled asynchronously */
6753struct marshal_cmd_EvalCoord1fv
6754{
6755   struct marshal_cmd_base cmd_base;
6756   GLfloat u[1];
6757};
6758uint32_t
6759_mesa_unmarshal_EvalCoord1fv(struct gl_context *ctx, const struct marshal_cmd_EvalCoord1fv *cmd, const uint64_t *last)
6760{
6761   const GLfloat * u = cmd->u;
6762   CALL_EvalCoord1fv(ctx->CurrentServerDispatch, (u));
6763   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalCoord1fv), 8) / 8);
6764   assert (cmd_size == cmd->cmd_base.cmd_size);
6765   return cmd_size;
6766}
6767void GLAPIENTRY
6768_mesa_marshal_EvalCoord1fv(const GLfloat * u)
6769{
6770   GET_CURRENT_CONTEXT(ctx);
6771   int cmd_size = sizeof(struct marshal_cmd_EvalCoord1fv);
6772   struct marshal_cmd_EvalCoord1fv *cmd;
6773   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalCoord1fv, cmd_size);
6774   memcpy(cmd->u, u, 1 * sizeof(GLfloat));
6775}
6776
6777
6778/* EvalCoord2d: marshalled asynchronously */
6779struct marshal_cmd_EvalCoord2d
6780{
6781   struct marshal_cmd_base cmd_base;
6782   GLdouble u;
6783   GLdouble v;
6784};
6785uint32_t
6786_mesa_unmarshal_EvalCoord2d(struct gl_context *ctx, const struct marshal_cmd_EvalCoord2d *cmd, const uint64_t *last)
6787{
6788   GLdouble u = cmd->u;
6789   GLdouble v = cmd->v;
6790   CALL_EvalCoord2d(ctx->CurrentServerDispatch, (u, v));
6791   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalCoord2d), 8) / 8);
6792   assert (cmd_size == cmd->cmd_base.cmd_size);
6793   return cmd_size;
6794}
6795void GLAPIENTRY
6796_mesa_marshal_EvalCoord2d(GLdouble u, GLdouble v)
6797{
6798   GET_CURRENT_CONTEXT(ctx);
6799   int cmd_size = sizeof(struct marshal_cmd_EvalCoord2d);
6800   struct marshal_cmd_EvalCoord2d *cmd;
6801   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalCoord2d, cmd_size);
6802   cmd->u = u;
6803   cmd->v = v;
6804}
6805
6806
6807/* EvalCoord2dv: marshalled asynchronously */
6808struct marshal_cmd_EvalCoord2dv
6809{
6810   struct marshal_cmd_base cmd_base;
6811   GLdouble u[2];
6812};
6813uint32_t
6814_mesa_unmarshal_EvalCoord2dv(struct gl_context *ctx, const struct marshal_cmd_EvalCoord2dv *cmd, const uint64_t *last)
6815{
6816   const GLdouble * u = cmd->u;
6817   CALL_EvalCoord2dv(ctx->CurrentServerDispatch, (u));
6818   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalCoord2dv), 8) / 8);
6819   assert (cmd_size == cmd->cmd_base.cmd_size);
6820   return cmd_size;
6821}
6822void GLAPIENTRY
6823_mesa_marshal_EvalCoord2dv(const GLdouble * u)
6824{
6825   GET_CURRENT_CONTEXT(ctx);
6826   int cmd_size = sizeof(struct marshal_cmd_EvalCoord2dv);
6827   struct marshal_cmd_EvalCoord2dv *cmd;
6828   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalCoord2dv, cmd_size);
6829   memcpy(cmd->u, u, 2 * sizeof(GLdouble));
6830}
6831
6832
6833/* EvalCoord2f: marshalled asynchronously */
6834struct marshal_cmd_EvalCoord2f
6835{
6836   struct marshal_cmd_base cmd_base;
6837   GLfloat u;
6838   GLfloat v;
6839};
6840uint32_t
6841_mesa_unmarshal_EvalCoord2f(struct gl_context *ctx, const struct marshal_cmd_EvalCoord2f *cmd, const uint64_t *last)
6842{
6843   GLfloat u = cmd->u;
6844   GLfloat v = cmd->v;
6845   CALL_EvalCoord2f(ctx->CurrentServerDispatch, (u, v));
6846   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalCoord2f), 8) / 8);
6847   assert (cmd_size == cmd->cmd_base.cmd_size);
6848   return cmd_size;
6849}
6850void GLAPIENTRY
6851_mesa_marshal_EvalCoord2f(GLfloat u, GLfloat v)
6852{
6853   GET_CURRENT_CONTEXT(ctx);
6854   int cmd_size = sizeof(struct marshal_cmd_EvalCoord2f);
6855   struct marshal_cmd_EvalCoord2f *cmd;
6856   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalCoord2f, cmd_size);
6857   cmd->u = u;
6858   cmd->v = v;
6859}
6860
6861
6862/* EvalCoord2fv: marshalled asynchronously */
6863struct marshal_cmd_EvalCoord2fv
6864{
6865   struct marshal_cmd_base cmd_base;
6866   GLfloat u[2];
6867};
6868uint32_t
6869_mesa_unmarshal_EvalCoord2fv(struct gl_context *ctx, const struct marshal_cmd_EvalCoord2fv *cmd, const uint64_t *last)
6870{
6871   const GLfloat * u = cmd->u;
6872   CALL_EvalCoord2fv(ctx->CurrentServerDispatch, (u));
6873   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalCoord2fv), 8) / 8);
6874   assert (cmd_size == cmd->cmd_base.cmd_size);
6875   return cmd_size;
6876}
6877void GLAPIENTRY
6878_mesa_marshal_EvalCoord2fv(const GLfloat * u)
6879{
6880   GET_CURRENT_CONTEXT(ctx);
6881   int cmd_size = sizeof(struct marshal_cmd_EvalCoord2fv);
6882   struct marshal_cmd_EvalCoord2fv *cmd;
6883   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalCoord2fv, cmd_size);
6884   memcpy(cmd->u, u, 2 * sizeof(GLfloat));
6885}
6886
6887
6888/* EvalMesh1: marshalled asynchronously */
6889struct marshal_cmd_EvalMesh1
6890{
6891   struct marshal_cmd_base cmd_base;
6892   GLenum mode;
6893   GLint i1;
6894   GLint i2;
6895};
6896uint32_t
6897_mesa_unmarshal_EvalMesh1(struct gl_context *ctx, const struct marshal_cmd_EvalMesh1 *cmd, const uint64_t *last)
6898{
6899   GLenum mode = cmd->mode;
6900   GLint i1 = cmd->i1;
6901   GLint i2 = cmd->i2;
6902   CALL_EvalMesh1(ctx->CurrentServerDispatch, (mode, i1, i2));
6903   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalMesh1), 8) / 8);
6904   assert (cmd_size == cmd->cmd_base.cmd_size);
6905   return cmd_size;
6906}
6907void GLAPIENTRY
6908_mesa_marshal_EvalMesh1(GLenum mode, GLint i1, GLint i2)
6909{
6910   GET_CURRENT_CONTEXT(ctx);
6911   int cmd_size = sizeof(struct marshal_cmd_EvalMesh1);
6912   struct marshal_cmd_EvalMesh1 *cmd;
6913   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalMesh1, cmd_size);
6914   cmd->mode = mode;
6915   cmd->i1 = i1;
6916   cmd->i2 = i2;
6917}
6918
6919
6920/* EvalPoint1: marshalled asynchronously */
6921struct marshal_cmd_EvalPoint1
6922{
6923   struct marshal_cmd_base cmd_base;
6924   GLint i;
6925};
6926uint32_t
6927_mesa_unmarshal_EvalPoint1(struct gl_context *ctx, const struct marshal_cmd_EvalPoint1 *cmd, const uint64_t *last)
6928{
6929   GLint i = cmd->i;
6930   CALL_EvalPoint1(ctx->CurrentServerDispatch, (i));
6931   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalPoint1), 8) / 8);
6932   assert (cmd_size == cmd->cmd_base.cmd_size);
6933   return cmd_size;
6934}
6935void GLAPIENTRY
6936_mesa_marshal_EvalPoint1(GLint i)
6937{
6938   GET_CURRENT_CONTEXT(ctx);
6939   int cmd_size = sizeof(struct marshal_cmd_EvalPoint1);
6940   struct marshal_cmd_EvalPoint1 *cmd;
6941   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalPoint1, cmd_size);
6942   cmd->i = i;
6943}
6944
6945
6946/* EvalMesh2: marshalled asynchronously */
6947struct marshal_cmd_EvalMesh2
6948{
6949   struct marshal_cmd_base cmd_base;
6950   GLenum mode;
6951   GLint i1;
6952   GLint i2;
6953   GLint j1;
6954   GLint j2;
6955};
6956uint32_t
6957_mesa_unmarshal_EvalMesh2(struct gl_context *ctx, const struct marshal_cmd_EvalMesh2 *cmd, const uint64_t *last)
6958{
6959   GLenum mode = cmd->mode;
6960   GLint i1 = cmd->i1;
6961   GLint i2 = cmd->i2;
6962   GLint j1 = cmd->j1;
6963   GLint j2 = cmd->j2;
6964   CALL_EvalMesh2(ctx->CurrentServerDispatch, (mode, i1, i2, j1, j2));
6965   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalMesh2), 8) / 8);
6966   assert (cmd_size == cmd->cmd_base.cmd_size);
6967   return cmd_size;
6968}
6969void GLAPIENTRY
6970_mesa_marshal_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
6971{
6972   GET_CURRENT_CONTEXT(ctx);
6973   int cmd_size = sizeof(struct marshal_cmd_EvalMesh2);
6974   struct marshal_cmd_EvalMesh2 *cmd;
6975   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalMesh2, cmd_size);
6976   cmd->mode = mode;
6977   cmd->i1 = i1;
6978   cmd->i2 = i2;
6979   cmd->j1 = j1;
6980   cmd->j2 = j2;
6981}
6982
6983
6984/* EvalPoint2: marshalled asynchronously */
6985struct marshal_cmd_EvalPoint2
6986{
6987   struct marshal_cmd_base cmd_base;
6988   GLint i;
6989   GLint j;
6990};
6991uint32_t
6992_mesa_unmarshal_EvalPoint2(struct gl_context *ctx, const struct marshal_cmd_EvalPoint2 *cmd, const uint64_t *last)
6993{
6994   GLint i = cmd->i;
6995   GLint j = cmd->j;
6996   CALL_EvalPoint2(ctx->CurrentServerDispatch, (i, j));
6997   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_EvalPoint2), 8) / 8);
6998   assert (cmd_size == cmd->cmd_base.cmd_size);
6999   return cmd_size;
7000}
7001void GLAPIENTRY
7002_mesa_marshal_EvalPoint2(GLint i, GLint j)
7003{
7004   GET_CURRENT_CONTEXT(ctx);
7005   int cmd_size = sizeof(struct marshal_cmd_EvalPoint2);
7006   struct marshal_cmd_EvalPoint2 *cmd;
7007   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_EvalPoint2, cmd_size);
7008   cmd->i = i;
7009   cmd->j = j;
7010}
7011
7012
7013/* AlphaFunc: marshalled asynchronously */
7014struct marshal_cmd_AlphaFunc
7015{
7016   struct marshal_cmd_base cmd_base;
7017   GLenum func;
7018   GLclampf ref;
7019};
7020uint32_t
7021_mesa_unmarshal_AlphaFunc(struct gl_context *ctx, const struct marshal_cmd_AlphaFunc *cmd, const uint64_t *last)
7022{
7023   GLenum func = cmd->func;
7024   GLclampf ref = cmd->ref;
7025   CALL_AlphaFunc(ctx->CurrentServerDispatch, (func, ref));
7026   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_AlphaFunc), 8) / 8);
7027   assert (cmd_size == cmd->cmd_base.cmd_size);
7028   return cmd_size;
7029}
7030void GLAPIENTRY
7031_mesa_marshal_AlphaFunc(GLenum func, GLclampf ref)
7032{
7033   GET_CURRENT_CONTEXT(ctx);
7034   int cmd_size = sizeof(struct marshal_cmd_AlphaFunc);
7035   struct marshal_cmd_AlphaFunc *cmd;
7036   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_AlphaFunc, cmd_size);
7037   cmd->func = func;
7038   cmd->ref = ref;
7039}
7040
7041
7042/* BlendFunc: marshalled asynchronously */
7043struct marshal_cmd_BlendFunc
7044{
7045   struct marshal_cmd_base cmd_base;
7046   GLenum sfactor;
7047   GLenum dfactor;
7048};
7049uint32_t
7050_mesa_unmarshal_BlendFunc(struct gl_context *ctx, const struct marshal_cmd_BlendFunc *cmd, const uint64_t *last)
7051{
7052   GLenum sfactor = cmd->sfactor;
7053   GLenum dfactor = cmd->dfactor;
7054   CALL_BlendFunc(ctx->CurrentServerDispatch, (sfactor, dfactor));
7055   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_BlendFunc), 8) / 8);
7056   assert (cmd_size == cmd->cmd_base.cmd_size);
7057   return cmd_size;
7058}
7059void GLAPIENTRY
7060_mesa_marshal_BlendFunc(GLenum sfactor, GLenum dfactor)
7061{
7062   GET_CURRENT_CONTEXT(ctx);
7063   int cmd_size = sizeof(struct marshal_cmd_BlendFunc);
7064   struct marshal_cmd_BlendFunc *cmd;
7065   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_BlendFunc, cmd_size);
7066   cmd->sfactor = sfactor;
7067   cmd->dfactor = dfactor;
7068}
7069
7070
7071/* LogicOp: marshalled asynchronously */
7072struct marshal_cmd_LogicOp
7073{
7074   struct marshal_cmd_base cmd_base;
7075   GLenum opcode;
7076};
7077uint32_t
7078_mesa_unmarshal_LogicOp(struct gl_context *ctx, const struct marshal_cmd_LogicOp *cmd, const uint64_t *last)
7079{
7080   GLenum opcode = cmd->opcode;
7081   CALL_LogicOp(ctx->CurrentServerDispatch, (opcode));
7082   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_LogicOp), 8) / 8);
7083   assert (cmd_size == cmd->cmd_base.cmd_size);
7084   return cmd_size;
7085}
7086void GLAPIENTRY
7087_mesa_marshal_LogicOp(GLenum opcode)
7088{
7089   GET_CURRENT_CONTEXT(ctx);
7090   int cmd_size = sizeof(struct marshal_cmd_LogicOp);
7091   struct marshal_cmd_LogicOp *cmd;
7092   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_LogicOp, cmd_size);
7093   cmd->opcode = opcode;
7094}
7095
7096
7097/* StencilFunc: marshalled asynchronously */
7098struct marshal_cmd_StencilFunc
7099{
7100   struct marshal_cmd_base cmd_base;
7101   GLenum func;
7102   GLint ref;
7103   GLuint mask;
7104};
7105uint32_t
7106_mesa_unmarshal_StencilFunc(struct gl_context *ctx, const struct marshal_cmd_StencilFunc *cmd, const uint64_t *last)
7107{
7108   GLenum func = cmd->func;
7109   GLint ref = cmd->ref;
7110   GLuint mask = cmd->mask;
7111   CALL_StencilFunc(ctx->CurrentServerDispatch, (func, ref, mask));
7112   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_StencilFunc), 8) / 8);
7113   assert (cmd_size == cmd->cmd_base.cmd_size);
7114   return cmd_size;
7115}
7116void GLAPIENTRY
7117_mesa_marshal_StencilFunc(GLenum func, GLint ref, GLuint mask)
7118{
7119   GET_CURRENT_CONTEXT(ctx);
7120   int cmd_size = sizeof(struct marshal_cmd_StencilFunc);
7121   struct marshal_cmd_StencilFunc *cmd;
7122   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_StencilFunc, cmd_size);
7123   cmd->func = func;
7124   cmd->ref = ref;
7125   cmd->mask = mask;
7126}
7127
7128
7129/* StencilOp: marshalled asynchronously */
7130struct marshal_cmd_StencilOp
7131{
7132   struct marshal_cmd_base cmd_base;
7133   GLenum fail;
7134   GLenum zfail;
7135   GLenum zpass;
7136};
7137uint32_t
7138_mesa_unmarshal_StencilOp(struct gl_context *ctx, const struct marshal_cmd_StencilOp *cmd, const uint64_t *last)
7139{
7140   GLenum fail = cmd->fail;
7141   GLenum zfail = cmd->zfail;
7142   GLenum zpass = cmd->zpass;
7143   CALL_StencilOp(ctx->CurrentServerDispatch, (fail, zfail, zpass));
7144   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_StencilOp), 8) / 8);
7145   assert (cmd_size == cmd->cmd_base.cmd_size);
7146   return cmd_size;
7147}
7148void GLAPIENTRY
7149_mesa_marshal_StencilOp(GLenum fail, GLenum zfail, GLenum zpass)
7150{
7151   GET_CURRENT_CONTEXT(ctx);
7152   int cmd_size = sizeof(struct marshal_cmd_StencilOp);
7153   struct marshal_cmd_StencilOp *cmd;
7154   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_StencilOp, cmd_size);
7155   cmd->fail = fail;
7156   cmd->zfail = zfail;
7157   cmd->zpass = zpass;
7158}
7159
7160
7161/* DepthFunc: marshalled asynchronously */
7162struct marshal_cmd_DepthFunc
7163{
7164   struct marshal_cmd_base cmd_base;
7165   GLenum func;
7166};
7167uint32_t
7168_mesa_unmarshal_DepthFunc(struct gl_context *ctx, const struct marshal_cmd_DepthFunc *cmd, const uint64_t *last)
7169{
7170   GLenum func = cmd->func;
7171   CALL_DepthFunc(ctx->CurrentServerDispatch, (func));
7172   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DepthFunc), 8) / 8);
7173   assert (cmd_size == cmd->cmd_base.cmd_size);
7174   return cmd_size;
7175}
7176void GLAPIENTRY
7177_mesa_marshal_DepthFunc(GLenum func)
7178{
7179   GET_CURRENT_CONTEXT(ctx);
7180   int cmd_size = sizeof(struct marshal_cmd_DepthFunc);
7181   struct marshal_cmd_DepthFunc *cmd;
7182   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DepthFunc, cmd_size);
7183   cmd->func = func;
7184}
7185
7186
7187/* PixelZoom: marshalled asynchronously */
7188struct marshal_cmd_PixelZoom
7189{
7190   struct marshal_cmd_base cmd_base;
7191   GLfloat xfactor;
7192   GLfloat yfactor;
7193};
7194uint32_t
7195_mesa_unmarshal_PixelZoom(struct gl_context *ctx, const struct marshal_cmd_PixelZoom *cmd, const uint64_t *last)
7196{
7197   GLfloat xfactor = cmd->xfactor;
7198   GLfloat yfactor = cmd->yfactor;
7199   CALL_PixelZoom(ctx->CurrentServerDispatch, (xfactor, yfactor));
7200   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PixelZoom), 8) / 8);
7201   assert (cmd_size == cmd->cmd_base.cmd_size);
7202   return cmd_size;
7203}
7204void GLAPIENTRY
7205_mesa_marshal_PixelZoom(GLfloat xfactor, GLfloat yfactor)
7206{
7207   GET_CURRENT_CONTEXT(ctx);
7208   int cmd_size = sizeof(struct marshal_cmd_PixelZoom);
7209   struct marshal_cmd_PixelZoom *cmd;
7210   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PixelZoom, cmd_size);
7211   cmd->xfactor = xfactor;
7212   cmd->yfactor = yfactor;
7213}
7214
7215
7216/* PixelTransferf: marshalled asynchronously */
7217struct marshal_cmd_PixelTransferf
7218{
7219   struct marshal_cmd_base cmd_base;
7220   GLenum pname;
7221   GLfloat param;
7222};
7223uint32_t
7224_mesa_unmarshal_PixelTransferf(struct gl_context *ctx, const struct marshal_cmd_PixelTransferf *cmd, const uint64_t *last)
7225{
7226   GLenum pname = cmd->pname;
7227   GLfloat param = cmd->param;
7228   CALL_PixelTransferf(ctx->CurrentServerDispatch, (pname, param));
7229   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PixelTransferf), 8) / 8);
7230   assert (cmd_size == cmd->cmd_base.cmd_size);
7231   return cmd_size;
7232}
7233void GLAPIENTRY
7234_mesa_marshal_PixelTransferf(GLenum pname, GLfloat param)
7235{
7236   GET_CURRENT_CONTEXT(ctx);
7237   int cmd_size = sizeof(struct marshal_cmd_PixelTransferf);
7238   struct marshal_cmd_PixelTransferf *cmd;
7239   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PixelTransferf, cmd_size);
7240   cmd->pname = pname;
7241   cmd->param = param;
7242}
7243
7244
7245/* PixelTransferi: marshalled asynchronously */
7246struct marshal_cmd_PixelTransferi
7247{
7248   struct marshal_cmd_base cmd_base;
7249   GLenum pname;
7250   GLint param;
7251};
7252uint32_t
7253_mesa_unmarshal_PixelTransferi(struct gl_context *ctx, const struct marshal_cmd_PixelTransferi *cmd, const uint64_t *last)
7254{
7255   GLenum pname = cmd->pname;
7256   GLint param = cmd->param;
7257   CALL_PixelTransferi(ctx->CurrentServerDispatch, (pname, param));
7258   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PixelTransferi), 8) / 8);
7259   assert (cmd_size == cmd->cmd_base.cmd_size);
7260   return cmd_size;
7261}
7262void GLAPIENTRY
7263_mesa_marshal_PixelTransferi(GLenum pname, GLint param)
7264{
7265   GET_CURRENT_CONTEXT(ctx);
7266   int cmd_size = sizeof(struct marshal_cmd_PixelTransferi);
7267   struct marshal_cmd_PixelTransferi *cmd;
7268   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PixelTransferi, cmd_size);
7269   cmd->pname = pname;
7270   cmd->param = param;
7271}
7272
7273
7274/* PixelStoref: marshalled asynchronously */
7275struct marshal_cmd_PixelStoref
7276{
7277   struct marshal_cmd_base cmd_base;
7278   GLenum pname;
7279   GLfloat param;
7280};
7281uint32_t
7282_mesa_unmarshal_PixelStoref(struct gl_context *ctx, const struct marshal_cmd_PixelStoref *cmd, const uint64_t *last)
7283{
7284   GLenum pname = cmd->pname;
7285   GLfloat param = cmd->param;
7286   CALL_PixelStoref(ctx->CurrentServerDispatch, (pname, param));
7287   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PixelStoref), 8) / 8);
7288   assert (cmd_size == cmd->cmd_base.cmd_size);
7289   return cmd_size;
7290}
7291void GLAPIENTRY
7292_mesa_marshal_PixelStoref(GLenum pname, GLfloat param)
7293{
7294   GET_CURRENT_CONTEXT(ctx);
7295   int cmd_size = sizeof(struct marshal_cmd_PixelStoref);
7296   struct marshal_cmd_PixelStoref *cmd;
7297   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PixelStoref, cmd_size);
7298   cmd->pname = pname;
7299   cmd->param = param;
7300}
7301
7302
7303/* PixelStorei: marshalled asynchronously */
7304struct marshal_cmd_PixelStorei
7305{
7306   struct marshal_cmd_base cmd_base;
7307   GLenum pname;
7308   GLint param;
7309};
7310uint32_t
7311_mesa_unmarshal_PixelStorei(struct gl_context *ctx, const struct marshal_cmd_PixelStorei *cmd, const uint64_t *last)
7312{
7313   GLenum pname = cmd->pname;
7314   GLint param = cmd->param;
7315   CALL_PixelStorei(ctx->CurrentServerDispatch, (pname, param));
7316   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PixelStorei), 8) / 8);
7317   assert (cmd_size == cmd->cmd_base.cmd_size);
7318   return cmd_size;
7319}
7320void GLAPIENTRY
7321_mesa_marshal_PixelStorei(GLenum pname, GLint param)
7322{
7323   GET_CURRENT_CONTEXT(ctx);
7324   int cmd_size = sizeof(struct marshal_cmd_PixelStorei);
7325   struct marshal_cmd_PixelStorei *cmd;
7326   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PixelStorei, cmd_size);
7327   cmd->pname = pname;
7328   cmd->param = param;
7329}
7330
7331
7332/* PixelMapfv: marshalled asynchronously */
7333struct marshal_cmd_PixelMapfv
7334{
7335   struct marshal_cmd_base cmd_base;
7336   GLenum map;
7337   GLsizei mapsize;
7338   const GLfloat * values;
7339};
7340uint32_t
7341_mesa_unmarshal_PixelMapfv(struct gl_context *ctx, const struct marshal_cmd_PixelMapfv *cmd, const uint64_t *last)
7342{
7343   GLenum map = cmd->map;
7344   GLsizei mapsize = cmd->mapsize;
7345   const GLfloat * values = cmd->values;
7346   CALL_PixelMapfv(ctx->CurrentServerDispatch, (map, mapsize, values));
7347   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PixelMapfv), 8) / 8);
7348   assert (cmd_size == cmd->cmd_base.cmd_size);
7349   return cmd_size;
7350}
7351void GLAPIENTRY
7352_mesa_marshal_PixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values)
7353{
7354   GET_CURRENT_CONTEXT(ctx);
7355   int cmd_size = sizeof(struct marshal_cmd_PixelMapfv);
7356   struct marshal_cmd_PixelMapfv *cmd;
7357   if (_mesa_glthread_has_no_unpack_buffer(ctx)) {
7358      _mesa_glthread_finish_before(ctx, "PixelMapfv");
7359      CALL_PixelMapfv(ctx->CurrentServerDispatch, (map, mapsize, values));
7360      return;
7361   }
7362   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PixelMapfv, cmd_size);
7363   cmd->map = map;
7364   cmd->mapsize = mapsize;
7365   cmd->values = values;
7366}
7367
7368
7369/* PixelMapuiv: marshalled asynchronously */
7370struct marshal_cmd_PixelMapuiv
7371{
7372   struct marshal_cmd_base cmd_base;
7373   GLenum map;
7374   GLsizei mapsize;
7375   const GLuint * values;
7376};
7377uint32_t
7378_mesa_unmarshal_PixelMapuiv(struct gl_context *ctx, const struct marshal_cmd_PixelMapuiv *cmd, const uint64_t *last)
7379{
7380   GLenum map = cmd->map;
7381   GLsizei mapsize = cmd->mapsize;
7382   const GLuint * values = cmd->values;
7383   CALL_PixelMapuiv(ctx->CurrentServerDispatch, (map, mapsize, values));
7384   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PixelMapuiv), 8) / 8);
7385   assert (cmd_size == cmd->cmd_base.cmd_size);
7386   return cmd_size;
7387}
7388void GLAPIENTRY
7389_mesa_marshal_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values)
7390{
7391   GET_CURRENT_CONTEXT(ctx);
7392   int cmd_size = sizeof(struct marshal_cmd_PixelMapuiv);
7393   struct marshal_cmd_PixelMapuiv *cmd;
7394   if (_mesa_glthread_has_no_unpack_buffer(ctx)) {
7395      _mesa_glthread_finish_before(ctx, "PixelMapuiv");
7396      CALL_PixelMapuiv(ctx->CurrentServerDispatch, (map, mapsize, values));
7397      return;
7398   }
7399   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PixelMapuiv, cmd_size);
7400   cmd->map = map;
7401   cmd->mapsize = mapsize;
7402   cmd->values = values;
7403}
7404
7405
7406/* PixelMapusv: marshalled asynchronously */
7407struct marshal_cmd_PixelMapusv
7408{
7409   struct marshal_cmd_base cmd_base;
7410   GLenum map;
7411   GLsizei mapsize;
7412   const GLushort * values;
7413};
7414uint32_t
7415_mesa_unmarshal_PixelMapusv(struct gl_context *ctx, const struct marshal_cmd_PixelMapusv *cmd, const uint64_t *last)
7416{
7417   GLenum map = cmd->map;
7418   GLsizei mapsize = cmd->mapsize;
7419   const GLushort * values = cmd->values;
7420   CALL_PixelMapusv(ctx->CurrentServerDispatch, (map, mapsize, values));
7421   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_PixelMapusv), 8) / 8);
7422   assert (cmd_size == cmd->cmd_base.cmd_size);
7423   return cmd_size;
7424}
7425void GLAPIENTRY
7426_mesa_marshal_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values)
7427{
7428   GET_CURRENT_CONTEXT(ctx);
7429   int cmd_size = sizeof(struct marshal_cmd_PixelMapusv);
7430   struct marshal_cmd_PixelMapusv *cmd;
7431   if (_mesa_glthread_has_no_unpack_buffer(ctx)) {
7432      _mesa_glthread_finish_before(ctx, "PixelMapusv");
7433      CALL_PixelMapusv(ctx->CurrentServerDispatch, (map, mapsize, values));
7434      return;
7435   }
7436   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_PixelMapusv, cmd_size);
7437   cmd->map = map;
7438   cmd->mapsize = mapsize;
7439   cmd->values = values;
7440}
7441
7442
7443/* ReadBuffer: marshalled asynchronously */
7444struct marshal_cmd_ReadBuffer
7445{
7446   struct marshal_cmd_base cmd_base;
7447   GLenum mode;
7448};
7449uint32_t
7450_mesa_unmarshal_ReadBuffer(struct gl_context *ctx, const struct marshal_cmd_ReadBuffer *cmd, const uint64_t *last)
7451{
7452   GLenum mode = cmd->mode;
7453   CALL_ReadBuffer(ctx->CurrentServerDispatch, (mode));
7454   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ReadBuffer), 8) / 8);
7455   assert (cmd_size == cmd->cmd_base.cmd_size);
7456   return cmd_size;
7457}
7458void GLAPIENTRY
7459_mesa_marshal_ReadBuffer(GLenum mode)
7460{
7461   GET_CURRENT_CONTEXT(ctx);
7462   int cmd_size = sizeof(struct marshal_cmd_ReadBuffer);
7463   struct marshal_cmd_ReadBuffer *cmd;
7464   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ReadBuffer, cmd_size);
7465   cmd->mode = mode;
7466}
7467
7468
7469/* CopyPixels: marshalled asynchronously */
7470struct marshal_cmd_CopyPixels
7471{
7472   struct marshal_cmd_base cmd_base;
7473   GLint x;
7474   GLint y;
7475   GLsizei width;
7476   GLsizei height;
7477   GLenum type;
7478};
7479uint32_t
7480_mesa_unmarshal_CopyPixels(struct gl_context *ctx, const struct marshal_cmd_CopyPixels *cmd, const uint64_t *last)
7481{
7482   GLint x = cmd->x;
7483   GLint y = cmd->y;
7484   GLsizei width = cmd->width;
7485   GLsizei height = cmd->height;
7486   GLenum type = cmd->type;
7487   CALL_CopyPixels(ctx->CurrentServerDispatch, (x, y, width, height, type));
7488   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_CopyPixels), 8) / 8);
7489   assert (cmd_size == cmd->cmd_base.cmd_size);
7490   return cmd_size;
7491}
7492void GLAPIENTRY
7493_mesa_marshal_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
7494{
7495   GET_CURRENT_CONTEXT(ctx);
7496   int cmd_size = sizeof(struct marshal_cmd_CopyPixels);
7497   struct marshal_cmd_CopyPixels *cmd;
7498   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_CopyPixels, cmd_size);
7499   cmd->x = x;
7500   cmd->y = y;
7501   cmd->width = width;
7502   cmd->height = height;
7503   cmd->type = type;
7504}
7505
7506
7507/* ReadPixels: marshalled asynchronously */
7508struct marshal_cmd_ReadPixels
7509{
7510   struct marshal_cmd_base cmd_base;
7511   GLint x;
7512   GLint y;
7513   GLsizei width;
7514   GLsizei height;
7515   GLenum format;
7516   GLenum type;
7517   GLvoid * pixels;
7518};
7519uint32_t
7520_mesa_unmarshal_ReadPixels(struct gl_context *ctx, const struct marshal_cmd_ReadPixels *cmd, const uint64_t *last)
7521{
7522   GLint x = cmd->x;
7523   GLint y = cmd->y;
7524   GLsizei width = cmd->width;
7525   GLsizei height = cmd->height;
7526   GLenum format = cmd->format;
7527   GLenum type = cmd->type;
7528   GLvoid * pixels = cmd->pixels;
7529   CALL_ReadPixels(ctx->CurrentServerDispatch, (x, y, width, height, format, type, pixels));
7530   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_ReadPixels), 8) / 8);
7531   assert (cmd_size == cmd->cmd_base.cmd_size);
7532   return cmd_size;
7533}
7534void GLAPIENTRY
7535_mesa_marshal_ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels)
7536{
7537   GET_CURRENT_CONTEXT(ctx);
7538   int cmd_size = sizeof(struct marshal_cmd_ReadPixels);
7539   struct marshal_cmd_ReadPixels *cmd;
7540   if (_mesa_glthread_has_no_pack_buffer(ctx)) {
7541      _mesa_glthread_finish_before(ctx, "ReadPixels");
7542      CALL_ReadPixels(ctx->CurrentServerDispatch, (x, y, width, height, format, type, pixels));
7543      return;
7544   }
7545   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_ReadPixels, cmd_size);
7546   cmd->x = x;
7547   cmd->y = y;
7548   cmd->width = width;
7549   cmd->height = height;
7550   cmd->format = format;
7551   cmd->type = type;
7552   cmd->pixels = pixels;
7553}
7554
7555
7556/* DrawPixels: marshalled asynchronously */
7557struct marshal_cmd_DrawPixels
7558{
7559   struct marshal_cmd_base cmd_base;
7560   GLsizei width;
7561   GLsizei height;
7562   GLenum format;
7563   GLenum type;
7564   const GLvoid * pixels;
7565};
7566uint32_t
7567_mesa_unmarshal_DrawPixels(struct gl_context *ctx, const struct marshal_cmd_DrawPixels *cmd, const uint64_t *last)
7568{
7569   GLsizei width = cmd->width;
7570   GLsizei height = cmd->height;
7571   GLenum format = cmd->format;
7572   GLenum type = cmd->type;
7573   const GLvoid * pixels = cmd->pixels;
7574   CALL_DrawPixels(ctx->CurrentServerDispatch, (width, height, format, type, pixels));
7575   const unsigned cmd_size = (align(sizeof(struct marshal_cmd_DrawPixels), 8) / 8);
7576   assert (cmd_size == cmd->cmd_base.cmd_size);
7577   return cmd_size;
7578}
7579void GLAPIENTRY
7580_mesa_marshal_DrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels)
7581{
7582   GET_CURRENT_CONTEXT(ctx);
7583   int cmd_size = sizeof(struct marshal_cmd_DrawPixels);
7584   struct marshal_cmd_DrawPixels *cmd;
7585   if (_mesa_glthread_has_no_unpack_buffer(ctx)) {
7586      _mesa_glthread_finish_before(ctx, "DrawPixels");
7587      CALL_DrawPixels(ctx->CurrentServerDispatch, (width, height, format, type, pixels));
7588      return;
7589   }
7590   cmd = _mesa_glthread_allocate_command(ctx, DISPATCH_CMD_DrawPixels, cmd_size);
7591   cmd->width = width;
7592   cmd->height = height;
7593   cmd->format = format;
7594   cmd->type = type;
7595   cmd->pixels = pixels;
7596}
7597
7598
7599/* GetBooleanv: marshalled synchronously */
7600void GLAPIENTRY
7601_mesa_marshal_GetBooleanv(GLenum pname, GLboolean * params)
7602{
7603   GET_CURRENT_CONTEXT(ctx);
7604   _mesa_glthread_finish_before(ctx, "GetBooleanv");
7605   CALL_GetBooleanv(ctx->CurrentServerDispatch, (pname, params));
7606}
7607
7608
7609/* GetClipPlane: marshalled synchronously */
7610void GLAPIENTRY
7611_mesa_marshal_GetClipPlane(GLenum plane, GLdouble * equation)
7612{
7613   GET_CURRENT_CONTEXT(ctx);
7614   _mesa_glthread_finish_before(ctx, "GetClipPlane");
7615   CALL_GetClipPlane(ctx->CurrentServerDispatch, (plane, equation));
7616}
7617
7618
7619/* GetDoublev: marshalled synchronously */
7620void GLAPIENTRY
7621_mesa_marshal_GetDoublev(GLenum pname, GLdouble * params)
7622{
7623   GET_CURRENT_CONTEXT(ctx);
7624   _mesa_glthread_finish_before(ctx, "GetDoublev");
7625   CALL_GetDoublev(ctx->CurrentServerDispatch, (pname, params));
7626}
7627
7628
7629/* GetError: marshalled synchronously */
7630GLenum GLAPIENTRY
7631_mesa_marshal_GetError(void)
7632{
7633   GET_CURRENT_CONTEXT(ctx);
7634   _mesa_glthread_finish_before(ctx, "GetError");
7635   return CALL_GetError(ctx->CurrentServerDispatch, ());
7636}
7637
7638
7639/* GetFloatv: marshalled synchronously */
7640void GLAPIENTRY
7641_mesa_marshal_GetFloatv(GLenum pname, GLfloat * params)
7642{
7643   GET_CURRENT_CONTEXT(ctx);
7644   _mesa_glthread_finish_before(ctx, "GetFloatv");
7645   CALL_GetFloatv(ctx->CurrentServerDispatch, (pname, params));
7646}
7647
7648
7649/* GetLightfv: marshalled synchronously */
7650void GLAPIENTRY
7651_mesa_marshal_GetLightfv(GLenum light, GLenum pname, GLfloat * params)
7652{
7653   GET_CURRENT_CONTEXT(ctx);
7654   _mesa_glthread_finish_before(ctx, "GetLightfv");
7655   CALL_GetLightfv(ctx->CurrentServerDispatch, (light, pname, params));
7656}
7657
7658
7659/* GetLightiv: marshalled synchronously */
7660void GLAPIENTRY
7661_mesa_marshal_GetLightiv(GLenum light, GLenum pname, GLint * params)
7662{
7663   GET_CURRENT_CONTEXT(ctx);
7664   _mesa_glthread_finish_before(ctx, "GetLightiv");
7665   CALL_GetLightiv(ctx->CurrentServerDispatch, (light, pname, params));
7666}
7667
7668
7669/* GetMapdv: marshalled synchronously */
7670void GLAPIENTRY
7671_mesa_marshal_GetMapdv(GLenum target, GLenum query, GLdouble * v)
7672{
7673   GET_CURRENT_CONTEXT(ctx);
7674   _mesa_glthread_finish_before(ctx, "GetMapdv");
7675   CALL_GetMapdv(ctx->CurrentServerDispatch, (target, query, v));
7676}
7677
7678
7679/* GetMapfv: marshalled synchronously */
7680void GLAPIENTRY
7681_mesa_marshal_GetMapfv(GLenum target, GLenum query, GLfloat * v)
7682{
7683   GET_CURRENT_CONTEXT(ctx);
7684   _mesa_glthread_finish_before(ctx, "GetMapfv");
7685   CALL_GetMapfv(ctx->CurrentServerDispatch, (target, query, v));
7686}
7687
7688
7689/* GetMapiv: marshalled synchronously */
7690void GLAPIENTRY
7691_mesa_marshal_GetMapiv(GLenum target, GLenum query, GLint * v)
7692{
7693   GET_CURRENT_CONTEXT(ctx);
7694   _mesa_glthread_finish_before(ctx, "GetMapiv");
7695   CALL_GetMapiv(ctx->CurrentServerDispatch, (target, query, v));
7696}
7697
7698
7699/* GetMaterialfv: marshalled synchronously */
7700void GLAPIENTRY
7701_mesa_marshal_GetMaterialfv(GLenum face, GLenum pname, GLfloat * params)
7702{
7703   GET_CURRENT_CONTEXT(ctx);
7704   _mesa_glthread_finish_before(ctx, "GetMaterialfv");
7705   CALL_GetMaterialfv(ctx->CurrentServerDispatch, (face, pname, params));
7706}
7707
7708
7709/* GetMaterialiv: marshalled synchronously */
7710void GLAPIENTRY
7711_mesa_marshal_GetMaterialiv(GLenum face, GLenum pname, GLint * params)
7712{
7713   GET_CURRENT_CONTEXT(ctx);
7714   _mesa_glthread_finish_before(ctx, "GetMaterialiv");
7715   CALL_GetMaterialiv(ctx->CurrentServerDispatch, (face, pname, params));
7716}
7717
7718
7719