xref: /minix/external/mit/xorg/lib/libxcb/files/glx.c (revision 0a6a1f1d)
1 /*
2  * This file generated automatically from glx.xml by c_client.py.
3  * Edit at your peril.
4  */
5 
6 #ifdef HAVE_CONFIG_H
7 #include "config.h"
8 #endif
9 #include <stdlib.h>
10 #include <string.h>
11 #include <assert.h>
12 #include <stddef.h>  /* for offsetof() */
13 #include "xcbext.h"
14 #include "glx.h"
15 
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
17 #include "xproto.h"
18 
19 xcb_extension_t xcb_glx_id = { "GLX", 0 };
20 
21 void
xcb_glx_pixmap_next(xcb_glx_pixmap_iterator_t * i)22 xcb_glx_pixmap_next (xcb_glx_pixmap_iterator_t *i  /**< */)
23 {
24     --i->rem;
25     ++i->data;
26     i->index += sizeof(xcb_glx_pixmap_t);
27 }
28 
29 xcb_generic_iterator_t
xcb_glx_pixmap_end(xcb_glx_pixmap_iterator_t i)30 xcb_glx_pixmap_end (xcb_glx_pixmap_iterator_t i  /**< */)
31 {
32     xcb_generic_iterator_t ret;
33     ret.data = i.data + i.rem;
34     ret.index = i.index + ((char *) ret.data - (char *) i.data);
35     ret.rem = 0;
36     return ret;
37 }
38 
39 void
xcb_glx_context_next(xcb_glx_context_iterator_t * i)40 xcb_glx_context_next (xcb_glx_context_iterator_t *i  /**< */)
41 {
42     --i->rem;
43     ++i->data;
44     i->index += sizeof(xcb_glx_context_t);
45 }
46 
47 xcb_generic_iterator_t
xcb_glx_context_end(xcb_glx_context_iterator_t i)48 xcb_glx_context_end (xcb_glx_context_iterator_t i  /**< */)
49 {
50     xcb_generic_iterator_t ret;
51     ret.data = i.data + i.rem;
52     ret.index = i.index + ((char *) ret.data - (char *) i.data);
53     ret.rem = 0;
54     return ret;
55 }
56 
57 void
xcb_glx_pbuffer_next(xcb_glx_pbuffer_iterator_t * i)58 xcb_glx_pbuffer_next (xcb_glx_pbuffer_iterator_t *i  /**< */)
59 {
60     --i->rem;
61     ++i->data;
62     i->index += sizeof(xcb_glx_pbuffer_t);
63 }
64 
65 xcb_generic_iterator_t
xcb_glx_pbuffer_end(xcb_glx_pbuffer_iterator_t i)66 xcb_glx_pbuffer_end (xcb_glx_pbuffer_iterator_t i  /**< */)
67 {
68     xcb_generic_iterator_t ret;
69     ret.data = i.data + i.rem;
70     ret.index = i.index + ((char *) ret.data - (char *) i.data);
71     ret.rem = 0;
72     return ret;
73 }
74 
75 void
xcb_glx_window_next(xcb_glx_window_iterator_t * i)76 xcb_glx_window_next (xcb_glx_window_iterator_t *i  /**< */)
77 {
78     --i->rem;
79     ++i->data;
80     i->index += sizeof(xcb_glx_window_t);
81 }
82 
83 xcb_generic_iterator_t
xcb_glx_window_end(xcb_glx_window_iterator_t i)84 xcb_glx_window_end (xcb_glx_window_iterator_t i  /**< */)
85 {
86     xcb_generic_iterator_t ret;
87     ret.data = i.data + i.rem;
88     ret.index = i.index + ((char *) ret.data - (char *) i.data);
89     ret.rem = 0;
90     return ret;
91 }
92 
93 void
xcb_glx_fbconfig_next(xcb_glx_fbconfig_iterator_t * i)94 xcb_glx_fbconfig_next (xcb_glx_fbconfig_iterator_t *i  /**< */)
95 {
96     --i->rem;
97     ++i->data;
98     i->index += sizeof(xcb_glx_fbconfig_t);
99 }
100 
101 xcb_generic_iterator_t
xcb_glx_fbconfig_end(xcb_glx_fbconfig_iterator_t i)102 xcb_glx_fbconfig_end (xcb_glx_fbconfig_iterator_t i  /**< */)
103 {
104     xcb_generic_iterator_t ret;
105     ret.data = i.data + i.rem;
106     ret.index = i.index + ((char *) ret.data - (char *) i.data);
107     ret.rem = 0;
108     return ret;
109 }
110 
111 void
xcb_glx_drawable_next(xcb_glx_drawable_iterator_t * i)112 xcb_glx_drawable_next (xcb_glx_drawable_iterator_t *i  /**< */)
113 {
114     --i->rem;
115     ++i->data;
116     i->index += sizeof(xcb_glx_drawable_t);
117 }
118 
119 xcb_generic_iterator_t
xcb_glx_drawable_end(xcb_glx_drawable_iterator_t i)120 xcb_glx_drawable_end (xcb_glx_drawable_iterator_t i  /**< */)
121 {
122     xcb_generic_iterator_t ret;
123     ret.data = i.data + i.rem;
124     ret.index = i.index + ((char *) ret.data - (char *) i.data);
125     ret.rem = 0;
126     return ret;
127 }
128 
129 void
xcb_glx_float32_next(xcb_glx_float32_iterator_t * i)130 xcb_glx_float32_next (xcb_glx_float32_iterator_t *i  /**< */)
131 {
132     --i->rem;
133     ++i->data;
134     i->index += sizeof(xcb_glx_float32_t);
135 }
136 
137 xcb_generic_iterator_t
xcb_glx_float32_end(xcb_glx_float32_iterator_t i)138 xcb_glx_float32_end (xcb_glx_float32_iterator_t i  /**< */)
139 {
140     xcb_generic_iterator_t ret;
141     ret.data = i.data + i.rem;
142     ret.index = i.index + ((char *) ret.data - (char *) i.data);
143     ret.rem = 0;
144     return ret;
145 }
146 
147 void
xcb_glx_float64_next(xcb_glx_float64_iterator_t * i)148 xcb_glx_float64_next (xcb_glx_float64_iterator_t *i  /**< */)
149 {
150     --i->rem;
151     ++i->data;
152     i->index += sizeof(xcb_glx_float64_t);
153 }
154 
155 xcb_generic_iterator_t
xcb_glx_float64_end(xcb_glx_float64_iterator_t i)156 xcb_glx_float64_end (xcb_glx_float64_iterator_t i  /**< */)
157 {
158     xcb_generic_iterator_t ret;
159     ret.data = i.data + i.rem;
160     ret.index = i.index + ((char *) ret.data - (char *) i.data);
161     ret.rem = 0;
162     return ret;
163 }
164 
165 void
xcb_glx_bool32_next(xcb_glx_bool32_iterator_t * i)166 xcb_glx_bool32_next (xcb_glx_bool32_iterator_t *i  /**< */)
167 {
168     --i->rem;
169     ++i->data;
170     i->index += sizeof(xcb_glx_bool32_t);
171 }
172 
173 xcb_generic_iterator_t
xcb_glx_bool32_end(xcb_glx_bool32_iterator_t i)174 xcb_glx_bool32_end (xcb_glx_bool32_iterator_t i  /**< */)
175 {
176     xcb_generic_iterator_t ret;
177     ret.data = i.data + i.rem;
178     ret.index = i.index + ((char *) ret.data - (char *) i.data);
179     ret.rem = 0;
180     return ret;
181 }
182 
183 void
xcb_glx_context_tag_next(xcb_glx_context_tag_iterator_t * i)184 xcb_glx_context_tag_next (xcb_glx_context_tag_iterator_t *i  /**< */)
185 {
186     --i->rem;
187     ++i->data;
188     i->index += sizeof(xcb_glx_context_tag_t);
189 }
190 
191 xcb_generic_iterator_t
xcb_glx_context_tag_end(xcb_glx_context_tag_iterator_t i)192 xcb_glx_context_tag_end (xcb_glx_context_tag_iterator_t i  /**< */)
193 {
194     xcb_generic_iterator_t ret;
195     ret.data = i.data + i.rem;
196     ret.index = i.index + ((char *) ret.data - (char *) i.data);
197     ret.rem = 0;
198     return ret;
199 }
200 
201 int
xcb_glx_render_sizeof(const void * _buffer,uint32_t data_len)202 xcb_glx_render_sizeof (const void  *_buffer  /**< */,
203                        uint32_t     data_len  /**< */)
204 {
205     char *xcb_tmp = (char *)_buffer;
206     unsigned int xcb_buffer_len = 0;
207     unsigned int xcb_block_len = 0;
208     unsigned int xcb_pad = 0;
209     unsigned int xcb_align_to = 0;
210 
211 
212     xcb_block_len += sizeof(xcb_glx_render_request_t);
213     xcb_tmp += xcb_block_len;
214     xcb_buffer_len += xcb_block_len;
215     xcb_block_len = 0;
216     /* data */
217     xcb_block_len += data_len * sizeof(uint8_t);
218     xcb_tmp += xcb_block_len;
219     xcb_align_to = ALIGNOF(uint8_t);
220     /* insert padding */
221     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
222     xcb_buffer_len += xcb_block_len + xcb_pad;
223     if (0 != xcb_pad) {
224         xcb_tmp += xcb_pad;
225         xcb_pad = 0;
226     }
227     xcb_block_len = 0;
228 
229     return xcb_buffer_len;
230 }
231 
232 xcb_void_cookie_t
xcb_glx_render_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t data_len,const uint8_t * data)233 xcb_glx_render_checked (xcb_connection_t      *c  /**< */,
234                         xcb_glx_context_tag_t  context_tag  /**< */,
235                         uint32_t               data_len  /**< */,
236                         const uint8_t         *data  /**< */)
237 {
238     static const xcb_protocol_request_t xcb_req = {
239         /* count */ 4,
240         /* ext */ &xcb_glx_id,
241         /* opcode */ XCB_GLX_RENDER,
242         /* isvoid */ 1
243     };
244 
245     struct iovec xcb_parts[6];
246     xcb_void_cookie_t xcb_ret;
247     xcb_glx_render_request_t xcb_out;
248 
249     xcb_out.context_tag = context_tag;
250 
251     xcb_parts[2].iov_base = (char *) &xcb_out;
252     xcb_parts[2].iov_len = sizeof(xcb_out);
253     xcb_parts[3].iov_base = 0;
254     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
255     /* uint8_t data */
256     xcb_parts[4].iov_base = (char *) data;
257     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
258     xcb_parts[5].iov_base = 0;
259     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
260 
261     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
262     return xcb_ret;
263 }
264 
265 xcb_void_cookie_t
xcb_glx_render(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t data_len,const uint8_t * data)266 xcb_glx_render (xcb_connection_t      *c  /**< */,
267                 xcb_glx_context_tag_t  context_tag  /**< */,
268                 uint32_t               data_len  /**< */,
269                 const uint8_t         *data  /**< */)
270 {
271     static const xcb_protocol_request_t xcb_req = {
272         /* count */ 4,
273         /* ext */ &xcb_glx_id,
274         /* opcode */ XCB_GLX_RENDER,
275         /* isvoid */ 1
276     };
277 
278     struct iovec xcb_parts[6];
279     xcb_void_cookie_t xcb_ret;
280     xcb_glx_render_request_t xcb_out;
281 
282     xcb_out.context_tag = context_tag;
283 
284     xcb_parts[2].iov_base = (char *) &xcb_out;
285     xcb_parts[2].iov_len = sizeof(xcb_out);
286     xcb_parts[3].iov_base = 0;
287     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
288     /* uint8_t data */
289     xcb_parts[4].iov_base = (char *) data;
290     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
291     xcb_parts[5].iov_base = 0;
292     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
293 
294     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
295     return xcb_ret;
296 }
297 
298 int
xcb_glx_render_large_sizeof(const void * _buffer)299 xcb_glx_render_large_sizeof (const void  *_buffer  /**< */)
300 {
301     char *xcb_tmp = (char *)_buffer;
302     const xcb_glx_render_large_request_t *_aux = (xcb_glx_render_large_request_t *)_buffer;
303     unsigned int xcb_buffer_len = 0;
304     unsigned int xcb_block_len = 0;
305     unsigned int xcb_pad = 0;
306     unsigned int xcb_align_to = 0;
307 
308 
309     xcb_block_len += sizeof(xcb_glx_render_large_request_t);
310     xcb_tmp += xcb_block_len;
311     xcb_buffer_len += xcb_block_len;
312     xcb_block_len = 0;
313     /* data */
314     xcb_block_len += _aux->data_len * sizeof(uint8_t);
315     xcb_tmp += xcb_block_len;
316     xcb_align_to = ALIGNOF(uint8_t);
317     /* insert padding */
318     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
319     xcb_buffer_len += xcb_block_len + xcb_pad;
320     if (0 != xcb_pad) {
321         xcb_tmp += xcb_pad;
322         xcb_pad = 0;
323     }
324     xcb_block_len = 0;
325 
326     return xcb_buffer_len;
327 }
328 
329 xcb_void_cookie_t
xcb_glx_render_large_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint16_t request_num,uint16_t request_total,uint32_t data_len,const uint8_t * data)330 xcb_glx_render_large_checked (xcb_connection_t      *c  /**< */,
331                               xcb_glx_context_tag_t  context_tag  /**< */,
332                               uint16_t               request_num  /**< */,
333                               uint16_t               request_total  /**< */,
334                               uint32_t               data_len  /**< */,
335                               const uint8_t         *data  /**< */)
336 {
337     static const xcb_protocol_request_t xcb_req = {
338         /* count */ 4,
339         /* ext */ &xcb_glx_id,
340         /* opcode */ XCB_GLX_RENDER_LARGE,
341         /* isvoid */ 1
342     };
343 
344     struct iovec xcb_parts[6];
345     xcb_void_cookie_t xcb_ret;
346     xcb_glx_render_large_request_t xcb_out;
347 
348     xcb_out.context_tag = context_tag;
349     xcb_out.request_num = request_num;
350     xcb_out.request_total = request_total;
351     xcb_out.data_len = data_len;
352 
353     xcb_parts[2].iov_base = (char *) &xcb_out;
354     xcb_parts[2].iov_len = sizeof(xcb_out);
355     xcb_parts[3].iov_base = 0;
356     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
357     /* uint8_t data */
358     xcb_parts[4].iov_base = (char *) data;
359     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
360     xcb_parts[5].iov_base = 0;
361     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
362 
363     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
364     return xcb_ret;
365 }
366 
367 xcb_void_cookie_t
xcb_glx_render_large(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint16_t request_num,uint16_t request_total,uint32_t data_len,const uint8_t * data)368 xcb_glx_render_large (xcb_connection_t      *c  /**< */,
369                       xcb_glx_context_tag_t  context_tag  /**< */,
370                       uint16_t               request_num  /**< */,
371                       uint16_t               request_total  /**< */,
372                       uint32_t               data_len  /**< */,
373                       const uint8_t         *data  /**< */)
374 {
375     static const xcb_protocol_request_t xcb_req = {
376         /* count */ 4,
377         /* ext */ &xcb_glx_id,
378         /* opcode */ XCB_GLX_RENDER_LARGE,
379         /* isvoid */ 1
380     };
381 
382     struct iovec xcb_parts[6];
383     xcb_void_cookie_t xcb_ret;
384     xcb_glx_render_large_request_t xcb_out;
385 
386     xcb_out.context_tag = context_tag;
387     xcb_out.request_num = request_num;
388     xcb_out.request_total = request_total;
389     xcb_out.data_len = data_len;
390 
391     xcb_parts[2].iov_base = (char *) &xcb_out;
392     xcb_parts[2].iov_len = sizeof(xcb_out);
393     xcb_parts[3].iov_base = 0;
394     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
395     /* uint8_t data */
396     xcb_parts[4].iov_base = (char *) data;
397     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
398     xcb_parts[5].iov_base = 0;
399     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
400 
401     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
402     return xcb_ret;
403 }
404 
405 xcb_void_cookie_t
xcb_glx_create_context_checked(xcb_connection_t * c,xcb_glx_context_t context,xcb_visualid_t visual,uint32_t screen,xcb_glx_context_t share_list,uint8_t is_direct)406 xcb_glx_create_context_checked (xcb_connection_t  *c  /**< */,
407                                 xcb_glx_context_t  context  /**< */,
408                                 xcb_visualid_t     visual  /**< */,
409                                 uint32_t           screen  /**< */,
410                                 xcb_glx_context_t  share_list  /**< */,
411                                 uint8_t            is_direct  /**< */)
412 {
413     static const xcb_protocol_request_t xcb_req = {
414         /* count */ 2,
415         /* ext */ &xcb_glx_id,
416         /* opcode */ XCB_GLX_CREATE_CONTEXT,
417         /* isvoid */ 1
418     };
419 
420     struct iovec xcb_parts[4];
421     xcb_void_cookie_t xcb_ret;
422     xcb_glx_create_context_request_t xcb_out;
423 
424     xcb_out.context = context;
425     xcb_out.visual = visual;
426     xcb_out.screen = screen;
427     xcb_out.share_list = share_list;
428     xcb_out.is_direct = is_direct;
429     memset(xcb_out.pad0, 0, 3);
430 
431     xcb_parts[2].iov_base = (char *) &xcb_out;
432     xcb_parts[2].iov_len = sizeof(xcb_out);
433     xcb_parts[3].iov_base = 0;
434     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
435 
436     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
437     return xcb_ret;
438 }
439 
440 xcb_void_cookie_t
xcb_glx_create_context(xcb_connection_t * c,xcb_glx_context_t context,xcb_visualid_t visual,uint32_t screen,xcb_glx_context_t share_list,uint8_t is_direct)441 xcb_glx_create_context (xcb_connection_t  *c  /**< */,
442                         xcb_glx_context_t  context  /**< */,
443                         xcb_visualid_t     visual  /**< */,
444                         uint32_t           screen  /**< */,
445                         xcb_glx_context_t  share_list  /**< */,
446                         uint8_t            is_direct  /**< */)
447 {
448     static const xcb_protocol_request_t xcb_req = {
449         /* count */ 2,
450         /* ext */ &xcb_glx_id,
451         /* opcode */ XCB_GLX_CREATE_CONTEXT,
452         /* isvoid */ 1
453     };
454 
455     struct iovec xcb_parts[4];
456     xcb_void_cookie_t xcb_ret;
457     xcb_glx_create_context_request_t xcb_out;
458 
459     xcb_out.context = context;
460     xcb_out.visual = visual;
461     xcb_out.screen = screen;
462     xcb_out.share_list = share_list;
463     xcb_out.is_direct = is_direct;
464     memset(xcb_out.pad0, 0, 3);
465 
466     xcb_parts[2].iov_base = (char *) &xcb_out;
467     xcb_parts[2].iov_len = sizeof(xcb_out);
468     xcb_parts[3].iov_base = 0;
469     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
470 
471     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
472     return xcb_ret;
473 }
474 
475 xcb_void_cookie_t
xcb_glx_destroy_context_checked(xcb_connection_t * c,xcb_glx_context_t context)476 xcb_glx_destroy_context_checked (xcb_connection_t  *c  /**< */,
477                                  xcb_glx_context_t  context  /**< */)
478 {
479     static const xcb_protocol_request_t xcb_req = {
480         /* count */ 2,
481         /* ext */ &xcb_glx_id,
482         /* opcode */ XCB_GLX_DESTROY_CONTEXT,
483         /* isvoid */ 1
484     };
485 
486     struct iovec xcb_parts[4];
487     xcb_void_cookie_t xcb_ret;
488     xcb_glx_destroy_context_request_t xcb_out;
489 
490     xcb_out.context = context;
491 
492     xcb_parts[2].iov_base = (char *) &xcb_out;
493     xcb_parts[2].iov_len = sizeof(xcb_out);
494     xcb_parts[3].iov_base = 0;
495     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
496 
497     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
498     return xcb_ret;
499 }
500 
501 xcb_void_cookie_t
xcb_glx_destroy_context(xcb_connection_t * c,xcb_glx_context_t context)502 xcb_glx_destroy_context (xcb_connection_t  *c  /**< */,
503                          xcb_glx_context_t  context  /**< */)
504 {
505     static const xcb_protocol_request_t xcb_req = {
506         /* count */ 2,
507         /* ext */ &xcb_glx_id,
508         /* opcode */ XCB_GLX_DESTROY_CONTEXT,
509         /* isvoid */ 1
510     };
511 
512     struct iovec xcb_parts[4];
513     xcb_void_cookie_t xcb_ret;
514     xcb_glx_destroy_context_request_t xcb_out;
515 
516     xcb_out.context = context;
517 
518     xcb_parts[2].iov_base = (char *) &xcb_out;
519     xcb_parts[2].iov_len = sizeof(xcb_out);
520     xcb_parts[3].iov_base = 0;
521     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
522 
523     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
524     return xcb_ret;
525 }
526 
527 xcb_glx_make_current_cookie_t
xcb_glx_make_current(xcb_connection_t * c,xcb_glx_drawable_t drawable,xcb_glx_context_t context,xcb_glx_context_tag_t old_context_tag)528 xcb_glx_make_current (xcb_connection_t      *c  /**< */,
529                       xcb_glx_drawable_t     drawable  /**< */,
530                       xcb_glx_context_t      context  /**< */,
531                       xcb_glx_context_tag_t  old_context_tag  /**< */)
532 {
533     static const xcb_protocol_request_t xcb_req = {
534         /* count */ 2,
535         /* ext */ &xcb_glx_id,
536         /* opcode */ XCB_GLX_MAKE_CURRENT,
537         /* isvoid */ 0
538     };
539 
540     struct iovec xcb_parts[4];
541     xcb_glx_make_current_cookie_t xcb_ret;
542     xcb_glx_make_current_request_t xcb_out;
543 
544     xcb_out.drawable = drawable;
545     xcb_out.context = context;
546     xcb_out.old_context_tag = old_context_tag;
547 
548     xcb_parts[2].iov_base = (char *) &xcb_out;
549     xcb_parts[2].iov_len = sizeof(xcb_out);
550     xcb_parts[3].iov_base = 0;
551     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
552 
553     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
554     return xcb_ret;
555 }
556 
557 xcb_glx_make_current_cookie_t
xcb_glx_make_current_unchecked(xcb_connection_t * c,xcb_glx_drawable_t drawable,xcb_glx_context_t context,xcb_glx_context_tag_t old_context_tag)558 xcb_glx_make_current_unchecked (xcb_connection_t      *c  /**< */,
559                                 xcb_glx_drawable_t     drawable  /**< */,
560                                 xcb_glx_context_t      context  /**< */,
561                                 xcb_glx_context_tag_t  old_context_tag  /**< */)
562 {
563     static const xcb_protocol_request_t xcb_req = {
564         /* count */ 2,
565         /* ext */ &xcb_glx_id,
566         /* opcode */ XCB_GLX_MAKE_CURRENT,
567         /* isvoid */ 0
568     };
569 
570     struct iovec xcb_parts[4];
571     xcb_glx_make_current_cookie_t xcb_ret;
572     xcb_glx_make_current_request_t xcb_out;
573 
574     xcb_out.drawable = drawable;
575     xcb_out.context = context;
576     xcb_out.old_context_tag = old_context_tag;
577 
578     xcb_parts[2].iov_base = (char *) &xcb_out;
579     xcb_parts[2].iov_len = sizeof(xcb_out);
580     xcb_parts[3].iov_base = 0;
581     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
582 
583     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
584     return xcb_ret;
585 }
586 
587 xcb_glx_make_current_reply_t *
xcb_glx_make_current_reply(xcb_connection_t * c,xcb_glx_make_current_cookie_t cookie,xcb_generic_error_t ** e)588 xcb_glx_make_current_reply (xcb_connection_t               *c  /**< */,
589                             xcb_glx_make_current_cookie_t   cookie  /**< */,
590                             xcb_generic_error_t           **e  /**< */)
591 {
592     return (xcb_glx_make_current_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
593 }
594 
595 xcb_glx_is_direct_cookie_t
xcb_glx_is_direct(xcb_connection_t * c,xcb_glx_context_t context)596 xcb_glx_is_direct (xcb_connection_t  *c  /**< */,
597                    xcb_glx_context_t  context  /**< */)
598 {
599     static const xcb_protocol_request_t xcb_req = {
600         /* count */ 2,
601         /* ext */ &xcb_glx_id,
602         /* opcode */ XCB_GLX_IS_DIRECT,
603         /* isvoid */ 0
604     };
605 
606     struct iovec xcb_parts[4];
607     xcb_glx_is_direct_cookie_t xcb_ret;
608     xcb_glx_is_direct_request_t xcb_out;
609 
610     xcb_out.context = context;
611 
612     xcb_parts[2].iov_base = (char *) &xcb_out;
613     xcb_parts[2].iov_len = sizeof(xcb_out);
614     xcb_parts[3].iov_base = 0;
615     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
616 
617     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
618     return xcb_ret;
619 }
620 
621 xcb_glx_is_direct_cookie_t
xcb_glx_is_direct_unchecked(xcb_connection_t * c,xcb_glx_context_t context)622 xcb_glx_is_direct_unchecked (xcb_connection_t  *c  /**< */,
623                              xcb_glx_context_t  context  /**< */)
624 {
625     static const xcb_protocol_request_t xcb_req = {
626         /* count */ 2,
627         /* ext */ &xcb_glx_id,
628         /* opcode */ XCB_GLX_IS_DIRECT,
629         /* isvoid */ 0
630     };
631 
632     struct iovec xcb_parts[4];
633     xcb_glx_is_direct_cookie_t xcb_ret;
634     xcb_glx_is_direct_request_t xcb_out;
635 
636     xcb_out.context = context;
637 
638     xcb_parts[2].iov_base = (char *) &xcb_out;
639     xcb_parts[2].iov_len = sizeof(xcb_out);
640     xcb_parts[3].iov_base = 0;
641     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
642 
643     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
644     return xcb_ret;
645 }
646 
647 xcb_glx_is_direct_reply_t *
xcb_glx_is_direct_reply(xcb_connection_t * c,xcb_glx_is_direct_cookie_t cookie,xcb_generic_error_t ** e)648 xcb_glx_is_direct_reply (xcb_connection_t            *c  /**< */,
649                          xcb_glx_is_direct_cookie_t   cookie  /**< */,
650                          xcb_generic_error_t        **e  /**< */)
651 {
652     return (xcb_glx_is_direct_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
653 }
654 
655 xcb_glx_query_version_cookie_t
xcb_glx_query_version(xcb_connection_t * c,uint32_t major_version,uint32_t minor_version)656 xcb_glx_query_version (xcb_connection_t *c  /**< */,
657                        uint32_t          major_version  /**< */,
658                        uint32_t          minor_version  /**< */)
659 {
660     static const xcb_protocol_request_t xcb_req = {
661         /* count */ 2,
662         /* ext */ &xcb_glx_id,
663         /* opcode */ XCB_GLX_QUERY_VERSION,
664         /* isvoid */ 0
665     };
666 
667     struct iovec xcb_parts[4];
668     xcb_glx_query_version_cookie_t xcb_ret;
669     xcb_glx_query_version_request_t xcb_out;
670 
671     xcb_out.major_version = major_version;
672     xcb_out.minor_version = minor_version;
673 
674     xcb_parts[2].iov_base = (char *) &xcb_out;
675     xcb_parts[2].iov_len = sizeof(xcb_out);
676     xcb_parts[3].iov_base = 0;
677     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
678 
679     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
680     return xcb_ret;
681 }
682 
683 xcb_glx_query_version_cookie_t
xcb_glx_query_version_unchecked(xcb_connection_t * c,uint32_t major_version,uint32_t minor_version)684 xcb_glx_query_version_unchecked (xcb_connection_t *c  /**< */,
685                                  uint32_t          major_version  /**< */,
686                                  uint32_t          minor_version  /**< */)
687 {
688     static const xcb_protocol_request_t xcb_req = {
689         /* count */ 2,
690         /* ext */ &xcb_glx_id,
691         /* opcode */ XCB_GLX_QUERY_VERSION,
692         /* isvoid */ 0
693     };
694 
695     struct iovec xcb_parts[4];
696     xcb_glx_query_version_cookie_t xcb_ret;
697     xcb_glx_query_version_request_t xcb_out;
698 
699     xcb_out.major_version = major_version;
700     xcb_out.minor_version = minor_version;
701 
702     xcb_parts[2].iov_base = (char *) &xcb_out;
703     xcb_parts[2].iov_len = sizeof(xcb_out);
704     xcb_parts[3].iov_base = 0;
705     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
706 
707     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
708     return xcb_ret;
709 }
710 
711 xcb_glx_query_version_reply_t *
xcb_glx_query_version_reply(xcb_connection_t * c,xcb_glx_query_version_cookie_t cookie,xcb_generic_error_t ** e)712 xcb_glx_query_version_reply (xcb_connection_t                *c  /**< */,
713                              xcb_glx_query_version_cookie_t   cookie  /**< */,
714                              xcb_generic_error_t            **e  /**< */)
715 {
716     return (xcb_glx_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
717 }
718 
719 xcb_void_cookie_t
xcb_glx_wait_gl_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)720 xcb_glx_wait_gl_checked (xcb_connection_t      *c  /**< */,
721                          xcb_glx_context_tag_t  context_tag  /**< */)
722 {
723     static const xcb_protocol_request_t xcb_req = {
724         /* count */ 2,
725         /* ext */ &xcb_glx_id,
726         /* opcode */ XCB_GLX_WAIT_GL,
727         /* isvoid */ 1
728     };
729 
730     struct iovec xcb_parts[4];
731     xcb_void_cookie_t xcb_ret;
732     xcb_glx_wait_gl_request_t xcb_out;
733 
734     xcb_out.context_tag = context_tag;
735 
736     xcb_parts[2].iov_base = (char *) &xcb_out;
737     xcb_parts[2].iov_len = sizeof(xcb_out);
738     xcb_parts[3].iov_base = 0;
739     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
740 
741     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
742     return xcb_ret;
743 }
744 
745 xcb_void_cookie_t
xcb_glx_wait_gl(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)746 xcb_glx_wait_gl (xcb_connection_t      *c  /**< */,
747                  xcb_glx_context_tag_t  context_tag  /**< */)
748 {
749     static const xcb_protocol_request_t xcb_req = {
750         /* count */ 2,
751         /* ext */ &xcb_glx_id,
752         /* opcode */ XCB_GLX_WAIT_GL,
753         /* isvoid */ 1
754     };
755 
756     struct iovec xcb_parts[4];
757     xcb_void_cookie_t xcb_ret;
758     xcb_glx_wait_gl_request_t xcb_out;
759 
760     xcb_out.context_tag = context_tag;
761 
762     xcb_parts[2].iov_base = (char *) &xcb_out;
763     xcb_parts[2].iov_len = sizeof(xcb_out);
764     xcb_parts[3].iov_base = 0;
765     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
766 
767     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
768     return xcb_ret;
769 }
770 
771 xcb_void_cookie_t
xcb_glx_wait_x_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)772 xcb_glx_wait_x_checked (xcb_connection_t      *c  /**< */,
773                         xcb_glx_context_tag_t  context_tag  /**< */)
774 {
775     static const xcb_protocol_request_t xcb_req = {
776         /* count */ 2,
777         /* ext */ &xcb_glx_id,
778         /* opcode */ XCB_GLX_WAIT_X,
779         /* isvoid */ 1
780     };
781 
782     struct iovec xcb_parts[4];
783     xcb_void_cookie_t xcb_ret;
784     xcb_glx_wait_x_request_t xcb_out;
785 
786     xcb_out.context_tag = context_tag;
787 
788     xcb_parts[2].iov_base = (char *) &xcb_out;
789     xcb_parts[2].iov_len = sizeof(xcb_out);
790     xcb_parts[3].iov_base = 0;
791     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
792 
793     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
794     return xcb_ret;
795 }
796 
797 xcb_void_cookie_t
xcb_glx_wait_x(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)798 xcb_glx_wait_x (xcb_connection_t      *c  /**< */,
799                 xcb_glx_context_tag_t  context_tag  /**< */)
800 {
801     static const xcb_protocol_request_t xcb_req = {
802         /* count */ 2,
803         /* ext */ &xcb_glx_id,
804         /* opcode */ XCB_GLX_WAIT_X,
805         /* isvoid */ 1
806     };
807 
808     struct iovec xcb_parts[4];
809     xcb_void_cookie_t xcb_ret;
810     xcb_glx_wait_x_request_t xcb_out;
811 
812     xcb_out.context_tag = context_tag;
813 
814     xcb_parts[2].iov_base = (char *) &xcb_out;
815     xcb_parts[2].iov_len = sizeof(xcb_out);
816     xcb_parts[3].iov_base = 0;
817     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
818 
819     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
820     return xcb_ret;
821 }
822 
823 xcb_void_cookie_t
xcb_glx_copy_context_checked(xcb_connection_t * c,xcb_glx_context_t src,xcb_glx_context_t dest,uint32_t mask,xcb_glx_context_tag_t src_context_tag)824 xcb_glx_copy_context_checked (xcb_connection_t      *c  /**< */,
825                               xcb_glx_context_t      src  /**< */,
826                               xcb_glx_context_t      dest  /**< */,
827                               uint32_t               mask  /**< */,
828                               xcb_glx_context_tag_t  src_context_tag  /**< */)
829 {
830     static const xcb_protocol_request_t xcb_req = {
831         /* count */ 2,
832         /* ext */ &xcb_glx_id,
833         /* opcode */ XCB_GLX_COPY_CONTEXT,
834         /* isvoid */ 1
835     };
836 
837     struct iovec xcb_parts[4];
838     xcb_void_cookie_t xcb_ret;
839     xcb_glx_copy_context_request_t xcb_out;
840 
841     xcb_out.src = src;
842     xcb_out.dest = dest;
843     xcb_out.mask = mask;
844     xcb_out.src_context_tag = src_context_tag;
845 
846     xcb_parts[2].iov_base = (char *) &xcb_out;
847     xcb_parts[2].iov_len = sizeof(xcb_out);
848     xcb_parts[3].iov_base = 0;
849     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
850 
851     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
852     return xcb_ret;
853 }
854 
855 xcb_void_cookie_t
xcb_glx_copy_context(xcb_connection_t * c,xcb_glx_context_t src,xcb_glx_context_t dest,uint32_t mask,xcb_glx_context_tag_t src_context_tag)856 xcb_glx_copy_context (xcb_connection_t      *c  /**< */,
857                       xcb_glx_context_t      src  /**< */,
858                       xcb_glx_context_t      dest  /**< */,
859                       uint32_t               mask  /**< */,
860                       xcb_glx_context_tag_t  src_context_tag  /**< */)
861 {
862     static const xcb_protocol_request_t xcb_req = {
863         /* count */ 2,
864         /* ext */ &xcb_glx_id,
865         /* opcode */ XCB_GLX_COPY_CONTEXT,
866         /* isvoid */ 1
867     };
868 
869     struct iovec xcb_parts[4];
870     xcb_void_cookie_t xcb_ret;
871     xcb_glx_copy_context_request_t xcb_out;
872 
873     xcb_out.src = src;
874     xcb_out.dest = dest;
875     xcb_out.mask = mask;
876     xcb_out.src_context_tag = src_context_tag;
877 
878     xcb_parts[2].iov_base = (char *) &xcb_out;
879     xcb_parts[2].iov_len = sizeof(xcb_out);
880     xcb_parts[3].iov_base = 0;
881     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
882 
883     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
884     return xcb_ret;
885 }
886 
887 xcb_void_cookie_t
xcb_glx_swap_buffers_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,xcb_glx_drawable_t drawable)888 xcb_glx_swap_buffers_checked (xcb_connection_t      *c  /**< */,
889                               xcb_glx_context_tag_t  context_tag  /**< */,
890                               xcb_glx_drawable_t     drawable  /**< */)
891 {
892     static const xcb_protocol_request_t xcb_req = {
893         /* count */ 2,
894         /* ext */ &xcb_glx_id,
895         /* opcode */ XCB_GLX_SWAP_BUFFERS,
896         /* isvoid */ 1
897     };
898 
899     struct iovec xcb_parts[4];
900     xcb_void_cookie_t xcb_ret;
901     xcb_glx_swap_buffers_request_t xcb_out;
902 
903     xcb_out.context_tag = context_tag;
904     xcb_out.drawable = drawable;
905 
906     xcb_parts[2].iov_base = (char *) &xcb_out;
907     xcb_parts[2].iov_len = sizeof(xcb_out);
908     xcb_parts[3].iov_base = 0;
909     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
910 
911     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
912     return xcb_ret;
913 }
914 
915 xcb_void_cookie_t
xcb_glx_swap_buffers(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,xcb_glx_drawable_t drawable)916 xcb_glx_swap_buffers (xcb_connection_t      *c  /**< */,
917                       xcb_glx_context_tag_t  context_tag  /**< */,
918                       xcb_glx_drawable_t     drawable  /**< */)
919 {
920     static const xcb_protocol_request_t xcb_req = {
921         /* count */ 2,
922         /* ext */ &xcb_glx_id,
923         /* opcode */ XCB_GLX_SWAP_BUFFERS,
924         /* isvoid */ 1
925     };
926 
927     struct iovec xcb_parts[4];
928     xcb_void_cookie_t xcb_ret;
929     xcb_glx_swap_buffers_request_t xcb_out;
930 
931     xcb_out.context_tag = context_tag;
932     xcb_out.drawable = drawable;
933 
934     xcb_parts[2].iov_base = (char *) &xcb_out;
935     xcb_parts[2].iov_len = sizeof(xcb_out);
936     xcb_parts[3].iov_base = 0;
937     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
938 
939     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
940     return xcb_ret;
941 }
942 
943 xcb_void_cookie_t
xcb_glx_use_x_font_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,xcb_font_t font,uint32_t first,uint32_t count,uint32_t list_base)944 xcb_glx_use_x_font_checked (xcb_connection_t      *c  /**< */,
945                             xcb_glx_context_tag_t  context_tag  /**< */,
946                             xcb_font_t             font  /**< */,
947                             uint32_t               first  /**< */,
948                             uint32_t               count  /**< */,
949                             uint32_t               list_base  /**< */)
950 {
951     static const xcb_protocol_request_t xcb_req = {
952         /* count */ 2,
953         /* ext */ &xcb_glx_id,
954         /* opcode */ XCB_GLX_USE_X_FONT,
955         /* isvoid */ 1
956     };
957 
958     struct iovec xcb_parts[4];
959     xcb_void_cookie_t xcb_ret;
960     xcb_glx_use_x_font_request_t xcb_out;
961 
962     xcb_out.context_tag = context_tag;
963     xcb_out.font = font;
964     xcb_out.first = first;
965     xcb_out.count = count;
966     xcb_out.list_base = list_base;
967 
968     xcb_parts[2].iov_base = (char *) &xcb_out;
969     xcb_parts[2].iov_len = sizeof(xcb_out);
970     xcb_parts[3].iov_base = 0;
971     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
972 
973     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
974     return xcb_ret;
975 }
976 
977 xcb_void_cookie_t
xcb_glx_use_x_font(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,xcb_font_t font,uint32_t first,uint32_t count,uint32_t list_base)978 xcb_glx_use_x_font (xcb_connection_t      *c  /**< */,
979                     xcb_glx_context_tag_t  context_tag  /**< */,
980                     xcb_font_t             font  /**< */,
981                     uint32_t               first  /**< */,
982                     uint32_t               count  /**< */,
983                     uint32_t               list_base  /**< */)
984 {
985     static const xcb_protocol_request_t xcb_req = {
986         /* count */ 2,
987         /* ext */ &xcb_glx_id,
988         /* opcode */ XCB_GLX_USE_X_FONT,
989         /* isvoid */ 1
990     };
991 
992     struct iovec xcb_parts[4];
993     xcb_void_cookie_t xcb_ret;
994     xcb_glx_use_x_font_request_t xcb_out;
995 
996     xcb_out.context_tag = context_tag;
997     xcb_out.font = font;
998     xcb_out.first = first;
999     xcb_out.count = count;
1000     xcb_out.list_base = list_base;
1001 
1002     xcb_parts[2].iov_base = (char *) &xcb_out;
1003     xcb_parts[2].iov_len = sizeof(xcb_out);
1004     xcb_parts[3].iov_base = 0;
1005     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1006 
1007     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1008     return xcb_ret;
1009 }
1010 
1011 xcb_void_cookie_t
xcb_glx_create_glx_pixmap_checked(xcb_connection_t * c,uint32_t screen,xcb_visualid_t visual,xcb_pixmap_t pixmap,xcb_glx_pixmap_t glx_pixmap)1012 xcb_glx_create_glx_pixmap_checked (xcb_connection_t *c  /**< */,
1013                                    uint32_t          screen  /**< */,
1014                                    xcb_visualid_t    visual  /**< */,
1015                                    xcb_pixmap_t      pixmap  /**< */,
1016                                    xcb_glx_pixmap_t  glx_pixmap  /**< */)
1017 {
1018     static const xcb_protocol_request_t xcb_req = {
1019         /* count */ 2,
1020         /* ext */ &xcb_glx_id,
1021         /* opcode */ XCB_GLX_CREATE_GLX_PIXMAP,
1022         /* isvoid */ 1
1023     };
1024 
1025     struct iovec xcb_parts[4];
1026     xcb_void_cookie_t xcb_ret;
1027     xcb_glx_create_glx_pixmap_request_t xcb_out;
1028 
1029     xcb_out.screen = screen;
1030     xcb_out.visual = visual;
1031     xcb_out.pixmap = pixmap;
1032     xcb_out.glx_pixmap = glx_pixmap;
1033 
1034     xcb_parts[2].iov_base = (char *) &xcb_out;
1035     xcb_parts[2].iov_len = sizeof(xcb_out);
1036     xcb_parts[3].iov_base = 0;
1037     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1038 
1039     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1040     return xcb_ret;
1041 }
1042 
1043 xcb_void_cookie_t
xcb_glx_create_glx_pixmap(xcb_connection_t * c,uint32_t screen,xcb_visualid_t visual,xcb_pixmap_t pixmap,xcb_glx_pixmap_t glx_pixmap)1044 xcb_glx_create_glx_pixmap (xcb_connection_t *c  /**< */,
1045                            uint32_t          screen  /**< */,
1046                            xcb_visualid_t    visual  /**< */,
1047                            xcb_pixmap_t      pixmap  /**< */,
1048                            xcb_glx_pixmap_t  glx_pixmap  /**< */)
1049 {
1050     static const xcb_protocol_request_t xcb_req = {
1051         /* count */ 2,
1052         /* ext */ &xcb_glx_id,
1053         /* opcode */ XCB_GLX_CREATE_GLX_PIXMAP,
1054         /* isvoid */ 1
1055     };
1056 
1057     struct iovec xcb_parts[4];
1058     xcb_void_cookie_t xcb_ret;
1059     xcb_glx_create_glx_pixmap_request_t xcb_out;
1060 
1061     xcb_out.screen = screen;
1062     xcb_out.visual = visual;
1063     xcb_out.pixmap = pixmap;
1064     xcb_out.glx_pixmap = glx_pixmap;
1065 
1066     xcb_parts[2].iov_base = (char *) &xcb_out;
1067     xcb_parts[2].iov_len = sizeof(xcb_out);
1068     xcb_parts[3].iov_base = 0;
1069     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1070 
1071     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1072     return xcb_ret;
1073 }
1074 
1075 int
xcb_glx_get_visual_configs_sizeof(const void * _buffer)1076 xcb_glx_get_visual_configs_sizeof (const void  *_buffer  /**< */)
1077 {
1078     char *xcb_tmp = (char *)_buffer;
1079     const xcb_glx_get_visual_configs_reply_t *_aux = (xcb_glx_get_visual_configs_reply_t *)_buffer;
1080     unsigned int xcb_buffer_len = 0;
1081     unsigned int xcb_block_len = 0;
1082     unsigned int xcb_pad = 0;
1083     unsigned int xcb_align_to = 0;
1084 
1085 
1086     xcb_block_len += sizeof(xcb_glx_get_visual_configs_reply_t);
1087     xcb_tmp += xcb_block_len;
1088     xcb_buffer_len += xcb_block_len;
1089     xcb_block_len = 0;
1090     /* property_list */
1091     xcb_block_len += _aux->length * sizeof(uint32_t);
1092     xcb_tmp += xcb_block_len;
1093     xcb_align_to = ALIGNOF(uint32_t);
1094     /* insert padding */
1095     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1096     xcb_buffer_len += xcb_block_len + xcb_pad;
1097     if (0 != xcb_pad) {
1098         xcb_tmp += xcb_pad;
1099         xcb_pad = 0;
1100     }
1101     xcb_block_len = 0;
1102 
1103     return xcb_buffer_len;
1104 }
1105 
1106 xcb_glx_get_visual_configs_cookie_t
xcb_glx_get_visual_configs(xcb_connection_t * c,uint32_t screen)1107 xcb_glx_get_visual_configs (xcb_connection_t *c  /**< */,
1108                             uint32_t          screen  /**< */)
1109 {
1110     static const xcb_protocol_request_t xcb_req = {
1111         /* count */ 2,
1112         /* ext */ &xcb_glx_id,
1113         /* opcode */ XCB_GLX_GET_VISUAL_CONFIGS,
1114         /* isvoid */ 0
1115     };
1116 
1117     struct iovec xcb_parts[4];
1118     xcb_glx_get_visual_configs_cookie_t xcb_ret;
1119     xcb_glx_get_visual_configs_request_t xcb_out;
1120 
1121     xcb_out.screen = screen;
1122 
1123     xcb_parts[2].iov_base = (char *) &xcb_out;
1124     xcb_parts[2].iov_len = sizeof(xcb_out);
1125     xcb_parts[3].iov_base = 0;
1126     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1127 
1128     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1129     return xcb_ret;
1130 }
1131 
1132 xcb_glx_get_visual_configs_cookie_t
xcb_glx_get_visual_configs_unchecked(xcb_connection_t * c,uint32_t screen)1133 xcb_glx_get_visual_configs_unchecked (xcb_connection_t *c  /**< */,
1134                                       uint32_t          screen  /**< */)
1135 {
1136     static const xcb_protocol_request_t xcb_req = {
1137         /* count */ 2,
1138         /* ext */ &xcb_glx_id,
1139         /* opcode */ XCB_GLX_GET_VISUAL_CONFIGS,
1140         /* isvoid */ 0
1141     };
1142 
1143     struct iovec xcb_parts[4];
1144     xcb_glx_get_visual_configs_cookie_t xcb_ret;
1145     xcb_glx_get_visual_configs_request_t xcb_out;
1146 
1147     xcb_out.screen = screen;
1148 
1149     xcb_parts[2].iov_base = (char *) &xcb_out;
1150     xcb_parts[2].iov_len = sizeof(xcb_out);
1151     xcb_parts[3].iov_base = 0;
1152     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1153 
1154     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1155     return xcb_ret;
1156 }
1157 
1158 uint32_t *
xcb_glx_get_visual_configs_property_list(const xcb_glx_get_visual_configs_reply_t * R)1159 xcb_glx_get_visual_configs_property_list (const xcb_glx_get_visual_configs_reply_t *R  /**< */)
1160 {
1161     return (uint32_t *) (R + 1);
1162 }
1163 
1164 int
xcb_glx_get_visual_configs_property_list_length(const xcb_glx_get_visual_configs_reply_t * R)1165 xcb_glx_get_visual_configs_property_list_length (const xcb_glx_get_visual_configs_reply_t *R  /**< */)
1166 {
1167     return R->length;
1168 }
1169 
1170 xcb_generic_iterator_t
xcb_glx_get_visual_configs_property_list_end(const xcb_glx_get_visual_configs_reply_t * R)1171 xcb_glx_get_visual_configs_property_list_end (const xcb_glx_get_visual_configs_reply_t *R  /**< */)
1172 {
1173     xcb_generic_iterator_t i;
1174     i.data = ((uint32_t *) (R + 1)) + (R->length);
1175     i.rem = 0;
1176     i.index = (char *) i.data - (char *) R;
1177     return i;
1178 }
1179 
1180 xcb_glx_get_visual_configs_reply_t *
xcb_glx_get_visual_configs_reply(xcb_connection_t * c,xcb_glx_get_visual_configs_cookie_t cookie,xcb_generic_error_t ** e)1181 xcb_glx_get_visual_configs_reply (xcb_connection_t                     *c  /**< */,
1182                                   xcb_glx_get_visual_configs_cookie_t   cookie  /**< */,
1183                                   xcb_generic_error_t                 **e  /**< */)
1184 {
1185     return (xcb_glx_get_visual_configs_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1186 }
1187 
1188 xcb_void_cookie_t
xcb_glx_destroy_glx_pixmap_checked(xcb_connection_t * c,xcb_glx_pixmap_t glx_pixmap)1189 xcb_glx_destroy_glx_pixmap_checked (xcb_connection_t *c  /**< */,
1190                                     xcb_glx_pixmap_t  glx_pixmap  /**< */)
1191 {
1192     static const xcb_protocol_request_t xcb_req = {
1193         /* count */ 2,
1194         /* ext */ &xcb_glx_id,
1195         /* opcode */ XCB_GLX_DESTROY_GLX_PIXMAP,
1196         /* isvoid */ 1
1197     };
1198 
1199     struct iovec xcb_parts[4];
1200     xcb_void_cookie_t xcb_ret;
1201     xcb_glx_destroy_glx_pixmap_request_t xcb_out;
1202 
1203     xcb_out.glx_pixmap = glx_pixmap;
1204 
1205     xcb_parts[2].iov_base = (char *) &xcb_out;
1206     xcb_parts[2].iov_len = sizeof(xcb_out);
1207     xcb_parts[3].iov_base = 0;
1208     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1209 
1210     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1211     return xcb_ret;
1212 }
1213 
1214 xcb_void_cookie_t
xcb_glx_destroy_glx_pixmap(xcb_connection_t * c,xcb_glx_pixmap_t glx_pixmap)1215 xcb_glx_destroy_glx_pixmap (xcb_connection_t *c  /**< */,
1216                             xcb_glx_pixmap_t  glx_pixmap  /**< */)
1217 {
1218     static const xcb_protocol_request_t xcb_req = {
1219         /* count */ 2,
1220         /* ext */ &xcb_glx_id,
1221         /* opcode */ XCB_GLX_DESTROY_GLX_PIXMAP,
1222         /* isvoid */ 1
1223     };
1224 
1225     struct iovec xcb_parts[4];
1226     xcb_void_cookie_t xcb_ret;
1227     xcb_glx_destroy_glx_pixmap_request_t xcb_out;
1228 
1229     xcb_out.glx_pixmap = glx_pixmap;
1230 
1231     xcb_parts[2].iov_base = (char *) &xcb_out;
1232     xcb_parts[2].iov_len = sizeof(xcb_out);
1233     xcb_parts[3].iov_base = 0;
1234     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1235 
1236     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1237     return xcb_ret;
1238 }
1239 
1240 int
xcb_glx_vendor_private_sizeof(const void * _buffer,uint32_t data_len)1241 xcb_glx_vendor_private_sizeof (const void  *_buffer  /**< */,
1242                                uint32_t     data_len  /**< */)
1243 {
1244     char *xcb_tmp = (char *)_buffer;
1245     unsigned int xcb_buffer_len = 0;
1246     unsigned int xcb_block_len = 0;
1247     unsigned int xcb_pad = 0;
1248     unsigned int xcb_align_to = 0;
1249 
1250 
1251     xcb_block_len += sizeof(xcb_glx_vendor_private_request_t);
1252     xcb_tmp += xcb_block_len;
1253     xcb_buffer_len += xcb_block_len;
1254     xcb_block_len = 0;
1255     /* data */
1256     xcb_block_len += data_len * sizeof(uint8_t);
1257     xcb_tmp += xcb_block_len;
1258     xcb_align_to = ALIGNOF(uint8_t);
1259     /* insert padding */
1260     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1261     xcb_buffer_len += xcb_block_len + xcb_pad;
1262     if (0 != xcb_pad) {
1263         xcb_tmp += xcb_pad;
1264         xcb_pad = 0;
1265     }
1266     xcb_block_len = 0;
1267 
1268     return xcb_buffer_len;
1269 }
1270 
1271 xcb_void_cookie_t
xcb_glx_vendor_private_checked(xcb_connection_t * c,uint32_t vendor_code,xcb_glx_context_tag_t context_tag,uint32_t data_len,const uint8_t * data)1272 xcb_glx_vendor_private_checked (xcb_connection_t      *c  /**< */,
1273                                 uint32_t               vendor_code  /**< */,
1274                                 xcb_glx_context_tag_t  context_tag  /**< */,
1275                                 uint32_t               data_len  /**< */,
1276                                 const uint8_t         *data  /**< */)
1277 {
1278     static const xcb_protocol_request_t xcb_req = {
1279         /* count */ 4,
1280         /* ext */ &xcb_glx_id,
1281         /* opcode */ XCB_GLX_VENDOR_PRIVATE,
1282         /* isvoid */ 1
1283     };
1284 
1285     struct iovec xcb_parts[6];
1286     xcb_void_cookie_t xcb_ret;
1287     xcb_glx_vendor_private_request_t xcb_out;
1288 
1289     xcb_out.vendor_code = vendor_code;
1290     xcb_out.context_tag = context_tag;
1291 
1292     xcb_parts[2].iov_base = (char *) &xcb_out;
1293     xcb_parts[2].iov_len = sizeof(xcb_out);
1294     xcb_parts[3].iov_base = 0;
1295     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1296     /* uint8_t data */
1297     xcb_parts[4].iov_base = (char *) data;
1298     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
1299     xcb_parts[5].iov_base = 0;
1300     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1301 
1302     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1303     return xcb_ret;
1304 }
1305 
1306 xcb_void_cookie_t
xcb_glx_vendor_private(xcb_connection_t * c,uint32_t vendor_code,xcb_glx_context_tag_t context_tag,uint32_t data_len,const uint8_t * data)1307 xcb_glx_vendor_private (xcb_connection_t      *c  /**< */,
1308                         uint32_t               vendor_code  /**< */,
1309                         xcb_glx_context_tag_t  context_tag  /**< */,
1310                         uint32_t               data_len  /**< */,
1311                         const uint8_t         *data  /**< */)
1312 {
1313     static const xcb_protocol_request_t xcb_req = {
1314         /* count */ 4,
1315         /* ext */ &xcb_glx_id,
1316         /* opcode */ XCB_GLX_VENDOR_PRIVATE,
1317         /* isvoid */ 1
1318     };
1319 
1320     struct iovec xcb_parts[6];
1321     xcb_void_cookie_t xcb_ret;
1322     xcb_glx_vendor_private_request_t xcb_out;
1323 
1324     xcb_out.vendor_code = vendor_code;
1325     xcb_out.context_tag = context_tag;
1326 
1327     xcb_parts[2].iov_base = (char *) &xcb_out;
1328     xcb_parts[2].iov_len = sizeof(xcb_out);
1329     xcb_parts[3].iov_base = 0;
1330     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1331     /* uint8_t data */
1332     xcb_parts[4].iov_base = (char *) data;
1333     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
1334     xcb_parts[5].iov_base = 0;
1335     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1336 
1337     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1338     return xcb_ret;
1339 }
1340 
1341 int
xcb_glx_vendor_private_with_reply_sizeof(const void * _buffer,uint32_t data_len)1342 xcb_glx_vendor_private_with_reply_sizeof (const void  *_buffer  /**< */,
1343                                           uint32_t     data_len  /**< */)
1344 {
1345     char *xcb_tmp = (char *)_buffer;
1346     unsigned int xcb_buffer_len = 0;
1347     unsigned int xcb_block_len = 0;
1348     unsigned int xcb_pad = 0;
1349     unsigned int xcb_align_to = 0;
1350 
1351 
1352     xcb_block_len += sizeof(xcb_glx_vendor_private_with_reply_request_t);
1353     xcb_tmp += xcb_block_len;
1354     xcb_buffer_len += xcb_block_len;
1355     xcb_block_len = 0;
1356     /* data */
1357     xcb_block_len += data_len * sizeof(uint8_t);
1358     xcb_tmp += xcb_block_len;
1359     xcb_align_to = ALIGNOF(uint8_t);
1360     /* insert padding */
1361     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1362     xcb_buffer_len += xcb_block_len + xcb_pad;
1363     if (0 != xcb_pad) {
1364         xcb_tmp += xcb_pad;
1365         xcb_pad = 0;
1366     }
1367     xcb_block_len = 0;
1368 
1369     return xcb_buffer_len;
1370 }
1371 
1372 xcb_glx_vendor_private_with_reply_cookie_t
xcb_glx_vendor_private_with_reply(xcb_connection_t * c,uint32_t vendor_code,xcb_glx_context_tag_t context_tag,uint32_t data_len,const uint8_t * data)1373 xcb_glx_vendor_private_with_reply (xcb_connection_t      *c  /**< */,
1374                                    uint32_t               vendor_code  /**< */,
1375                                    xcb_glx_context_tag_t  context_tag  /**< */,
1376                                    uint32_t               data_len  /**< */,
1377                                    const uint8_t         *data  /**< */)
1378 {
1379     static const xcb_protocol_request_t xcb_req = {
1380         /* count */ 4,
1381         /* ext */ &xcb_glx_id,
1382         /* opcode */ XCB_GLX_VENDOR_PRIVATE_WITH_REPLY,
1383         /* isvoid */ 0
1384     };
1385 
1386     struct iovec xcb_parts[6];
1387     xcb_glx_vendor_private_with_reply_cookie_t xcb_ret;
1388     xcb_glx_vendor_private_with_reply_request_t xcb_out;
1389 
1390     xcb_out.vendor_code = vendor_code;
1391     xcb_out.context_tag = context_tag;
1392 
1393     xcb_parts[2].iov_base = (char *) &xcb_out;
1394     xcb_parts[2].iov_len = sizeof(xcb_out);
1395     xcb_parts[3].iov_base = 0;
1396     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1397     /* uint8_t data */
1398     xcb_parts[4].iov_base = (char *) data;
1399     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
1400     xcb_parts[5].iov_base = 0;
1401     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1402 
1403     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1404     return xcb_ret;
1405 }
1406 
1407 xcb_glx_vendor_private_with_reply_cookie_t
xcb_glx_vendor_private_with_reply_unchecked(xcb_connection_t * c,uint32_t vendor_code,xcb_glx_context_tag_t context_tag,uint32_t data_len,const uint8_t * data)1408 xcb_glx_vendor_private_with_reply_unchecked (xcb_connection_t      *c  /**< */,
1409                                              uint32_t               vendor_code  /**< */,
1410                                              xcb_glx_context_tag_t  context_tag  /**< */,
1411                                              uint32_t               data_len  /**< */,
1412                                              const uint8_t         *data  /**< */)
1413 {
1414     static const xcb_protocol_request_t xcb_req = {
1415         /* count */ 4,
1416         /* ext */ &xcb_glx_id,
1417         /* opcode */ XCB_GLX_VENDOR_PRIVATE_WITH_REPLY,
1418         /* isvoid */ 0
1419     };
1420 
1421     struct iovec xcb_parts[6];
1422     xcb_glx_vendor_private_with_reply_cookie_t xcb_ret;
1423     xcb_glx_vendor_private_with_reply_request_t xcb_out;
1424 
1425     xcb_out.vendor_code = vendor_code;
1426     xcb_out.context_tag = context_tag;
1427 
1428     xcb_parts[2].iov_base = (char *) &xcb_out;
1429     xcb_parts[2].iov_len = sizeof(xcb_out);
1430     xcb_parts[3].iov_base = 0;
1431     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1432     /* uint8_t data */
1433     xcb_parts[4].iov_base = (char *) data;
1434     xcb_parts[4].iov_len = data_len * sizeof(uint8_t);
1435     xcb_parts[5].iov_base = 0;
1436     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1437 
1438     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1439     return xcb_ret;
1440 }
1441 
1442 uint8_t *
xcb_glx_vendor_private_with_reply_data_2(const xcb_glx_vendor_private_with_reply_reply_t * R)1443 xcb_glx_vendor_private_with_reply_data_2 (const xcb_glx_vendor_private_with_reply_reply_t *R  /**< */)
1444 {
1445     return (uint8_t *) (R + 1);
1446 }
1447 
1448 int
xcb_glx_vendor_private_with_reply_data_2_length(const xcb_glx_vendor_private_with_reply_reply_t * R)1449 xcb_glx_vendor_private_with_reply_data_2_length (const xcb_glx_vendor_private_with_reply_reply_t *R  /**< */)
1450 {
1451     return (R->length * 4);
1452 }
1453 
1454 xcb_generic_iterator_t
xcb_glx_vendor_private_with_reply_data_2_end(const xcb_glx_vendor_private_with_reply_reply_t * R)1455 xcb_glx_vendor_private_with_reply_data_2_end (const xcb_glx_vendor_private_with_reply_reply_t *R  /**< */)
1456 {
1457     xcb_generic_iterator_t i;
1458     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
1459     i.rem = 0;
1460     i.index = (char *) i.data - (char *) R;
1461     return i;
1462 }
1463 
1464 xcb_glx_vendor_private_with_reply_reply_t *
xcb_glx_vendor_private_with_reply_reply(xcb_connection_t * c,xcb_glx_vendor_private_with_reply_cookie_t cookie,xcb_generic_error_t ** e)1465 xcb_glx_vendor_private_with_reply_reply (xcb_connection_t                            *c  /**< */,
1466                                          xcb_glx_vendor_private_with_reply_cookie_t   cookie  /**< */,
1467                                          xcb_generic_error_t                        **e  /**< */)
1468 {
1469     return (xcb_glx_vendor_private_with_reply_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1470 }
1471 
1472 xcb_glx_query_extensions_string_cookie_t
xcb_glx_query_extensions_string(xcb_connection_t * c,uint32_t screen)1473 xcb_glx_query_extensions_string (xcb_connection_t *c  /**< */,
1474                                  uint32_t          screen  /**< */)
1475 {
1476     static const xcb_protocol_request_t xcb_req = {
1477         /* count */ 2,
1478         /* ext */ &xcb_glx_id,
1479         /* opcode */ XCB_GLX_QUERY_EXTENSIONS_STRING,
1480         /* isvoid */ 0
1481     };
1482 
1483     struct iovec xcb_parts[4];
1484     xcb_glx_query_extensions_string_cookie_t xcb_ret;
1485     xcb_glx_query_extensions_string_request_t xcb_out;
1486 
1487     xcb_out.screen = screen;
1488 
1489     xcb_parts[2].iov_base = (char *) &xcb_out;
1490     xcb_parts[2].iov_len = sizeof(xcb_out);
1491     xcb_parts[3].iov_base = 0;
1492     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1493 
1494     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1495     return xcb_ret;
1496 }
1497 
1498 xcb_glx_query_extensions_string_cookie_t
xcb_glx_query_extensions_string_unchecked(xcb_connection_t * c,uint32_t screen)1499 xcb_glx_query_extensions_string_unchecked (xcb_connection_t *c  /**< */,
1500                                            uint32_t          screen  /**< */)
1501 {
1502     static const xcb_protocol_request_t xcb_req = {
1503         /* count */ 2,
1504         /* ext */ &xcb_glx_id,
1505         /* opcode */ XCB_GLX_QUERY_EXTENSIONS_STRING,
1506         /* isvoid */ 0
1507     };
1508 
1509     struct iovec xcb_parts[4];
1510     xcb_glx_query_extensions_string_cookie_t xcb_ret;
1511     xcb_glx_query_extensions_string_request_t xcb_out;
1512 
1513     xcb_out.screen = screen;
1514 
1515     xcb_parts[2].iov_base = (char *) &xcb_out;
1516     xcb_parts[2].iov_len = sizeof(xcb_out);
1517     xcb_parts[3].iov_base = 0;
1518     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1519 
1520     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1521     return xcb_ret;
1522 }
1523 
1524 xcb_glx_query_extensions_string_reply_t *
xcb_glx_query_extensions_string_reply(xcb_connection_t * c,xcb_glx_query_extensions_string_cookie_t cookie,xcb_generic_error_t ** e)1525 xcb_glx_query_extensions_string_reply (xcb_connection_t                          *c  /**< */,
1526                                        xcb_glx_query_extensions_string_cookie_t   cookie  /**< */,
1527                                        xcb_generic_error_t                      **e  /**< */)
1528 {
1529     return (xcb_glx_query_extensions_string_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1530 }
1531 
1532 int
xcb_glx_query_server_string_sizeof(const void * _buffer)1533 xcb_glx_query_server_string_sizeof (const void  *_buffer  /**< */)
1534 {
1535     char *xcb_tmp = (char *)_buffer;
1536     const xcb_glx_query_server_string_reply_t *_aux = (xcb_glx_query_server_string_reply_t *)_buffer;
1537     unsigned int xcb_buffer_len = 0;
1538     unsigned int xcb_block_len = 0;
1539     unsigned int xcb_pad = 0;
1540     unsigned int xcb_align_to = 0;
1541 
1542 
1543     xcb_block_len += sizeof(xcb_glx_query_server_string_reply_t);
1544     xcb_tmp += xcb_block_len;
1545     xcb_buffer_len += xcb_block_len;
1546     xcb_block_len = 0;
1547     /* string */
1548     xcb_block_len += _aux->str_len * sizeof(char);
1549     xcb_tmp += xcb_block_len;
1550     xcb_align_to = ALIGNOF(char);
1551     /* insert padding */
1552     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1553     xcb_buffer_len += xcb_block_len + xcb_pad;
1554     if (0 != xcb_pad) {
1555         xcb_tmp += xcb_pad;
1556         xcb_pad = 0;
1557     }
1558     xcb_block_len = 0;
1559 
1560     return xcb_buffer_len;
1561 }
1562 
1563 xcb_glx_query_server_string_cookie_t
xcb_glx_query_server_string(xcb_connection_t * c,uint32_t screen,uint32_t name)1564 xcb_glx_query_server_string (xcb_connection_t *c  /**< */,
1565                              uint32_t          screen  /**< */,
1566                              uint32_t          name  /**< */)
1567 {
1568     static const xcb_protocol_request_t xcb_req = {
1569         /* count */ 2,
1570         /* ext */ &xcb_glx_id,
1571         /* opcode */ XCB_GLX_QUERY_SERVER_STRING,
1572         /* isvoid */ 0
1573     };
1574 
1575     struct iovec xcb_parts[4];
1576     xcb_glx_query_server_string_cookie_t xcb_ret;
1577     xcb_glx_query_server_string_request_t xcb_out;
1578 
1579     xcb_out.screen = screen;
1580     xcb_out.name = name;
1581 
1582     xcb_parts[2].iov_base = (char *) &xcb_out;
1583     xcb_parts[2].iov_len = sizeof(xcb_out);
1584     xcb_parts[3].iov_base = 0;
1585     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1586 
1587     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1588     return xcb_ret;
1589 }
1590 
1591 xcb_glx_query_server_string_cookie_t
xcb_glx_query_server_string_unchecked(xcb_connection_t * c,uint32_t screen,uint32_t name)1592 xcb_glx_query_server_string_unchecked (xcb_connection_t *c  /**< */,
1593                                        uint32_t          screen  /**< */,
1594                                        uint32_t          name  /**< */)
1595 {
1596     static const xcb_protocol_request_t xcb_req = {
1597         /* count */ 2,
1598         /* ext */ &xcb_glx_id,
1599         /* opcode */ XCB_GLX_QUERY_SERVER_STRING,
1600         /* isvoid */ 0
1601     };
1602 
1603     struct iovec xcb_parts[4];
1604     xcb_glx_query_server_string_cookie_t xcb_ret;
1605     xcb_glx_query_server_string_request_t xcb_out;
1606 
1607     xcb_out.screen = screen;
1608     xcb_out.name = name;
1609 
1610     xcb_parts[2].iov_base = (char *) &xcb_out;
1611     xcb_parts[2].iov_len = sizeof(xcb_out);
1612     xcb_parts[3].iov_base = 0;
1613     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1614 
1615     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1616     return xcb_ret;
1617 }
1618 
1619 char *
xcb_glx_query_server_string_string(const xcb_glx_query_server_string_reply_t * R)1620 xcb_glx_query_server_string_string (const xcb_glx_query_server_string_reply_t *R  /**< */)
1621 {
1622     return (char *) (R + 1);
1623 }
1624 
1625 int
xcb_glx_query_server_string_string_length(const xcb_glx_query_server_string_reply_t * R)1626 xcb_glx_query_server_string_string_length (const xcb_glx_query_server_string_reply_t *R  /**< */)
1627 {
1628     return R->str_len;
1629 }
1630 
1631 xcb_generic_iterator_t
xcb_glx_query_server_string_string_end(const xcb_glx_query_server_string_reply_t * R)1632 xcb_glx_query_server_string_string_end (const xcb_glx_query_server_string_reply_t *R  /**< */)
1633 {
1634     xcb_generic_iterator_t i;
1635     i.data = ((char *) (R + 1)) + (R->str_len);
1636     i.rem = 0;
1637     i.index = (char *) i.data - (char *) R;
1638     return i;
1639 }
1640 
1641 xcb_glx_query_server_string_reply_t *
xcb_glx_query_server_string_reply(xcb_connection_t * c,xcb_glx_query_server_string_cookie_t cookie,xcb_generic_error_t ** e)1642 xcb_glx_query_server_string_reply (xcb_connection_t                      *c  /**< */,
1643                                    xcb_glx_query_server_string_cookie_t   cookie  /**< */,
1644                                    xcb_generic_error_t                  **e  /**< */)
1645 {
1646     return (xcb_glx_query_server_string_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1647 }
1648 
1649 int
xcb_glx_client_info_sizeof(const void * _buffer)1650 xcb_glx_client_info_sizeof (const void  *_buffer  /**< */)
1651 {
1652     char *xcb_tmp = (char *)_buffer;
1653     const xcb_glx_client_info_request_t *_aux = (xcb_glx_client_info_request_t *)_buffer;
1654     unsigned int xcb_buffer_len = 0;
1655     unsigned int xcb_block_len = 0;
1656     unsigned int xcb_pad = 0;
1657     unsigned int xcb_align_to = 0;
1658 
1659 
1660     xcb_block_len += sizeof(xcb_glx_client_info_request_t);
1661     xcb_tmp += xcb_block_len;
1662     xcb_buffer_len += xcb_block_len;
1663     xcb_block_len = 0;
1664     /* string */
1665     xcb_block_len += _aux->str_len * sizeof(char);
1666     xcb_tmp += xcb_block_len;
1667     xcb_align_to = ALIGNOF(char);
1668     /* insert padding */
1669     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1670     xcb_buffer_len += xcb_block_len + xcb_pad;
1671     if (0 != xcb_pad) {
1672         xcb_tmp += xcb_pad;
1673         xcb_pad = 0;
1674     }
1675     xcb_block_len = 0;
1676 
1677     return xcb_buffer_len;
1678 }
1679 
1680 xcb_void_cookie_t
xcb_glx_client_info_checked(xcb_connection_t * c,uint32_t major_version,uint32_t minor_version,uint32_t str_len,const char * string)1681 xcb_glx_client_info_checked (xcb_connection_t *c  /**< */,
1682                              uint32_t          major_version  /**< */,
1683                              uint32_t          minor_version  /**< */,
1684                              uint32_t          str_len  /**< */,
1685                              const char       *string  /**< */)
1686 {
1687     static const xcb_protocol_request_t xcb_req = {
1688         /* count */ 4,
1689         /* ext */ &xcb_glx_id,
1690         /* opcode */ XCB_GLX_CLIENT_INFO,
1691         /* isvoid */ 1
1692     };
1693 
1694     struct iovec xcb_parts[6];
1695     xcb_void_cookie_t xcb_ret;
1696     xcb_glx_client_info_request_t xcb_out;
1697 
1698     xcb_out.major_version = major_version;
1699     xcb_out.minor_version = minor_version;
1700     xcb_out.str_len = str_len;
1701 
1702     xcb_parts[2].iov_base = (char *) &xcb_out;
1703     xcb_parts[2].iov_len = sizeof(xcb_out);
1704     xcb_parts[3].iov_base = 0;
1705     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1706     /* char string */
1707     xcb_parts[4].iov_base = (char *) string;
1708     xcb_parts[4].iov_len = str_len * sizeof(char);
1709     xcb_parts[5].iov_base = 0;
1710     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1711 
1712     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1713     return xcb_ret;
1714 }
1715 
1716 xcb_void_cookie_t
xcb_glx_client_info(xcb_connection_t * c,uint32_t major_version,uint32_t minor_version,uint32_t str_len,const char * string)1717 xcb_glx_client_info (xcb_connection_t *c  /**< */,
1718                      uint32_t          major_version  /**< */,
1719                      uint32_t          minor_version  /**< */,
1720                      uint32_t          str_len  /**< */,
1721                      const char       *string  /**< */)
1722 {
1723     static const xcb_protocol_request_t xcb_req = {
1724         /* count */ 4,
1725         /* ext */ &xcb_glx_id,
1726         /* opcode */ XCB_GLX_CLIENT_INFO,
1727         /* isvoid */ 1
1728     };
1729 
1730     struct iovec xcb_parts[6];
1731     xcb_void_cookie_t xcb_ret;
1732     xcb_glx_client_info_request_t xcb_out;
1733 
1734     xcb_out.major_version = major_version;
1735     xcb_out.minor_version = minor_version;
1736     xcb_out.str_len = str_len;
1737 
1738     xcb_parts[2].iov_base = (char *) &xcb_out;
1739     xcb_parts[2].iov_len = sizeof(xcb_out);
1740     xcb_parts[3].iov_base = 0;
1741     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1742     /* char string */
1743     xcb_parts[4].iov_base = (char *) string;
1744     xcb_parts[4].iov_len = str_len * sizeof(char);
1745     xcb_parts[5].iov_base = 0;
1746     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1747 
1748     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1749     return xcb_ret;
1750 }
1751 
1752 int
xcb_glx_get_fb_configs_sizeof(const void * _buffer)1753 xcb_glx_get_fb_configs_sizeof (const void  *_buffer  /**< */)
1754 {
1755     char *xcb_tmp = (char *)_buffer;
1756     const xcb_glx_get_fb_configs_reply_t *_aux = (xcb_glx_get_fb_configs_reply_t *)_buffer;
1757     unsigned int xcb_buffer_len = 0;
1758     unsigned int xcb_block_len = 0;
1759     unsigned int xcb_pad = 0;
1760     unsigned int xcb_align_to = 0;
1761 
1762 
1763     xcb_block_len += sizeof(xcb_glx_get_fb_configs_reply_t);
1764     xcb_tmp += xcb_block_len;
1765     xcb_buffer_len += xcb_block_len;
1766     xcb_block_len = 0;
1767     /* property_list */
1768     xcb_block_len += _aux->length * sizeof(uint32_t);
1769     xcb_tmp += xcb_block_len;
1770     xcb_align_to = ALIGNOF(uint32_t);
1771     /* insert padding */
1772     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1773     xcb_buffer_len += xcb_block_len + xcb_pad;
1774     if (0 != xcb_pad) {
1775         xcb_tmp += xcb_pad;
1776         xcb_pad = 0;
1777     }
1778     xcb_block_len = 0;
1779 
1780     return xcb_buffer_len;
1781 }
1782 
1783 xcb_glx_get_fb_configs_cookie_t
xcb_glx_get_fb_configs(xcb_connection_t * c,uint32_t screen)1784 xcb_glx_get_fb_configs (xcb_connection_t *c  /**< */,
1785                         uint32_t          screen  /**< */)
1786 {
1787     static const xcb_protocol_request_t xcb_req = {
1788         /* count */ 2,
1789         /* ext */ &xcb_glx_id,
1790         /* opcode */ XCB_GLX_GET_FB_CONFIGS,
1791         /* isvoid */ 0
1792     };
1793 
1794     struct iovec xcb_parts[4];
1795     xcb_glx_get_fb_configs_cookie_t xcb_ret;
1796     xcb_glx_get_fb_configs_request_t xcb_out;
1797 
1798     xcb_out.screen = screen;
1799 
1800     xcb_parts[2].iov_base = (char *) &xcb_out;
1801     xcb_parts[2].iov_len = sizeof(xcb_out);
1802     xcb_parts[3].iov_base = 0;
1803     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1804 
1805     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1806     return xcb_ret;
1807 }
1808 
1809 xcb_glx_get_fb_configs_cookie_t
xcb_glx_get_fb_configs_unchecked(xcb_connection_t * c,uint32_t screen)1810 xcb_glx_get_fb_configs_unchecked (xcb_connection_t *c  /**< */,
1811                                   uint32_t          screen  /**< */)
1812 {
1813     static const xcb_protocol_request_t xcb_req = {
1814         /* count */ 2,
1815         /* ext */ &xcb_glx_id,
1816         /* opcode */ XCB_GLX_GET_FB_CONFIGS,
1817         /* isvoid */ 0
1818     };
1819 
1820     struct iovec xcb_parts[4];
1821     xcb_glx_get_fb_configs_cookie_t xcb_ret;
1822     xcb_glx_get_fb_configs_request_t xcb_out;
1823 
1824     xcb_out.screen = screen;
1825 
1826     xcb_parts[2].iov_base = (char *) &xcb_out;
1827     xcb_parts[2].iov_len = sizeof(xcb_out);
1828     xcb_parts[3].iov_base = 0;
1829     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1830 
1831     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1832     return xcb_ret;
1833 }
1834 
1835 uint32_t *
xcb_glx_get_fb_configs_property_list(const xcb_glx_get_fb_configs_reply_t * R)1836 xcb_glx_get_fb_configs_property_list (const xcb_glx_get_fb_configs_reply_t *R  /**< */)
1837 {
1838     return (uint32_t *) (R + 1);
1839 }
1840 
1841 int
xcb_glx_get_fb_configs_property_list_length(const xcb_glx_get_fb_configs_reply_t * R)1842 xcb_glx_get_fb_configs_property_list_length (const xcb_glx_get_fb_configs_reply_t *R  /**< */)
1843 {
1844     return R->length;
1845 }
1846 
1847 xcb_generic_iterator_t
xcb_glx_get_fb_configs_property_list_end(const xcb_glx_get_fb_configs_reply_t * R)1848 xcb_glx_get_fb_configs_property_list_end (const xcb_glx_get_fb_configs_reply_t *R  /**< */)
1849 {
1850     xcb_generic_iterator_t i;
1851     i.data = ((uint32_t *) (R + 1)) + (R->length);
1852     i.rem = 0;
1853     i.index = (char *) i.data - (char *) R;
1854     return i;
1855 }
1856 
1857 xcb_glx_get_fb_configs_reply_t *
xcb_glx_get_fb_configs_reply(xcb_connection_t * c,xcb_glx_get_fb_configs_cookie_t cookie,xcb_generic_error_t ** e)1858 xcb_glx_get_fb_configs_reply (xcb_connection_t                 *c  /**< */,
1859                               xcb_glx_get_fb_configs_cookie_t   cookie  /**< */,
1860                               xcb_generic_error_t             **e  /**< */)
1861 {
1862     return (xcb_glx_get_fb_configs_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1863 }
1864 
1865 int
xcb_glx_create_pixmap_sizeof(const void * _buffer)1866 xcb_glx_create_pixmap_sizeof (const void  *_buffer  /**< */)
1867 {
1868     char *xcb_tmp = (char *)_buffer;
1869     const xcb_glx_create_pixmap_request_t *_aux = (xcb_glx_create_pixmap_request_t *)_buffer;
1870     unsigned int xcb_buffer_len = 0;
1871     unsigned int xcb_block_len = 0;
1872     unsigned int xcb_pad = 0;
1873     unsigned int xcb_align_to = 0;
1874 
1875 
1876     xcb_block_len += sizeof(xcb_glx_create_pixmap_request_t);
1877     xcb_tmp += xcb_block_len;
1878     xcb_buffer_len += xcb_block_len;
1879     xcb_block_len = 0;
1880     /* attribs */
1881     xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t);
1882     xcb_tmp += xcb_block_len;
1883     xcb_align_to = ALIGNOF(uint32_t);
1884     /* insert padding */
1885     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
1886     xcb_buffer_len += xcb_block_len + xcb_pad;
1887     if (0 != xcb_pad) {
1888         xcb_tmp += xcb_pad;
1889         xcb_pad = 0;
1890     }
1891     xcb_block_len = 0;
1892 
1893     return xcb_buffer_len;
1894 }
1895 
1896 xcb_void_cookie_t
xcb_glx_create_pixmap_checked(xcb_connection_t * c,uint32_t screen,xcb_glx_fbconfig_t fbconfig,xcb_pixmap_t pixmap,xcb_glx_pixmap_t glx_pixmap,uint32_t num_attribs,const uint32_t * attribs)1897 xcb_glx_create_pixmap_checked (xcb_connection_t   *c  /**< */,
1898                                uint32_t            screen  /**< */,
1899                                xcb_glx_fbconfig_t  fbconfig  /**< */,
1900                                xcb_pixmap_t        pixmap  /**< */,
1901                                xcb_glx_pixmap_t    glx_pixmap  /**< */,
1902                                uint32_t            num_attribs  /**< */,
1903                                const uint32_t     *attribs  /**< */)
1904 {
1905     static const xcb_protocol_request_t xcb_req = {
1906         /* count */ 4,
1907         /* ext */ &xcb_glx_id,
1908         /* opcode */ XCB_GLX_CREATE_PIXMAP,
1909         /* isvoid */ 1
1910     };
1911 
1912     struct iovec xcb_parts[6];
1913     xcb_void_cookie_t xcb_ret;
1914     xcb_glx_create_pixmap_request_t xcb_out;
1915 
1916     xcb_out.screen = screen;
1917     xcb_out.fbconfig = fbconfig;
1918     xcb_out.pixmap = pixmap;
1919     xcb_out.glx_pixmap = glx_pixmap;
1920     xcb_out.num_attribs = num_attribs;
1921 
1922     xcb_parts[2].iov_base = (char *) &xcb_out;
1923     xcb_parts[2].iov_len = sizeof(xcb_out);
1924     xcb_parts[3].iov_base = 0;
1925     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1926     /* uint32_t attribs */
1927     xcb_parts[4].iov_base = (char *) attribs;
1928     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
1929     xcb_parts[5].iov_base = 0;
1930     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1931 
1932     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1933     return xcb_ret;
1934 }
1935 
1936 xcb_void_cookie_t
xcb_glx_create_pixmap(xcb_connection_t * c,uint32_t screen,xcb_glx_fbconfig_t fbconfig,xcb_pixmap_t pixmap,xcb_glx_pixmap_t glx_pixmap,uint32_t num_attribs,const uint32_t * attribs)1937 xcb_glx_create_pixmap (xcb_connection_t   *c  /**< */,
1938                        uint32_t            screen  /**< */,
1939                        xcb_glx_fbconfig_t  fbconfig  /**< */,
1940                        xcb_pixmap_t        pixmap  /**< */,
1941                        xcb_glx_pixmap_t    glx_pixmap  /**< */,
1942                        uint32_t            num_attribs  /**< */,
1943                        const uint32_t     *attribs  /**< */)
1944 {
1945     static const xcb_protocol_request_t xcb_req = {
1946         /* count */ 4,
1947         /* ext */ &xcb_glx_id,
1948         /* opcode */ XCB_GLX_CREATE_PIXMAP,
1949         /* isvoid */ 1
1950     };
1951 
1952     struct iovec xcb_parts[6];
1953     xcb_void_cookie_t xcb_ret;
1954     xcb_glx_create_pixmap_request_t xcb_out;
1955 
1956     xcb_out.screen = screen;
1957     xcb_out.fbconfig = fbconfig;
1958     xcb_out.pixmap = pixmap;
1959     xcb_out.glx_pixmap = glx_pixmap;
1960     xcb_out.num_attribs = num_attribs;
1961 
1962     xcb_parts[2].iov_base = (char *) &xcb_out;
1963     xcb_parts[2].iov_len = sizeof(xcb_out);
1964     xcb_parts[3].iov_base = 0;
1965     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1966     /* uint32_t attribs */
1967     xcb_parts[4].iov_base = (char *) attribs;
1968     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
1969     xcb_parts[5].iov_base = 0;
1970     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
1971 
1972     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
1973     return xcb_ret;
1974 }
1975 
1976 xcb_void_cookie_t
xcb_glx_destroy_pixmap_checked(xcb_connection_t * c,xcb_glx_pixmap_t glx_pixmap)1977 xcb_glx_destroy_pixmap_checked (xcb_connection_t *c  /**< */,
1978                                 xcb_glx_pixmap_t  glx_pixmap  /**< */)
1979 {
1980     static const xcb_protocol_request_t xcb_req = {
1981         /* count */ 2,
1982         /* ext */ &xcb_glx_id,
1983         /* opcode */ XCB_GLX_DESTROY_PIXMAP,
1984         /* isvoid */ 1
1985     };
1986 
1987     struct iovec xcb_parts[4];
1988     xcb_void_cookie_t xcb_ret;
1989     xcb_glx_destroy_pixmap_request_t xcb_out;
1990 
1991     xcb_out.glx_pixmap = glx_pixmap;
1992 
1993     xcb_parts[2].iov_base = (char *) &xcb_out;
1994     xcb_parts[2].iov_len = sizeof(xcb_out);
1995     xcb_parts[3].iov_base = 0;
1996     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
1997 
1998     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
1999     return xcb_ret;
2000 }
2001 
2002 xcb_void_cookie_t
xcb_glx_destroy_pixmap(xcb_connection_t * c,xcb_glx_pixmap_t glx_pixmap)2003 xcb_glx_destroy_pixmap (xcb_connection_t *c  /**< */,
2004                         xcb_glx_pixmap_t  glx_pixmap  /**< */)
2005 {
2006     static const xcb_protocol_request_t xcb_req = {
2007         /* count */ 2,
2008         /* ext */ &xcb_glx_id,
2009         /* opcode */ XCB_GLX_DESTROY_PIXMAP,
2010         /* isvoid */ 1
2011     };
2012 
2013     struct iovec xcb_parts[4];
2014     xcb_void_cookie_t xcb_ret;
2015     xcb_glx_destroy_pixmap_request_t xcb_out;
2016 
2017     xcb_out.glx_pixmap = glx_pixmap;
2018 
2019     xcb_parts[2].iov_base = (char *) &xcb_out;
2020     xcb_parts[2].iov_len = sizeof(xcb_out);
2021     xcb_parts[3].iov_base = 0;
2022     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2023 
2024     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2025     return xcb_ret;
2026 }
2027 
2028 xcb_void_cookie_t
xcb_glx_create_new_context_checked(xcb_connection_t * c,xcb_glx_context_t context,xcb_glx_fbconfig_t fbconfig,uint32_t screen,uint32_t render_type,xcb_glx_context_t share_list,uint8_t is_direct)2029 xcb_glx_create_new_context_checked (xcb_connection_t   *c  /**< */,
2030                                     xcb_glx_context_t   context  /**< */,
2031                                     xcb_glx_fbconfig_t  fbconfig  /**< */,
2032                                     uint32_t            screen  /**< */,
2033                                     uint32_t            render_type  /**< */,
2034                                     xcb_glx_context_t   share_list  /**< */,
2035                                     uint8_t             is_direct  /**< */)
2036 {
2037     static const xcb_protocol_request_t xcb_req = {
2038         /* count */ 2,
2039         /* ext */ &xcb_glx_id,
2040         /* opcode */ XCB_GLX_CREATE_NEW_CONTEXT,
2041         /* isvoid */ 1
2042     };
2043 
2044     struct iovec xcb_parts[4];
2045     xcb_void_cookie_t xcb_ret;
2046     xcb_glx_create_new_context_request_t xcb_out;
2047 
2048     xcb_out.context = context;
2049     xcb_out.fbconfig = fbconfig;
2050     xcb_out.screen = screen;
2051     xcb_out.render_type = render_type;
2052     xcb_out.share_list = share_list;
2053     xcb_out.is_direct = is_direct;
2054     memset(xcb_out.pad0, 0, 3);
2055 
2056     xcb_parts[2].iov_base = (char *) &xcb_out;
2057     xcb_parts[2].iov_len = sizeof(xcb_out);
2058     xcb_parts[3].iov_base = 0;
2059     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2060 
2061     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2062     return xcb_ret;
2063 }
2064 
2065 xcb_void_cookie_t
xcb_glx_create_new_context(xcb_connection_t * c,xcb_glx_context_t context,xcb_glx_fbconfig_t fbconfig,uint32_t screen,uint32_t render_type,xcb_glx_context_t share_list,uint8_t is_direct)2066 xcb_glx_create_new_context (xcb_connection_t   *c  /**< */,
2067                             xcb_glx_context_t   context  /**< */,
2068                             xcb_glx_fbconfig_t  fbconfig  /**< */,
2069                             uint32_t            screen  /**< */,
2070                             uint32_t            render_type  /**< */,
2071                             xcb_glx_context_t   share_list  /**< */,
2072                             uint8_t             is_direct  /**< */)
2073 {
2074     static const xcb_protocol_request_t xcb_req = {
2075         /* count */ 2,
2076         /* ext */ &xcb_glx_id,
2077         /* opcode */ XCB_GLX_CREATE_NEW_CONTEXT,
2078         /* isvoid */ 1
2079     };
2080 
2081     struct iovec xcb_parts[4];
2082     xcb_void_cookie_t xcb_ret;
2083     xcb_glx_create_new_context_request_t xcb_out;
2084 
2085     xcb_out.context = context;
2086     xcb_out.fbconfig = fbconfig;
2087     xcb_out.screen = screen;
2088     xcb_out.render_type = render_type;
2089     xcb_out.share_list = share_list;
2090     xcb_out.is_direct = is_direct;
2091     memset(xcb_out.pad0, 0, 3);
2092 
2093     xcb_parts[2].iov_base = (char *) &xcb_out;
2094     xcb_parts[2].iov_len = sizeof(xcb_out);
2095     xcb_parts[3].iov_base = 0;
2096     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2097 
2098     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2099     return xcb_ret;
2100 }
2101 
2102 int
xcb_glx_query_context_sizeof(const void * _buffer)2103 xcb_glx_query_context_sizeof (const void  *_buffer  /**< */)
2104 {
2105     char *xcb_tmp = (char *)_buffer;
2106     const xcb_glx_query_context_reply_t *_aux = (xcb_glx_query_context_reply_t *)_buffer;
2107     unsigned int xcb_buffer_len = 0;
2108     unsigned int xcb_block_len = 0;
2109     unsigned int xcb_pad = 0;
2110     unsigned int xcb_align_to = 0;
2111 
2112 
2113     xcb_block_len += sizeof(xcb_glx_query_context_reply_t);
2114     xcb_tmp += xcb_block_len;
2115     xcb_buffer_len += xcb_block_len;
2116     xcb_block_len = 0;
2117     /* attribs */
2118     xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t);
2119     xcb_tmp += xcb_block_len;
2120     xcb_align_to = ALIGNOF(uint32_t);
2121     /* insert padding */
2122     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2123     xcb_buffer_len += xcb_block_len + xcb_pad;
2124     if (0 != xcb_pad) {
2125         xcb_tmp += xcb_pad;
2126         xcb_pad = 0;
2127     }
2128     xcb_block_len = 0;
2129 
2130     return xcb_buffer_len;
2131 }
2132 
2133 xcb_glx_query_context_cookie_t
xcb_glx_query_context(xcb_connection_t * c,xcb_glx_context_t context)2134 xcb_glx_query_context (xcb_connection_t  *c  /**< */,
2135                        xcb_glx_context_t  context  /**< */)
2136 {
2137     static const xcb_protocol_request_t xcb_req = {
2138         /* count */ 2,
2139         /* ext */ &xcb_glx_id,
2140         /* opcode */ XCB_GLX_QUERY_CONTEXT,
2141         /* isvoid */ 0
2142     };
2143 
2144     struct iovec xcb_parts[4];
2145     xcb_glx_query_context_cookie_t xcb_ret;
2146     xcb_glx_query_context_request_t xcb_out;
2147 
2148     xcb_out.context = context;
2149 
2150     xcb_parts[2].iov_base = (char *) &xcb_out;
2151     xcb_parts[2].iov_len = sizeof(xcb_out);
2152     xcb_parts[3].iov_base = 0;
2153     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2154 
2155     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2156     return xcb_ret;
2157 }
2158 
2159 xcb_glx_query_context_cookie_t
xcb_glx_query_context_unchecked(xcb_connection_t * c,xcb_glx_context_t context)2160 xcb_glx_query_context_unchecked (xcb_connection_t  *c  /**< */,
2161                                  xcb_glx_context_t  context  /**< */)
2162 {
2163     static const xcb_protocol_request_t xcb_req = {
2164         /* count */ 2,
2165         /* ext */ &xcb_glx_id,
2166         /* opcode */ XCB_GLX_QUERY_CONTEXT,
2167         /* isvoid */ 0
2168     };
2169 
2170     struct iovec xcb_parts[4];
2171     xcb_glx_query_context_cookie_t xcb_ret;
2172     xcb_glx_query_context_request_t xcb_out;
2173 
2174     xcb_out.context = context;
2175 
2176     xcb_parts[2].iov_base = (char *) &xcb_out;
2177     xcb_parts[2].iov_len = sizeof(xcb_out);
2178     xcb_parts[3].iov_base = 0;
2179     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2180 
2181     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2182     return xcb_ret;
2183 }
2184 
2185 uint32_t *
xcb_glx_query_context_attribs(const xcb_glx_query_context_reply_t * R)2186 xcb_glx_query_context_attribs (const xcb_glx_query_context_reply_t *R  /**< */)
2187 {
2188     return (uint32_t *) (R + 1);
2189 }
2190 
2191 int
xcb_glx_query_context_attribs_length(const xcb_glx_query_context_reply_t * R)2192 xcb_glx_query_context_attribs_length (const xcb_glx_query_context_reply_t *R  /**< */)
2193 {
2194     return (R->num_attribs * 2);
2195 }
2196 
2197 xcb_generic_iterator_t
xcb_glx_query_context_attribs_end(const xcb_glx_query_context_reply_t * R)2198 xcb_glx_query_context_attribs_end (const xcb_glx_query_context_reply_t *R  /**< */)
2199 {
2200     xcb_generic_iterator_t i;
2201     i.data = ((uint32_t *) (R + 1)) + ((R->num_attribs * 2));
2202     i.rem = 0;
2203     i.index = (char *) i.data - (char *) R;
2204     return i;
2205 }
2206 
2207 xcb_glx_query_context_reply_t *
xcb_glx_query_context_reply(xcb_connection_t * c,xcb_glx_query_context_cookie_t cookie,xcb_generic_error_t ** e)2208 xcb_glx_query_context_reply (xcb_connection_t                *c  /**< */,
2209                              xcb_glx_query_context_cookie_t   cookie  /**< */,
2210                              xcb_generic_error_t            **e  /**< */)
2211 {
2212     return (xcb_glx_query_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2213 }
2214 
2215 xcb_glx_make_context_current_cookie_t
xcb_glx_make_context_current(xcb_connection_t * c,xcb_glx_context_tag_t old_context_tag,xcb_glx_drawable_t drawable,xcb_glx_drawable_t read_drawable,xcb_glx_context_t context)2216 xcb_glx_make_context_current (xcb_connection_t      *c  /**< */,
2217                               xcb_glx_context_tag_t  old_context_tag  /**< */,
2218                               xcb_glx_drawable_t     drawable  /**< */,
2219                               xcb_glx_drawable_t     read_drawable  /**< */,
2220                               xcb_glx_context_t      context  /**< */)
2221 {
2222     static const xcb_protocol_request_t xcb_req = {
2223         /* count */ 2,
2224         /* ext */ &xcb_glx_id,
2225         /* opcode */ XCB_GLX_MAKE_CONTEXT_CURRENT,
2226         /* isvoid */ 0
2227     };
2228 
2229     struct iovec xcb_parts[4];
2230     xcb_glx_make_context_current_cookie_t xcb_ret;
2231     xcb_glx_make_context_current_request_t xcb_out;
2232 
2233     xcb_out.old_context_tag = old_context_tag;
2234     xcb_out.drawable = drawable;
2235     xcb_out.read_drawable = read_drawable;
2236     xcb_out.context = context;
2237 
2238     xcb_parts[2].iov_base = (char *) &xcb_out;
2239     xcb_parts[2].iov_len = sizeof(xcb_out);
2240     xcb_parts[3].iov_base = 0;
2241     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2242 
2243     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2244     return xcb_ret;
2245 }
2246 
2247 xcb_glx_make_context_current_cookie_t
xcb_glx_make_context_current_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t old_context_tag,xcb_glx_drawable_t drawable,xcb_glx_drawable_t read_drawable,xcb_glx_context_t context)2248 xcb_glx_make_context_current_unchecked (xcb_connection_t      *c  /**< */,
2249                                         xcb_glx_context_tag_t  old_context_tag  /**< */,
2250                                         xcb_glx_drawable_t     drawable  /**< */,
2251                                         xcb_glx_drawable_t     read_drawable  /**< */,
2252                                         xcb_glx_context_t      context  /**< */)
2253 {
2254     static const xcb_protocol_request_t xcb_req = {
2255         /* count */ 2,
2256         /* ext */ &xcb_glx_id,
2257         /* opcode */ XCB_GLX_MAKE_CONTEXT_CURRENT,
2258         /* isvoid */ 0
2259     };
2260 
2261     struct iovec xcb_parts[4];
2262     xcb_glx_make_context_current_cookie_t xcb_ret;
2263     xcb_glx_make_context_current_request_t xcb_out;
2264 
2265     xcb_out.old_context_tag = old_context_tag;
2266     xcb_out.drawable = drawable;
2267     xcb_out.read_drawable = read_drawable;
2268     xcb_out.context = context;
2269 
2270     xcb_parts[2].iov_base = (char *) &xcb_out;
2271     xcb_parts[2].iov_len = sizeof(xcb_out);
2272     xcb_parts[3].iov_base = 0;
2273     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2274 
2275     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2276     return xcb_ret;
2277 }
2278 
2279 xcb_glx_make_context_current_reply_t *
xcb_glx_make_context_current_reply(xcb_connection_t * c,xcb_glx_make_context_current_cookie_t cookie,xcb_generic_error_t ** e)2280 xcb_glx_make_context_current_reply (xcb_connection_t                       *c  /**< */,
2281                                     xcb_glx_make_context_current_cookie_t   cookie  /**< */,
2282                                     xcb_generic_error_t                   **e  /**< */)
2283 {
2284     return (xcb_glx_make_context_current_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2285 }
2286 
2287 int
xcb_glx_create_pbuffer_sizeof(const void * _buffer)2288 xcb_glx_create_pbuffer_sizeof (const void  *_buffer  /**< */)
2289 {
2290     char *xcb_tmp = (char *)_buffer;
2291     const xcb_glx_create_pbuffer_request_t *_aux = (xcb_glx_create_pbuffer_request_t *)_buffer;
2292     unsigned int xcb_buffer_len = 0;
2293     unsigned int xcb_block_len = 0;
2294     unsigned int xcb_pad = 0;
2295     unsigned int xcb_align_to = 0;
2296 
2297 
2298     xcb_block_len += sizeof(xcb_glx_create_pbuffer_request_t);
2299     xcb_tmp += xcb_block_len;
2300     xcb_buffer_len += xcb_block_len;
2301     xcb_block_len = 0;
2302     /* attribs */
2303     xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t);
2304     xcb_tmp += xcb_block_len;
2305     xcb_align_to = ALIGNOF(uint32_t);
2306     /* insert padding */
2307     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2308     xcb_buffer_len += xcb_block_len + xcb_pad;
2309     if (0 != xcb_pad) {
2310         xcb_tmp += xcb_pad;
2311         xcb_pad = 0;
2312     }
2313     xcb_block_len = 0;
2314 
2315     return xcb_buffer_len;
2316 }
2317 
2318 xcb_void_cookie_t
xcb_glx_create_pbuffer_checked(xcb_connection_t * c,uint32_t screen,xcb_glx_fbconfig_t fbconfig,xcb_glx_pbuffer_t pbuffer,uint32_t num_attribs,const uint32_t * attribs)2319 xcb_glx_create_pbuffer_checked (xcb_connection_t   *c  /**< */,
2320                                 uint32_t            screen  /**< */,
2321                                 xcb_glx_fbconfig_t  fbconfig  /**< */,
2322                                 xcb_glx_pbuffer_t   pbuffer  /**< */,
2323                                 uint32_t            num_attribs  /**< */,
2324                                 const uint32_t     *attribs  /**< */)
2325 {
2326     static const xcb_protocol_request_t xcb_req = {
2327         /* count */ 4,
2328         /* ext */ &xcb_glx_id,
2329         /* opcode */ XCB_GLX_CREATE_PBUFFER,
2330         /* isvoid */ 1
2331     };
2332 
2333     struct iovec xcb_parts[6];
2334     xcb_void_cookie_t xcb_ret;
2335     xcb_glx_create_pbuffer_request_t xcb_out;
2336 
2337     xcb_out.screen = screen;
2338     xcb_out.fbconfig = fbconfig;
2339     xcb_out.pbuffer = pbuffer;
2340     xcb_out.num_attribs = num_attribs;
2341 
2342     xcb_parts[2].iov_base = (char *) &xcb_out;
2343     xcb_parts[2].iov_len = sizeof(xcb_out);
2344     xcb_parts[3].iov_base = 0;
2345     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2346     /* uint32_t attribs */
2347     xcb_parts[4].iov_base = (char *) attribs;
2348     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
2349     xcb_parts[5].iov_base = 0;
2350     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2351 
2352     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2353     return xcb_ret;
2354 }
2355 
2356 xcb_void_cookie_t
xcb_glx_create_pbuffer(xcb_connection_t * c,uint32_t screen,xcb_glx_fbconfig_t fbconfig,xcb_glx_pbuffer_t pbuffer,uint32_t num_attribs,const uint32_t * attribs)2357 xcb_glx_create_pbuffer (xcb_connection_t   *c  /**< */,
2358                         uint32_t            screen  /**< */,
2359                         xcb_glx_fbconfig_t  fbconfig  /**< */,
2360                         xcb_glx_pbuffer_t   pbuffer  /**< */,
2361                         uint32_t            num_attribs  /**< */,
2362                         const uint32_t     *attribs  /**< */)
2363 {
2364     static const xcb_protocol_request_t xcb_req = {
2365         /* count */ 4,
2366         /* ext */ &xcb_glx_id,
2367         /* opcode */ XCB_GLX_CREATE_PBUFFER,
2368         /* isvoid */ 1
2369     };
2370 
2371     struct iovec xcb_parts[6];
2372     xcb_void_cookie_t xcb_ret;
2373     xcb_glx_create_pbuffer_request_t xcb_out;
2374 
2375     xcb_out.screen = screen;
2376     xcb_out.fbconfig = fbconfig;
2377     xcb_out.pbuffer = pbuffer;
2378     xcb_out.num_attribs = num_attribs;
2379 
2380     xcb_parts[2].iov_base = (char *) &xcb_out;
2381     xcb_parts[2].iov_len = sizeof(xcb_out);
2382     xcb_parts[3].iov_base = 0;
2383     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2384     /* uint32_t attribs */
2385     xcb_parts[4].iov_base = (char *) attribs;
2386     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
2387     xcb_parts[5].iov_base = 0;
2388     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2389 
2390     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2391     return xcb_ret;
2392 }
2393 
2394 xcb_void_cookie_t
xcb_glx_destroy_pbuffer_checked(xcb_connection_t * c,xcb_glx_pbuffer_t pbuffer)2395 xcb_glx_destroy_pbuffer_checked (xcb_connection_t  *c  /**< */,
2396                                  xcb_glx_pbuffer_t  pbuffer  /**< */)
2397 {
2398     static const xcb_protocol_request_t xcb_req = {
2399         /* count */ 2,
2400         /* ext */ &xcb_glx_id,
2401         /* opcode */ XCB_GLX_DESTROY_PBUFFER,
2402         /* isvoid */ 1
2403     };
2404 
2405     struct iovec xcb_parts[4];
2406     xcb_void_cookie_t xcb_ret;
2407     xcb_glx_destroy_pbuffer_request_t xcb_out;
2408 
2409     xcb_out.pbuffer = pbuffer;
2410 
2411     xcb_parts[2].iov_base = (char *) &xcb_out;
2412     xcb_parts[2].iov_len = sizeof(xcb_out);
2413     xcb_parts[3].iov_base = 0;
2414     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2415 
2416     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2417     return xcb_ret;
2418 }
2419 
2420 xcb_void_cookie_t
xcb_glx_destroy_pbuffer(xcb_connection_t * c,xcb_glx_pbuffer_t pbuffer)2421 xcb_glx_destroy_pbuffer (xcb_connection_t  *c  /**< */,
2422                          xcb_glx_pbuffer_t  pbuffer  /**< */)
2423 {
2424     static const xcb_protocol_request_t xcb_req = {
2425         /* count */ 2,
2426         /* ext */ &xcb_glx_id,
2427         /* opcode */ XCB_GLX_DESTROY_PBUFFER,
2428         /* isvoid */ 1
2429     };
2430 
2431     struct iovec xcb_parts[4];
2432     xcb_void_cookie_t xcb_ret;
2433     xcb_glx_destroy_pbuffer_request_t xcb_out;
2434 
2435     xcb_out.pbuffer = pbuffer;
2436 
2437     xcb_parts[2].iov_base = (char *) &xcb_out;
2438     xcb_parts[2].iov_len = sizeof(xcb_out);
2439     xcb_parts[3].iov_base = 0;
2440     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2441 
2442     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2443     return xcb_ret;
2444 }
2445 
2446 int
xcb_glx_get_drawable_attributes_sizeof(const void * _buffer)2447 xcb_glx_get_drawable_attributes_sizeof (const void  *_buffer  /**< */)
2448 {
2449     char *xcb_tmp = (char *)_buffer;
2450     const xcb_glx_get_drawable_attributes_reply_t *_aux = (xcb_glx_get_drawable_attributes_reply_t *)_buffer;
2451     unsigned int xcb_buffer_len = 0;
2452     unsigned int xcb_block_len = 0;
2453     unsigned int xcb_pad = 0;
2454     unsigned int xcb_align_to = 0;
2455 
2456 
2457     xcb_block_len += sizeof(xcb_glx_get_drawable_attributes_reply_t);
2458     xcb_tmp += xcb_block_len;
2459     xcb_buffer_len += xcb_block_len;
2460     xcb_block_len = 0;
2461     /* attribs */
2462     xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t);
2463     xcb_tmp += xcb_block_len;
2464     xcb_align_to = ALIGNOF(uint32_t);
2465     /* insert padding */
2466     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2467     xcb_buffer_len += xcb_block_len + xcb_pad;
2468     if (0 != xcb_pad) {
2469         xcb_tmp += xcb_pad;
2470         xcb_pad = 0;
2471     }
2472     xcb_block_len = 0;
2473 
2474     return xcb_buffer_len;
2475 }
2476 
2477 xcb_glx_get_drawable_attributes_cookie_t
xcb_glx_get_drawable_attributes(xcb_connection_t * c,xcb_glx_drawable_t drawable)2478 xcb_glx_get_drawable_attributes (xcb_connection_t   *c  /**< */,
2479                                  xcb_glx_drawable_t  drawable  /**< */)
2480 {
2481     static const xcb_protocol_request_t xcb_req = {
2482         /* count */ 2,
2483         /* ext */ &xcb_glx_id,
2484         /* opcode */ XCB_GLX_GET_DRAWABLE_ATTRIBUTES,
2485         /* isvoid */ 0
2486     };
2487 
2488     struct iovec xcb_parts[4];
2489     xcb_glx_get_drawable_attributes_cookie_t xcb_ret;
2490     xcb_glx_get_drawable_attributes_request_t xcb_out;
2491 
2492     xcb_out.drawable = drawable;
2493 
2494     xcb_parts[2].iov_base = (char *) &xcb_out;
2495     xcb_parts[2].iov_len = sizeof(xcb_out);
2496     xcb_parts[3].iov_base = 0;
2497     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2498 
2499     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2500     return xcb_ret;
2501 }
2502 
2503 xcb_glx_get_drawable_attributes_cookie_t
xcb_glx_get_drawable_attributes_unchecked(xcb_connection_t * c,xcb_glx_drawable_t drawable)2504 xcb_glx_get_drawable_attributes_unchecked (xcb_connection_t   *c  /**< */,
2505                                            xcb_glx_drawable_t  drawable  /**< */)
2506 {
2507     static const xcb_protocol_request_t xcb_req = {
2508         /* count */ 2,
2509         /* ext */ &xcb_glx_id,
2510         /* opcode */ XCB_GLX_GET_DRAWABLE_ATTRIBUTES,
2511         /* isvoid */ 0
2512     };
2513 
2514     struct iovec xcb_parts[4];
2515     xcb_glx_get_drawable_attributes_cookie_t xcb_ret;
2516     xcb_glx_get_drawable_attributes_request_t xcb_out;
2517 
2518     xcb_out.drawable = drawable;
2519 
2520     xcb_parts[2].iov_base = (char *) &xcb_out;
2521     xcb_parts[2].iov_len = sizeof(xcb_out);
2522     xcb_parts[3].iov_base = 0;
2523     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2524 
2525     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2526     return xcb_ret;
2527 }
2528 
2529 uint32_t *
xcb_glx_get_drawable_attributes_attribs(const xcb_glx_get_drawable_attributes_reply_t * R)2530 xcb_glx_get_drawable_attributes_attribs (const xcb_glx_get_drawable_attributes_reply_t *R  /**< */)
2531 {
2532     return (uint32_t *) (R + 1);
2533 }
2534 
2535 int
xcb_glx_get_drawable_attributes_attribs_length(const xcb_glx_get_drawable_attributes_reply_t * R)2536 xcb_glx_get_drawable_attributes_attribs_length (const xcb_glx_get_drawable_attributes_reply_t *R  /**< */)
2537 {
2538     return (R->num_attribs * 2);
2539 }
2540 
2541 xcb_generic_iterator_t
xcb_glx_get_drawable_attributes_attribs_end(const xcb_glx_get_drawable_attributes_reply_t * R)2542 xcb_glx_get_drawable_attributes_attribs_end (const xcb_glx_get_drawable_attributes_reply_t *R  /**< */)
2543 {
2544     xcb_generic_iterator_t i;
2545     i.data = ((uint32_t *) (R + 1)) + ((R->num_attribs * 2));
2546     i.rem = 0;
2547     i.index = (char *) i.data - (char *) R;
2548     return i;
2549 }
2550 
2551 xcb_glx_get_drawable_attributes_reply_t *
xcb_glx_get_drawable_attributes_reply(xcb_connection_t * c,xcb_glx_get_drawable_attributes_cookie_t cookie,xcb_generic_error_t ** e)2552 xcb_glx_get_drawable_attributes_reply (xcb_connection_t                          *c  /**< */,
2553                                        xcb_glx_get_drawable_attributes_cookie_t   cookie  /**< */,
2554                                        xcb_generic_error_t                      **e  /**< */)
2555 {
2556     return (xcb_glx_get_drawable_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
2557 }
2558 
2559 int
xcb_glx_change_drawable_attributes_sizeof(const void * _buffer)2560 xcb_glx_change_drawable_attributes_sizeof (const void  *_buffer  /**< */)
2561 {
2562     char *xcb_tmp = (char *)_buffer;
2563     const xcb_glx_change_drawable_attributes_request_t *_aux = (xcb_glx_change_drawable_attributes_request_t *)_buffer;
2564     unsigned int xcb_buffer_len = 0;
2565     unsigned int xcb_block_len = 0;
2566     unsigned int xcb_pad = 0;
2567     unsigned int xcb_align_to = 0;
2568 
2569 
2570     xcb_block_len += sizeof(xcb_glx_change_drawable_attributes_request_t);
2571     xcb_tmp += xcb_block_len;
2572     xcb_buffer_len += xcb_block_len;
2573     xcb_block_len = 0;
2574     /* attribs */
2575     xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t);
2576     xcb_tmp += xcb_block_len;
2577     xcb_align_to = ALIGNOF(uint32_t);
2578     /* insert padding */
2579     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2580     xcb_buffer_len += xcb_block_len + xcb_pad;
2581     if (0 != xcb_pad) {
2582         xcb_tmp += xcb_pad;
2583         xcb_pad = 0;
2584     }
2585     xcb_block_len = 0;
2586 
2587     return xcb_buffer_len;
2588 }
2589 
2590 xcb_void_cookie_t
xcb_glx_change_drawable_attributes_checked(xcb_connection_t * c,xcb_glx_drawable_t drawable,uint32_t num_attribs,const uint32_t * attribs)2591 xcb_glx_change_drawable_attributes_checked (xcb_connection_t   *c  /**< */,
2592                                             xcb_glx_drawable_t  drawable  /**< */,
2593                                             uint32_t            num_attribs  /**< */,
2594                                             const uint32_t     *attribs  /**< */)
2595 {
2596     static const xcb_protocol_request_t xcb_req = {
2597         /* count */ 4,
2598         /* ext */ &xcb_glx_id,
2599         /* opcode */ XCB_GLX_CHANGE_DRAWABLE_ATTRIBUTES,
2600         /* isvoid */ 1
2601     };
2602 
2603     struct iovec xcb_parts[6];
2604     xcb_void_cookie_t xcb_ret;
2605     xcb_glx_change_drawable_attributes_request_t xcb_out;
2606 
2607     xcb_out.drawable = drawable;
2608     xcb_out.num_attribs = num_attribs;
2609 
2610     xcb_parts[2].iov_base = (char *) &xcb_out;
2611     xcb_parts[2].iov_len = sizeof(xcb_out);
2612     xcb_parts[3].iov_base = 0;
2613     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2614     /* uint32_t attribs */
2615     xcb_parts[4].iov_base = (char *) attribs;
2616     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
2617     xcb_parts[5].iov_base = 0;
2618     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2619 
2620     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2621     return xcb_ret;
2622 }
2623 
2624 xcb_void_cookie_t
xcb_glx_change_drawable_attributes(xcb_connection_t * c,xcb_glx_drawable_t drawable,uint32_t num_attribs,const uint32_t * attribs)2625 xcb_glx_change_drawable_attributes (xcb_connection_t   *c  /**< */,
2626                                     xcb_glx_drawable_t  drawable  /**< */,
2627                                     uint32_t            num_attribs  /**< */,
2628                                     const uint32_t     *attribs  /**< */)
2629 {
2630     static const xcb_protocol_request_t xcb_req = {
2631         /* count */ 4,
2632         /* ext */ &xcb_glx_id,
2633         /* opcode */ XCB_GLX_CHANGE_DRAWABLE_ATTRIBUTES,
2634         /* isvoid */ 1
2635     };
2636 
2637     struct iovec xcb_parts[6];
2638     xcb_void_cookie_t xcb_ret;
2639     xcb_glx_change_drawable_attributes_request_t xcb_out;
2640 
2641     xcb_out.drawable = drawable;
2642     xcb_out.num_attribs = num_attribs;
2643 
2644     xcb_parts[2].iov_base = (char *) &xcb_out;
2645     xcb_parts[2].iov_len = sizeof(xcb_out);
2646     xcb_parts[3].iov_base = 0;
2647     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2648     /* uint32_t attribs */
2649     xcb_parts[4].iov_base = (char *) attribs;
2650     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
2651     xcb_parts[5].iov_base = 0;
2652     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2653 
2654     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2655     return xcb_ret;
2656 }
2657 
2658 int
xcb_glx_create_window_sizeof(const void * _buffer)2659 xcb_glx_create_window_sizeof (const void  *_buffer  /**< */)
2660 {
2661     char *xcb_tmp = (char *)_buffer;
2662     const xcb_glx_create_window_request_t *_aux = (xcb_glx_create_window_request_t *)_buffer;
2663     unsigned int xcb_buffer_len = 0;
2664     unsigned int xcb_block_len = 0;
2665     unsigned int xcb_pad = 0;
2666     unsigned int xcb_align_to = 0;
2667 
2668 
2669     xcb_block_len += sizeof(xcb_glx_create_window_request_t);
2670     xcb_tmp += xcb_block_len;
2671     xcb_buffer_len += xcb_block_len;
2672     xcb_block_len = 0;
2673     /* attribs */
2674     xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t);
2675     xcb_tmp += xcb_block_len;
2676     xcb_align_to = ALIGNOF(uint32_t);
2677     /* insert padding */
2678     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2679     xcb_buffer_len += xcb_block_len + xcb_pad;
2680     if (0 != xcb_pad) {
2681         xcb_tmp += xcb_pad;
2682         xcb_pad = 0;
2683     }
2684     xcb_block_len = 0;
2685 
2686     return xcb_buffer_len;
2687 }
2688 
2689 xcb_void_cookie_t
xcb_glx_create_window_checked(xcb_connection_t * c,uint32_t screen,xcb_glx_fbconfig_t fbconfig,xcb_window_t window,xcb_glx_window_t glx_window,uint32_t num_attribs,const uint32_t * attribs)2690 xcb_glx_create_window_checked (xcb_connection_t   *c  /**< */,
2691                                uint32_t            screen  /**< */,
2692                                xcb_glx_fbconfig_t  fbconfig  /**< */,
2693                                xcb_window_t        window  /**< */,
2694                                xcb_glx_window_t    glx_window  /**< */,
2695                                uint32_t            num_attribs  /**< */,
2696                                const uint32_t     *attribs  /**< */)
2697 {
2698     static const xcb_protocol_request_t xcb_req = {
2699         /* count */ 4,
2700         /* ext */ &xcb_glx_id,
2701         /* opcode */ XCB_GLX_CREATE_WINDOW,
2702         /* isvoid */ 1
2703     };
2704 
2705     struct iovec xcb_parts[6];
2706     xcb_void_cookie_t xcb_ret;
2707     xcb_glx_create_window_request_t xcb_out;
2708 
2709     xcb_out.screen = screen;
2710     xcb_out.fbconfig = fbconfig;
2711     xcb_out.window = window;
2712     xcb_out.glx_window = glx_window;
2713     xcb_out.num_attribs = num_attribs;
2714 
2715     xcb_parts[2].iov_base = (char *) &xcb_out;
2716     xcb_parts[2].iov_len = sizeof(xcb_out);
2717     xcb_parts[3].iov_base = 0;
2718     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2719     /* uint32_t attribs */
2720     xcb_parts[4].iov_base = (char *) attribs;
2721     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
2722     xcb_parts[5].iov_base = 0;
2723     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2724 
2725     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2726     return xcb_ret;
2727 }
2728 
2729 xcb_void_cookie_t
xcb_glx_create_window(xcb_connection_t * c,uint32_t screen,xcb_glx_fbconfig_t fbconfig,xcb_window_t window,xcb_glx_window_t glx_window,uint32_t num_attribs,const uint32_t * attribs)2730 xcb_glx_create_window (xcb_connection_t   *c  /**< */,
2731                        uint32_t            screen  /**< */,
2732                        xcb_glx_fbconfig_t  fbconfig  /**< */,
2733                        xcb_window_t        window  /**< */,
2734                        xcb_glx_window_t    glx_window  /**< */,
2735                        uint32_t            num_attribs  /**< */,
2736                        const uint32_t     *attribs  /**< */)
2737 {
2738     static const xcb_protocol_request_t xcb_req = {
2739         /* count */ 4,
2740         /* ext */ &xcb_glx_id,
2741         /* opcode */ XCB_GLX_CREATE_WINDOW,
2742         /* isvoid */ 1
2743     };
2744 
2745     struct iovec xcb_parts[6];
2746     xcb_void_cookie_t xcb_ret;
2747     xcb_glx_create_window_request_t xcb_out;
2748 
2749     xcb_out.screen = screen;
2750     xcb_out.fbconfig = fbconfig;
2751     xcb_out.window = window;
2752     xcb_out.glx_window = glx_window;
2753     xcb_out.num_attribs = num_attribs;
2754 
2755     xcb_parts[2].iov_base = (char *) &xcb_out;
2756     xcb_parts[2].iov_len = sizeof(xcb_out);
2757     xcb_parts[3].iov_base = 0;
2758     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2759     /* uint32_t attribs */
2760     xcb_parts[4].iov_base = (char *) attribs;
2761     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
2762     xcb_parts[5].iov_base = 0;
2763     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2764 
2765     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2766     return xcb_ret;
2767 }
2768 
2769 xcb_void_cookie_t
xcb_glx_delete_window_checked(xcb_connection_t * c,xcb_glx_window_t glxwindow)2770 xcb_glx_delete_window_checked (xcb_connection_t *c  /**< */,
2771                                xcb_glx_window_t  glxwindow  /**< */)
2772 {
2773     static const xcb_protocol_request_t xcb_req = {
2774         /* count */ 2,
2775         /* ext */ &xcb_glx_id,
2776         /* opcode */ XCB_GLX_DELETE_WINDOW,
2777         /* isvoid */ 1
2778     };
2779 
2780     struct iovec xcb_parts[4];
2781     xcb_void_cookie_t xcb_ret;
2782     xcb_glx_delete_window_request_t xcb_out;
2783 
2784     xcb_out.glxwindow = glxwindow;
2785 
2786     xcb_parts[2].iov_base = (char *) &xcb_out;
2787     xcb_parts[2].iov_len = sizeof(xcb_out);
2788     xcb_parts[3].iov_base = 0;
2789     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2790 
2791     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2792     return xcb_ret;
2793 }
2794 
2795 xcb_void_cookie_t
xcb_glx_delete_window(xcb_connection_t * c,xcb_glx_window_t glxwindow)2796 xcb_glx_delete_window (xcb_connection_t *c  /**< */,
2797                        xcb_glx_window_t  glxwindow  /**< */)
2798 {
2799     static const xcb_protocol_request_t xcb_req = {
2800         /* count */ 2,
2801         /* ext */ &xcb_glx_id,
2802         /* opcode */ XCB_GLX_DELETE_WINDOW,
2803         /* isvoid */ 1
2804     };
2805 
2806     struct iovec xcb_parts[4];
2807     xcb_void_cookie_t xcb_ret;
2808     xcb_glx_delete_window_request_t xcb_out;
2809 
2810     xcb_out.glxwindow = glxwindow;
2811 
2812     xcb_parts[2].iov_base = (char *) &xcb_out;
2813     xcb_parts[2].iov_len = sizeof(xcb_out);
2814     xcb_parts[3].iov_base = 0;
2815     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2816 
2817     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2818     return xcb_ret;
2819 }
2820 
2821 int
xcb_glx_set_client_info_arb_sizeof(const void * _buffer)2822 xcb_glx_set_client_info_arb_sizeof (const void  *_buffer  /**< */)
2823 {
2824     char *xcb_tmp = (char *)_buffer;
2825     const xcb_glx_set_client_info_arb_request_t *_aux = (xcb_glx_set_client_info_arb_request_t *)_buffer;
2826     unsigned int xcb_buffer_len = 0;
2827     unsigned int xcb_block_len = 0;
2828     unsigned int xcb_pad = 0;
2829     unsigned int xcb_align_to = 0;
2830 
2831 
2832     xcb_block_len += sizeof(xcb_glx_set_client_info_arb_request_t);
2833     xcb_tmp += xcb_block_len;
2834     xcb_buffer_len += xcb_block_len;
2835     xcb_block_len = 0;
2836     /* gl_versions */
2837     xcb_block_len += (_aux->num_versions * 2) * sizeof(uint32_t);
2838     xcb_tmp += xcb_block_len;
2839     xcb_align_to = ALIGNOF(uint32_t);
2840     /* insert padding */
2841     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2842     xcb_buffer_len += xcb_block_len + xcb_pad;
2843     if (0 != xcb_pad) {
2844         xcb_tmp += xcb_pad;
2845         xcb_pad = 0;
2846     }
2847     xcb_block_len = 0;
2848     /* gl_extension_string */
2849     xcb_block_len += _aux->gl_str_len * sizeof(char);
2850     xcb_tmp += xcb_block_len;
2851     xcb_align_to = ALIGNOF(char);
2852     /* insert padding */
2853     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2854     xcb_buffer_len += xcb_block_len + xcb_pad;
2855     if (0 != xcb_pad) {
2856         xcb_tmp += xcb_pad;
2857         xcb_pad = 0;
2858     }
2859     xcb_block_len = 0;
2860     /* glx_extension_string */
2861     xcb_block_len += _aux->glx_str_len * sizeof(char);
2862     xcb_tmp += xcb_block_len;
2863     xcb_align_to = ALIGNOF(char);
2864     /* insert padding */
2865     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
2866     xcb_buffer_len += xcb_block_len + xcb_pad;
2867     if (0 != xcb_pad) {
2868         xcb_tmp += xcb_pad;
2869         xcb_pad = 0;
2870     }
2871     xcb_block_len = 0;
2872 
2873     return xcb_buffer_len;
2874 }
2875 
2876 xcb_void_cookie_t
xcb_glx_set_client_info_arb_checked(xcb_connection_t * c,uint32_t major_version,uint32_t minor_version,uint32_t num_versions,uint32_t gl_str_len,uint32_t glx_str_len,const uint32_t * gl_versions,const char * gl_extension_string,const char * glx_extension_string)2877 xcb_glx_set_client_info_arb_checked (xcb_connection_t *c  /**< */,
2878                                      uint32_t          major_version  /**< */,
2879                                      uint32_t          minor_version  /**< */,
2880                                      uint32_t          num_versions  /**< */,
2881                                      uint32_t          gl_str_len  /**< */,
2882                                      uint32_t          glx_str_len  /**< */,
2883                                      const uint32_t   *gl_versions  /**< */,
2884                                      const char       *gl_extension_string  /**< */,
2885                                      const char       *glx_extension_string  /**< */)
2886 {
2887     static const xcb_protocol_request_t xcb_req = {
2888         /* count */ 8,
2889         /* ext */ &xcb_glx_id,
2890         /* opcode */ XCB_GLX_SET_CLIENT_INFO_ARB,
2891         /* isvoid */ 1
2892     };
2893 
2894     struct iovec xcb_parts[10];
2895     xcb_void_cookie_t xcb_ret;
2896     xcb_glx_set_client_info_arb_request_t xcb_out;
2897 
2898     xcb_out.major_version = major_version;
2899     xcb_out.minor_version = minor_version;
2900     xcb_out.num_versions = num_versions;
2901     xcb_out.gl_str_len = gl_str_len;
2902     xcb_out.glx_str_len = glx_str_len;
2903 
2904     xcb_parts[2].iov_base = (char *) &xcb_out;
2905     xcb_parts[2].iov_len = sizeof(xcb_out);
2906     xcb_parts[3].iov_base = 0;
2907     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2908     /* uint32_t gl_versions */
2909     xcb_parts[4].iov_base = (char *) gl_versions;
2910     xcb_parts[4].iov_len = (num_versions * 2) * sizeof(uint32_t);
2911     xcb_parts[5].iov_base = 0;
2912     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2913     /* char gl_extension_string */
2914     xcb_parts[6].iov_base = (char *) gl_extension_string;
2915     xcb_parts[6].iov_len = gl_str_len * sizeof(char);
2916     xcb_parts[7].iov_base = 0;
2917     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
2918     /* char glx_extension_string */
2919     xcb_parts[8].iov_base = (char *) glx_extension_string;
2920     xcb_parts[8].iov_len = glx_str_len * sizeof(char);
2921     xcb_parts[9].iov_base = 0;
2922     xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
2923 
2924     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
2925     return xcb_ret;
2926 }
2927 
2928 xcb_void_cookie_t
xcb_glx_set_client_info_arb(xcb_connection_t * c,uint32_t major_version,uint32_t minor_version,uint32_t num_versions,uint32_t gl_str_len,uint32_t glx_str_len,const uint32_t * gl_versions,const char * gl_extension_string,const char * glx_extension_string)2929 xcb_glx_set_client_info_arb (xcb_connection_t *c  /**< */,
2930                              uint32_t          major_version  /**< */,
2931                              uint32_t          minor_version  /**< */,
2932                              uint32_t          num_versions  /**< */,
2933                              uint32_t          gl_str_len  /**< */,
2934                              uint32_t          glx_str_len  /**< */,
2935                              const uint32_t   *gl_versions  /**< */,
2936                              const char       *gl_extension_string  /**< */,
2937                              const char       *glx_extension_string  /**< */)
2938 {
2939     static const xcb_protocol_request_t xcb_req = {
2940         /* count */ 8,
2941         /* ext */ &xcb_glx_id,
2942         /* opcode */ XCB_GLX_SET_CLIENT_INFO_ARB,
2943         /* isvoid */ 1
2944     };
2945 
2946     struct iovec xcb_parts[10];
2947     xcb_void_cookie_t xcb_ret;
2948     xcb_glx_set_client_info_arb_request_t xcb_out;
2949 
2950     xcb_out.major_version = major_version;
2951     xcb_out.minor_version = minor_version;
2952     xcb_out.num_versions = num_versions;
2953     xcb_out.gl_str_len = gl_str_len;
2954     xcb_out.glx_str_len = glx_str_len;
2955 
2956     xcb_parts[2].iov_base = (char *) &xcb_out;
2957     xcb_parts[2].iov_len = sizeof(xcb_out);
2958     xcb_parts[3].iov_base = 0;
2959     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
2960     /* uint32_t gl_versions */
2961     xcb_parts[4].iov_base = (char *) gl_versions;
2962     xcb_parts[4].iov_len = (num_versions * 2) * sizeof(uint32_t);
2963     xcb_parts[5].iov_base = 0;
2964     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
2965     /* char gl_extension_string */
2966     xcb_parts[6].iov_base = (char *) gl_extension_string;
2967     xcb_parts[6].iov_len = gl_str_len * sizeof(char);
2968     xcb_parts[7].iov_base = 0;
2969     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
2970     /* char glx_extension_string */
2971     xcb_parts[8].iov_base = (char *) glx_extension_string;
2972     xcb_parts[8].iov_len = glx_str_len * sizeof(char);
2973     xcb_parts[9].iov_base = 0;
2974     xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
2975 
2976     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
2977     return xcb_ret;
2978 }
2979 
2980 int
xcb_glx_create_context_attribs_arb_sizeof(const void * _buffer)2981 xcb_glx_create_context_attribs_arb_sizeof (const void  *_buffer  /**< */)
2982 {
2983     char *xcb_tmp = (char *)_buffer;
2984     const xcb_glx_create_context_attribs_arb_request_t *_aux = (xcb_glx_create_context_attribs_arb_request_t *)_buffer;
2985     unsigned int xcb_buffer_len = 0;
2986     unsigned int xcb_block_len = 0;
2987     unsigned int xcb_pad = 0;
2988     unsigned int xcb_align_to = 0;
2989 
2990 
2991     xcb_block_len += sizeof(xcb_glx_create_context_attribs_arb_request_t);
2992     xcb_tmp += xcb_block_len;
2993     xcb_buffer_len += xcb_block_len;
2994     xcb_block_len = 0;
2995     /* attribs */
2996     xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t);
2997     xcb_tmp += xcb_block_len;
2998     xcb_align_to = ALIGNOF(uint32_t);
2999     /* insert padding */
3000     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3001     xcb_buffer_len += xcb_block_len + xcb_pad;
3002     if (0 != xcb_pad) {
3003         xcb_tmp += xcb_pad;
3004         xcb_pad = 0;
3005     }
3006     xcb_block_len = 0;
3007 
3008     return xcb_buffer_len;
3009 }
3010 
3011 xcb_void_cookie_t
xcb_glx_create_context_attribs_arb_checked(xcb_connection_t * c,xcb_glx_context_t context,xcb_glx_fbconfig_t fbconfig,uint32_t screen,xcb_glx_context_t share_list,uint8_t is_direct,uint32_t num_attribs,const uint32_t * attribs)3012 xcb_glx_create_context_attribs_arb_checked (xcb_connection_t   *c  /**< */,
3013                                             xcb_glx_context_t   context  /**< */,
3014                                             xcb_glx_fbconfig_t  fbconfig  /**< */,
3015                                             uint32_t            screen  /**< */,
3016                                             xcb_glx_context_t   share_list  /**< */,
3017                                             uint8_t             is_direct  /**< */,
3018                                             uint32_t            num_attribs  /**< */,
3019                                             const uint32_t     *attribs  /**< */)
3020 {
3021     static const xcb_protocol_request_t xcb_req = {
3022         /* count */ 4,
3023         /* ext */ &xcb_glx_id,
3024         /* opcode */ XCB_GLX_CREATE_CONTEXT_ATTRIBS_ARB,
3025         /* isvoid */ 1
3026     };
3027 
3028     struct iovec xcb_parts[6];
3029     xcb_void_cookie_t xcb_ret;
3030     xcb_glx_create_context_attribs_arb_request_t xcb_out;
3031 
3032     xcb_out.context = context;
3033     xcb_out.fbconfig = fbconfig;
3034     xcb_out.screen = screen;
3035     xcb_out.share_list = share_list;
3036     xcb_out.is_direct = is_direct;
3037     memset(xcb_out.pad0, 0, 3);
3038     xcb_out.num_attribs = num_attribs;
3039 
3040     xcb_parts[2].iov_base = (char *) &xcb_out;
3041     xcb_parts[2].iov_len = sizeof(xcb_out);
3042     xcb_parts[3].iov_base = 0;
3043     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3044     /* uint32_t attribs */
3045     xcb_parts[4].iov_base = (char *) attribs;
3046     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
3047     xcb_parts[5].iov_base = 0;
3048     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3049 
3050     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3051     return xcb_ret;
3052 }
3053 
3054 xcb_void_cookie_t
xcb_glx_create_context_attribs_arb(xcb_connection_t * c,xcb_glx_context_t context,xcb_glx_fbconfig_t fbconfig,uint32_t screen,xcb_glx_context_t share_list,uint8_t is_direct,uint32_t num_attribs,const uint32_t * attribs)3055 xcb_glx_create_context_attribs_arb (xcb_connection_t   *c  /**< */,
3056                                     xcb_glx_context_t   context  /**< */,
3057                                     xcb_glx_fbconfig_t  fbconfig  /**< */,
3058                                     uint32_t            screen  /**< */,
3059                                     xcb_glx_context_t   share_list  /**< */,
3060                                     uint8_t             is_direct  /**< */,
3061                                     uint32_t            num_attribs  /**< */,
3062                                     const uint32_t     *attribs  /**< */)
3063 {
3064     static const xcb_protocol_request_t xcb_req = {
3065         /* count */ 4,
3066         /* ext */ &xcb_glx_id,
3067         /* opcode */ XCB_GLX_CREATE_CONTEXT_ATTRIBS_ARB,
3068         /* isvoid */ 1
3069     };
3070 
3071     struct iovec xcb_parts[6];
3072     xcb_void_cookie_t xcb_ret;
3073     xcb_glx_create_context_attribs_arb_request_t xcb_out;
3074 
3075     xcb_out.context = context;
3076     xcb_out.fbconfig = fbconfig;
3077     xcb_out.screen = screen;
3078     xcb_out.share_list = share_list;
3079     xcb_out.is_direct = is_direct;
3080     memset(xcb_out.pad0, 0, 3);
3081     xcb_out.num_attribs = num_attribs;
3082 
3083     xcb_parts[2].iov_base = (char *) &xcb_out;
3084     xcb_parts[2].iov_len = sizeof(xcb_out);
3085     xcb_parts[3].iov_base = 0;
3086     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3087     /* uint32_t attribs */
3088     xcb_parts[4].iov_base = (char *) attribs;
3089     xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t);
3090     xcb_parts[5].iov_base = 0;
3091     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3092 
3093     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3094     return xcb_ret;
3095 }
3096 
3097 int
xcb_glx_set_client_info_2arb_sizeof(const void * _buffer)3098 xcb_glx_set_client_info_2arb_sizeof (const void  *_buffer  /**< */)
3099 {
3100     char *xcb_tmp = (char *)_buffer;
3101     const xcb_glx_set_client_info_2arb_request_t *_aux = (xcb_glx_set_client_info_2arb_request_t *)_buffer;
3102     unsigned int xcb_buffer_len = 0;
3103     unsigned int xcb_block_len = 0;
3104     unsigned int xcb_pad = 0;
3105     unsigned int xcb_align_to = 0;
3106 
3107 
3108     xcb_block_len += sizeof(xcb_glx_set_client_info_2arb_request_t);
3109     xcb_tmp += xcb_block_len;
3110     xcb_buffer_len += xcb_block_len;
3111     xcb_block_len = 0;
3112     /* gl_versions */
3113     xcb_block_len += (_aux->num_versions * 3) * sizeof(uint32_t);
3114     xcb_tmp += xcb_block_len;
3115     xcb_align_to = ALIGNOF(uint32_t);
3116     /* insert padding */
3117     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3118     xcb_buffer_len += xcb_block_len + xcb_pad;
3119     if (0 != xcb_pad) {
3120         xcb_tmp += xcb_pad;
3121         xcb_pad = 0;
3122     }
3123     xcb_block_len = 0;
3124     /* gl_extension_string */
3125     xcb_block_len += _aux->gl_str_len * sizeof(char);
3126     xcb_tmp += xcb_block_len;
3127     xcb_align_to = ALIGNOF(char);
3128     /* insert padding */
3129     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3130     xcb_buffer_len += xcb_block_len + xcb_pad;
3131     if (0 != xcb_pad) {
3132         xcb_tmp += xcb_pad;
3133         xcb_pad = 0;
3134     }
3135     xcb_block_len = 0;
3136     /* glx_extension_string */
3137     xcb_block_len += _aux->glx_str_len * sizeof(char);
3138     xcb_tmp += xcb_block_len;
3139     xcb_align_to = ALIGNOF(char);
3140     /* insert padding */
3141     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3142     xcb_buffer_len += xcb_block_len + xcb_pad;
3143     if (0 != xcb_pad) {
3144         xcb_tmp += xcb_pad;
3145         xcb_pad = 0;
3146     }
3147     xcb_block_len = 0;
3148 
3149     return xcb_buffer_len;
3150 }
3151 
3152 xcb_void_cookie_t
xcb_glx_set_client_info_2arb_checked(xcb_connection_t * c,uint32_t major_version,uint32_t minor_version,uint32_t num_versions,uint32_t gl_str_len,uint32_t glx_str_len,const uint32_t * gl_versions,const char * gl_extension_string,const char * glx_extension_string)3153 xcb_glx_set_client_info_2arb_checked (xcb_connection_t *c  /**< */,
3154                                       uint32_t          major_version  /**< */,
3155                                       uint32_t          minor_version  /**< */,
3156                                       uint32_t          num_versions  /**< */,
3157                                       uint32_t          gl_str_len  /**< */,
3158                                       uint32_t          glx_str_len  /**< */,
3159                                       const uint32_t   *gl_versions  /**< */,
3160                                       const char       *gl_extension_string  /**< */,
3161                                       const char       *glx_extension_string  /**< */)
3162 {
3163     static const xcb_protocol_request_t xcb_req = {
3164         /* count */ 8,
3165         /* ext */ &xcb_glx_id,
3166         /* opcode */ XCB_GLX_SET_CLIENT_INFO_2ARB,
3167         /* isvoid */ 1
3168     };
3169 
3170     struct iovec xcb_parts[10];
3171     xcb_void_cookie_t xcb_ret;
3172     xcb_glx_set_client_info_2arb_request_t xcb_out;
3173 
3174     xcb_out.major_version = major_version;
3175     xcb_out.minor_version = minor_version;
3176     xcb_out.num_versions = num_versions;
3177     xcb_out.gl_str_len = gl_str_len;
3178     xcb_out.glx_str_len = glx_str_len;
3179 
3180     xcb_parts[2].iov_base = (char *) &xcb_out;
3181     xcb_parts[2].iov_len = sizeof(xcb_out);
3182     xcb_parts[3].iov_base = 0;
3183     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3184     /* uint32_t gl_versions */
3185     xcb_parts[4].iov_base = (char *) gl_versions;
3186     xcb_parts[4].iov_len = (num_versions * 3) * sizeof(uint32_t);
3187     xcb_parts[5].iov_base = 0;
3188     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3189     /* char gl_extension_string */
3190     xcb_parts[6].iov_base = (char *) gl_extension_string;
3191     xcb_parts[6].iov_len = gl_str_len * sizeof(char);
3192     xcb_parts[7].iov_base = 0;
3193     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3194     /* char glx_extension_string */
3195     xcb_parts[8].iov_base = (char *) glx_extension_string;
3196     xcb_parts[8].iov_len = glx_str_len * sizeof(char);
3197     xcb_parts[9].iov_base = 0;
3198     xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
3199 
3200     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3201     return xcb_ret;
3202 }
3203 
3204 xcb_void_cookie_t
xcb_glx_set_client_info_2arb(xcb_connection_t * c,uint32_t major_version,uint32_t minor_version,uint32_t num_versions,uint32_t gl_str_len,uint32_t glx_str_len,const uint32_t * gl_versions,const char * gl_extension_string,const char * glx_extension_string)3205 xcb_glx_set_client_info_2arb (xcb_connection_t *c  /**< */,
3206                               uint32_t          major_version  /**< */,
3207                               uint32_t          minor_version  /**< */,
3208                               uint32_t          num_versions  /**< */,
3209                               uint32_t          gl_str_len  /**< */,
3210                               uint32_t          glx_str_len  /**< */,
3211                               const uint32_t   *gl_versions  /**< */,
3212                               const char       *gl_extension_string  /**< */,
3213                               const char       *glx_extension_string  /**< */)
3214 {
3215     static const xcb_protocol_request_t xcb_req = {
3216         /* count */ 8,
3217         /* ext */ &xcb_glx_id,
3218         /* opcode */ XCB_GLX_SET_CLIENT_INFO_2ARB,
3219         /* isvoid */ 1
3220     };
3221 
3222     struct iovec xcb_parts[10];
3223     xcb_void_cookie_t xcb_ret;
3224     xcb_glx_set_client_info_2arb_request_t xcb_out;
3225 
3226     xcb_out.major_version = major_version;
3227     xcb_out.minor_version = minor_version;
3228     xcb_out.num_versions = num_versions;
3229     xcb_out.gl_str_len = gl_str_len;
3230     xcb_out.glx_str_len = glx_str_len;
3231 
3232     xcb_parts[2].iov_base = (char *) &xcb_out;
3233     xcb_parts[2].iov_len = sizeof(xcb_out);
3234     xcb_parts[3].iov_base = 0;
3235     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3236     /* uint32_t gl_versions */
3237     xcb_parts[4].iov_base = (char *) gl_versions;
3238     xcb_parts[4].iov_len = (num_versions * 3) * sizeof(uint32_t);
3239     xcb_parts[5].iov_base = 0;
3240     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
3241     /* char gl_extension_string */
3242     xcb_parts[6].iov_base = (char *) gl_extension_string;
3243     xcb_parts[6].iov_len = gl_str_len * sizeof(char);
3244     xcb_parts[7].iov_base = 0;
3245     xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3;
3246     /* char glx_extension_string */
3247     xcb_parts[8].iov_base = (char *) glx_extension_string;
3248     xcb_parts[8].iov_len = glx_str_len * sizeof(char);
3249     xcb_parts[9].iov_base = 0;
3250     xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3;
3251 
3252     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3253     return xcb_ret;
3254 }
3255 
3256 xcb_void_cookie_t
xcb_glx_new_list_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t list,uint32_t mode)3257 xcb_glx_new_list_checked (xcb_connection_t      *c  /**< */,
3258                           xcb_glx_context_tag_t  context_tag  /**< */,
3259                           uint32_t               list  /**< */,
3260                           uint32_t               mode  /**< */)
3261 {
3262     static const xcb_protocol_request_t xcb_req = {
3263         /* count */ 2,
3264         /* ext */ &xcb_glx_id,
3265         /* opcode */ XCB_GLX_NEW_LIST,
3266         /* isvoid */ 1
3267     };
3268 
3269     struct iovec xcb_parts[4];
3270     xcb_void_cookie_t xcb_ret;
3271     xcb_glx_new_list_request_t xcb_out;
3272 
3273     xcb_out.context_tag = context_tag;
3274     xcb_out.list = list;
3275     xcb_out.mode = mode;
3276 
3277     xcb_parts[2].iov_base = (char *) &xcb_out;
3278     xcb_parts[2].iov_len = sizeof(xcb_out);
3279     xcb_parts[3].iov_base = 0;
3280     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3281 
3282     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3283     return xcb_ret;
3284 }
3285 
3286 xcb_void_cookie_t
xcb_glx_new_list(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t list,uint32_t mode)3287 xcb_glx_new_list (xcb_connection_t      *c  /**< */,
3288                   xcb_glx_context_tag_t  context_tag  /**< */,
3289                   uint32_t               list  /**< */,
3290                   uint32_t               mode  /**< */)
3291 {
3292     static const xcb_protocol_request_t xcb_req = {
3293         /* count */ 2,
3294         /* ext */ &xcb_glx_id,
3295         /* opcode */ XCB_GLX_NEW_LIST,
3296         /* isvoid */ 1
3297     };
3298 
3299     struct iovec xcb_parts[4];
3300     xcb_void_cookie_t xcb_ret;
3301     xcb_glx_new_list_request_t xcb_out;
3302 
3303     xcb_out.context_tag = context_tag;
3304     xcb_out.list = list;
3305     xcb_out.mode = mode;
3306 
3307     xcb_parts[2].iov_base = (char *) &xcb_out;
3308     xcb_parts[2].iov_len = sizeof(xcb_out);
3309     xcb_parts[3].iov_base = 0;
3310     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3311 
3312     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3313     return xcb_ret;
3314 }
3315 
3316 xcb_void_cookie_t
xcb_glx_end_list_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)3317 xcb_glx_end_list_checked (xcb_connection_t      *c  /**< */,
3318                           xcb_glx_context_tag_t  context_tag  /**< */)
3319 {
3320     static const xcb_protocol_request_t xcb_req = {
3321         /* count */ 2,
3322         /* ext */ &xcb_glx_id,
3323         /* opcode */ XCB_GLX_END_LIST,
3324         /* isvoid */ 1
3325     };
3326 
3327     struct iovec xcb_parts[4];
3328     xcb_void_cookie_t xcb_ret;
3329     xcb_glx_end_list_request_t xcb_out;
3330 
3331     xcb_out.context_tag = context_tag;
3332 
3333     xcb_parts[2].iov_base = (char *) &xcb_out;
3334     xcb_parts[2].iov_len = sizeof(xcb_out);
3335     xcb_parts[3].iov_base = 0;
3336     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3337 
3338     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3339     return xcb_ret;
3340 }
3341 
3342 xcb_void_cookie_t
xcb_glx_end_list(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)3343 xcb_glx_end_list (xcb_connection_t      *c  /**< */,
3344                   xcb_glx_context_tag_t  context_tag  /**< */)
3345 {
3346     static const xcb_protocol_request_t xcb_req = {
3347         /* count */ 2,
3348         /* ext */ &xcb_glx_id,
3349         /* opcode */ XCB_GLX_END_LIST,
3350         /* isvoid */ 1
3351     };
3352 
3353     struct iovec xcb_parts[4];
3354     xcb_void_cookie_t xcb_ret;
3355     xcb_glx_end_list_request_t xcb_out;
3356 
3357     xcb_out.context_tag = context_tag;
3358 
3359     xcb_parts[2].iov_base = (char *) &xcb_out;
3360     xcb_parts[2].iov_len = sizeof(xcb_out);
3361     xcb_parts[3].iov_base = 0;
3362     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3363 
3364     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3365     return xcb_ret;
3366 }
3367 
3368 xcb_void_cookie_t
xcb_glx_delete_lists_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t list,int32_t range)3369 xcb_glx_delete_lists_checked (xcb_connection_t      *c  /**< */,
3370                               xcb_glx_context_tag_t  context_tag  /**< */,
3371                               uint32_t               list  /**< */,
3372                               int32_t                range  /**< */)
3373 {
3374     static const xcb_protocol_request_t xcb_req = {
3375         /* count */ 2,
3376         /* ext */ &xcb_glx_id,
3377         /* opcode */ XCB_GLX_DELETE_LISTS,
3378         /* isvoid */ 1
3379     };
3380 
3381     struct iovec xcb_parts[4];
3382     xcb_void_cookie_t xcb_ret;
3383     xcb_glx_delete_lists_request_t xcb_out;
3384 
3385     xcb_out.context_tag = context_tag;
3386     xcb_out.list = list;
3387     xcb_out.range = range;
3388 
3389     xcb_parts[2].iov_base = (char *) &xcb_out;
3390     xcb_parts[2].iov_len = sizeof(xcb_out);
3391     xcb_parts[3].iov_base = 0;
3392     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3393 
3394     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3395     return xcb_ret;
3396 }
3397 
3398 xcb_void_cookie_t
xcb_glx_delete_lists(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t list,int32_t range)3399 xcb_glx_delete_lists (xcb_connection_t      *c  /**< */,
3400                       xcb_glx_context_tag_t  context_tag  /**< */,
3401                       uint32_t               list  /**< */,
3402                       int32_t                range  /**< */)
3403 {
3404     static const xcb_protocol_request_t xcb_req = {
3405         /* count */ 2,
3406         /* ext */ &xcb_glx_id,
3407         /* opcode */ XCB_GLX_DELETE_LISTS,
3408         /* isvoid */ 1
3409     };
3410 
3411     struct iovec xcb_parts[4];
3412     xcb_void_cookie_t xcb_ret;
3413     xcb_glx_delete_lists_request_t xcb_out;
3414 
3415     xcb_out.context_tag = context_tag;
3416     xcb_out.list = list;
3417     xcb_out.range = range;
3418 
3419     xcb_parts[2].iov_base = (char *) &xcb_out;
3420     xcb_parts[2].iov_len = sizeof(xcb_out);
3421     xcb_parts[3].iov_base = 0;
3422     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3423 
3424     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3425     return xcb_ret;
3426 }
3427 
3428 xcb_glx_gen_lists_cookie_t
xcb_glx_gen_lists(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t range)3429 xcb_glx_gen_lists (xcb_connection_t      *c  /**< */,
3430                    xcb_glx_context_tag_t  context_tag  /**< */,
3431                    int32_t                range  /**< */)
3432 {
3433     static const xcb_protocol_request_t xcb_req = {
3434         /* count */ 2,
3435         /* ext */ &xcb_glx_id,
3436         /* opcode */ XCB_GLX_GEN_LISTS,
3437         /* isvoid */ 0
3438     };
3439 
3440     struct iovec xcb_parts[4];
3441     xcb_glx_gen_lists_cookie_t xcb_ret;
3442     xcb_glx_gen_lists_request_t xcb_out;
3443 
3444     xcb_out.context_tag = context_tag;
3445     xcb_out.range = range;
3446 
3447     xcb_parts[2].iov_base = (char *) &xcb_out;
3448     xcb_parts[2].iov_len = sizeof(xcb_out);
3449     xcb_parts[3].iov_base = 0;
3450     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3451 
3452     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3453     return xcb_ret;
3454 }
3455 
3456 xcb_glx_gen_lists_cookie_t
xcb_glx_gen_lists_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t range)3457 xcb_glx_gen_lists_unchecked (xcb_connection_t      *c  /**< */,
3458                              xcb_glx_context_tag_t  context_tag  /**< */,
3459                              int32_t                range  /**< */)
3460 {
3461     static const xcb_protocol_request_t xcb_req = {
3462         /* count */ 2,
3463         /* ext */ &xcb_glx_id,
3464         /* opcode */ XCB_GLX_GEN_LISTS,
3465         /* isvoid */ 0
3466     };
3467 
3468     struct iovec xcb_parts[4];
3469     xcb_glx_gen_lists_cookie_t xcb_ret;
3470     xcb_glx_gen_lists_request_t xcb_out;
3471 
3472     xcb_out.context_tag = context_tag;
3473     xcb_out.range = range;
3474 
3475     xcb_parts[2].iov_base = (char *) &xcb_out;
3476     xcb_parts[2].iov_len = sizeof(xcb_out);
3477     xcb_parts[3].iov_base = 0;
3478     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3479 
3480     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3481     return xcb_ret;
3482 }
3483 
3484 xcb_glx_gen_lists_reply_t *
xcb_glx_gen_lists_reply(xcb_connection_t * c,xcb_glx_gen_lists_cookie_t cookie,xcb_generic_error_t ** e)3485 xcb_glx_gen_lists_reply (xcb_connection_t            *c  /**< */,
3486                          xcb_glx_gen_lists_cookie_t   cookie  /**< */,
3487                          xcb_generic_error_t        **e  /**< */)
3488 {
3489     return (xcb_glx_gen_lists_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3490 }
3491 
3492 xcb_void_cookie_t
xcb_glx_feedback_buffer_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t size,int32_t type)3493 xcb_glx_feedback_buffer_checked (xcb_connection_t      *c  /**< */,
3494                                  xcb_glx_context_tag_t  context_tag  /**< */,
3495                                  int32_t                size  /**< */,
3496                                  int32_t                type  /**< */)
3497 {
3498     static const xcb_protocol_request_t xcb_req = {
3499         /* count */ 2,
3500         /* ext */ &xcb_glx_id,
3501         /* opcode */ XCB_GLX_FEEDBACK_BUFFER,
3502         /* isvoid */ 1
3503     };
3504 
3505     struct iovec xcb_parts[4];
3506     xcb_void_cookie_t xcb_ret;
3507     xcb_glx_feedback_buffer_request_t xcb_out;
3508 
3509     xcb_out.context_tag = context_tag;
3510     xcb_out.size = size;
3511     xcb_out.type = type;
3512 
3513     xcb_parts[2].iov_base = (char *) &xcb_out;
3514     xcb_parts[2].iov_len = sizeof(xcb_out);
3515     xcb_parts[3].iov_base = 0;
3516     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3517 
3518     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3519     return xcb_ret;
3520 }
3521 
3522 xcb_void_cookie_t
xcb_glx_feedback_buffer(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t size,int32_t type)3523 xcb_glx_feedback_buffer (xcb_connection_t      *c  /**< */,
3524                          xcb_glx_context_tag_t  context_tag  /**< */,
3525                          int32_t                size  /**< */,
3526                          int32_t                type  /**< */)
3527 {
3528     static const xcb_protocol_request_t xcb_req = {
3529         /* count */ 2,
3530         /* ext */ &xcb_glx_id,
3531         /* opcode */ XCB_GLX_FEEDBACK_BUFFER,
3532         /* isvoid */ 1
3533     };
3534 
3535     struct iovec xcb_parts[4];
3536     xcb_void_cookie_t xcb_ret;
3537     xcb_glx_feedback_buffer_request_t xcb_out;
3538 
3539     xcb_out.context_tag = context_tag;
3540     xcb_out.size = size;
3541     xcb_out.type = type;
3542 
3543     xcb_parts[2].iov_base = (char *) &xcb_out;
3544     xcb_parts[2].iov_len = sizeof(xcb_out);
3545     xcb_parts[3].iov_base = 0;
3546     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3547 
3548     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3549     return xcb_ret;
3550 }
3551 
3552 xcb_void_cookie_t
xcb_glx_select_buffer_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t size)3553 xcb_glx_select_buffer_checked (xcb_connection_t      *c  /**< */,
3554                                xcb_glx_context_tag_t  context_tag  /**< */,
3555                                int32_t                size  /**< */)
3556 {
3557     static const xcb_protocol_request_t xcb_req = {
3558         /* count */ 2,
3559         /* ext */ &xcb_glx_id,
3560         /* opcode */ XCB_GLX_SELECT_BUFFER,
3561         /* isvoid */ 1
3562     };
3563 
3564     struct iovec xcb_parts[4];
3565     xcb_void_cookie_t xcb_ret;
3566     xcb_glx_select_buffer_request_t xcb_out;
3567 
3568     xcb_out.context_tag = context_tag;
3569     xcb_out.size = size;
3570 
3571     xcb_parts[2].iov_base = (char *) &xcb_out;
3572     xcb_parts[2].iov_len = sizeof(xcb_out);
3573     xcb_parts[3].iov_base = 0;
3574     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3575 
3576     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3577     return xcb_ret;
3578 }
3579 
3580 xcb_void_cookie_t
xcb_glx_select_buffer(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t size)3581 xcb_glx_select_buffer (xcb_connection_t      *c  /**< */,
3582                        xcb_glx_context_tag_t  context_tag  /**< */,
3583                        int32_t                size  /**< */)
3584 {
3585     static const xcb_protocol_request_t xcb_req = {
3586         /* count */ 2,
3587         /* ext */ &xcb_glx_id,
3588         /* opcode */ XCB_GLX_SELECT_BUFFER,
3589         /* isvoid */ 1
3590     };
3591 
3592     struct iovec xcb_parts[4];
3593     xcb_void_cookie_t xcb_ret;
3594     xcb_glx_select_buffer_request_t xcb_out;
3595 
3596     xcb_out.context_tag = context_tag;
3597     xcb_out.size = size;
3598 
3599     xcb_parts[2].iov_base = (char *) &xcb_out;
3600     xcb_parts[2].iov_len = sizeof(xcb_out);
3601     xcb_parts[3].iov_base = 0;
3602     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3603 
3604     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3605     return xcb_ret;
3606 }
3607 
3608 int
xcb_glx_render_mode_sizeof(const void * _buffer)3609 xcb_glx_render_mode_sizeof (const void  *_buffer  /**< */)
3610 {
3611     char *xcb_tmp = (char *)_buffer;
3612     const xcb_glx_render_mode_reply_t *_aux = (xcb_glx_render_mode_reply_t *)_buffer;
3613     unsigned int xcb_buffer_len = 0;
3614     unsigned int xcb_block_len = 0;
3615     unsigned int xcb_pad = 0;
3616     unsigned int xcb_align_to = 0;
3617 
3618 
3619     xcb_block_len += sizeof(xcb_glx_render_mode_reply_t);
3620     xcb_tmp += xcb_block_len;
3621     xcb_buffer_len += xcb_block_len;
3622     xcb_block_len = 0;
3623     /* data */
3624     xcb_block_len += _aux->n * sizeof(uint32_t);
3625     xcb_tmp += xcb_block_len;
3626     xcb_align_to = ALIGNOF(uint32_t);
3627     /* insert padding */
3628     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3629     xcb_buffer_len += xcb_block_len + xcb_pad;
3630     if (0 != xcb_pad) {
3631         xcb_tmp += xcb_pad;
3632         xcb_pad = 0;
3633     }
3634     xcb_block_len = 0;
3635 
3636     return xcb_buffer_len;
3637 }
3638 
3639 xcb_glx_render_mode_cookie_t
xcb_glx_render_mode(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t mode)3640 xcb_glx_render_mode (xcb_connection_t      *c  /**< */,
3641                      xcb_glx_context_tag_t  context_tag  /**< */,
3642                      uint32_t               mode  /**< */)
3643 {
3644     static const xcb_protocol_request_t xcb_req = {
3645         /* count */ 2,
3646         /* ext */ &xcb_glx_id,
3647         /* opcode */ XCB_GLX_RENDER_MODE,
3648         /* isvoid */ 0
3649     };
3650 
3651     struct iovec xcb_parts[4];
3652     xcb_glx_render_mode_cookie_t xcb_ret;
3653     xcb_glx_render_mode_request_t xcb_out;
3654 
3655     xcb_out.context_tag = context_tag;
3656     xcb_out.mode = mode;
3657 
3658     xcb_parts[2].iov_base = (char *) &xcb_out;
3659     xcb_parts[2].iov_len = sizeof(xcb_out);
3660     xcb_parts[3].iov_base = 0;
3661     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3662 
3663     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3664     return xcb_ret;
3665 }
3666 
3667 xcb_glx_render_mode_cookie_t
xcb_glx_render_mode_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t mode)3668 xcb_glx_render_mode_unchecked (xcb_connection_t      *c  /**< */,
3669                                xcb_glx_context_tag_t  context_tag  /**< */,
3670                                uint32_t               mode  /**< */)
3671 {
3672     static const xcb_protocol_request_t xcb_req = {
3673         /* count */ 2,
3674         /* ext */ &xcb_glx_id,
3675         /* opcode */ XCB_GLX_RENDER_MODE,
3676         /* isvoid */ 0
3677     };
3678 
3679     struct iovec xcb_parts[4];
3680     xcb_glx_render_mode_cookie_t xcb_ret;
3681     xcb_glx_render_mode_request_t xcb_out;
3682 
3683     xcb_out.context_tag = context_tag;
3684     xcb_out.mode = mode;
3685 
3686     xcb_parts[2].iov_base = (char *) &xcb_out;
3687     xcb_parts[2].iov_len = sizeof(xcb_out);
3688     xcb_parts[3].iov_base = 0;
3689     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3690 
3691     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3692     return xcb_ret;
3693 }
3694 
3695 uint32_t *
xcb_glx_render_mode_data(const xcb_glx_render_mode_reply_t * R)3696 xcb_glx_render_mode_data (const xcb_glx_render_mode_reply_t *R  /**< */)
3697 {
3698     return (uint32_t *) (R + 1);
3699 }
3700 
3701 int
xcb_glx_render_mode_data_length(const xcb_glx_render_mode_reply_t * R)3702 xcb_glx_render_mode_data_length (const xcb_glx_render_mode_reply_t *R  /**< */)
3703 {
3704     return R->n;
3705 }
3706 
3707 xcb_generic_iterator_t
xcb_glx_render_mode_data_end(const xcb_glx_render_mode_reply_t * R)3708 xcb_glx_render_mode_data_end (const xcb_glx_render_mode_reply_t *R  /**< */)
3709 {
3710     xcb_generic_iterator_t i;
3711     i.data = ((uint32_t *) (R + 1)) + (R->n);
3712     i.rem = 0;
3713     i.index = (char *) i.data - (char *) R;
3714     return i;
3715 }
3716 
3717 xcb_glx_render_mode_reply_t *
xcb_glx_render_mode_reply(xcb_connection_t * c,xcb_glx_render_mode_cookie_t cookie,xcb_generic_error_t ** e)3718 xcb_glx_render_mode_reply (xcb_connection_t              *c  /**< */,
3719                            xcb_glx_render_mode_cookie_t   cookie  /**< */,
3720                            xcb_generic_error_t          **e  /**< */)
3721 {
3722     return (xcb_glx_render_mode_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3723 }
3724 
3725 xcb_glx_finish_cookie_t
xcb_glx_finish(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)3726 xcb_glx_finish (xcb_connection_t      *c  /**< */,
3727                 xcb_glx_context_tag_t  context_tag  /**< */)
3728 {
3729     static const xcb_protocol_request_t xcb_req = {
3730         /* count */ 2,
3731         /* ext */ &xcb_glx_id,
3732         /* opcode */ XCB_GLX_FINISH,
3733         /* isvoid */ 0
3734     };
3735 
3736     struct iovec xcb_parts[4];
3737     xcb_glx_finish_cookie_t xcb_ret;
3738     xcb_glx_finish_request_t xcb_out;
3739 
3740     xcb_out.context_tag = context_tag;
3741 
3742     xcb_parts[2].iov_base = (char *) &xcb_out;
3743     xcb_parts[2].iov_len = sizeof(xcb_out);
3744     xcb_parts[3].iov_base = 0;
3745     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3746 
3747     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3748     return xcb_ret;
3749 }
3750 
3751 xcb_glx_finish_cookie_t
xcb_glx_finish_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)3752 xcb_glx_finish_unchecked (xcb_connection_t      *c  /**< */,
3753                           xcb_glx_context_tag_t  context_tag  /**< */)
3754 {
3755     static const xcb_protocol_request_t xcb_req = {
3756         /* count */ 2,
3757         /* ext */ &xcb_glx_id,
3758         /* opcode */ XCB_GLX_FINISH,
3759         /* isvoid */ 0
3760     };
3761 
3762     struct iovec xcb_parts[4];
3763     xcb_glx_finish_cookie_t xcb_ret;
3764     xcb_glx_finish_request_t xcb_out;
3765 
3766     xcb_out.context_tag = context_tag;
3767 
3768     xcb_parts[2].iov_base = (char *) &xcb_out;
3769     xcb_parts[2].iov_len = sizeof(xcb_out);
3770     xcb_parts[3].iov_base = 0;
3771     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3772 
3773     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3774     return xcb_ret;
3775 }
3776 
3777 xcb_glx_finish_reply_t *
xcb_glx_finish_reply(xcb_connection_t * c,xcb_glx_finish_cookie_t cookie,xcb_generic_error_t ** e)3778 xcb_glx_finish_reply (xcb_connection_t         *c  /**< */,
3779                       xcb_glx_finish_cookie_t   cookie  /**< */,
3780                       xcb_generic_error_t     **e  /**< */)
3781 {
3782     return (xcb_glx_finish_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
3783 }
3784 
3785 xcb_void_cookie_t
xcb_glx_pixel_storef_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname,xcb_glx_float32_t datum)3786 xcb_glx_pixel_storef_checked (xcb_connection_t      *c  /**< */,
3787                               xcb_glx_context_tag_t  context_tag  /**< */,
3788                               uint32_t               pname  /**< */,
3789                               xcb_glx_float32_t      datum  /**< */)
3790 {
3791     static const xcb_protocol_request_t xcb_req = {
3792         /* count */ 2,
3793         /* ext */ &xcb_glx_id,
3794         /* opcode */ XCB_GLX_PIXEL_STOREF,
3795         /* isvoid */ 1
3796     };
3797 
3798     struct iovec xcb_parts[4];
3799     xcb_void_cookie_t xcb_ret;
3800     xcb_glx_pixel_storef_request_t xcb_out;
3801 
3802     xcb_out.context_tag = context_tag;
3803     xcb_out.pname = pname;
3804     xcb_out.datum = datum;
3805 
3806     xcb_parts[2].iov_base = (char *) &xcb_out;
3807     xcb_parts[2].iov_len = sizeof(xcb_out);
3808     xcb_parts[3].iov_base = 0;
3809     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3810 
3811     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3812     return xcb_ret;
3813 }
3814 
3815 xcb_void_cookie_t
xcb_glx_pixel_storef(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname,xcb_glx_float32_t datum)3816 xcb_glx_pixel_storef (xcb_connection_t      *c  /**< */,
3817                       xcb_glx_context_tag_t  context_tag  /**< */,
3818                       uint32_t               pname  /**< */,
3819                       xcb_glx_float32_t      datum  /**< */)
3820 {
3821     static const xcb_protocol_request_t xcb_req = {
3822         /* count */ 2,
3823         /* ext */ &xcb_glx_id,
3824         /* opcode */ XCB_GLX_PIXEL_STOREF,
3825         /* isvoid */ 1
3826     };
3827 
3828     struct iovec xcb_parts[4];
3829     xcb_void_cookie_t xcb_ret;
3830     xcb_glx_pixel_storef_request_t xcb_out;
3831 
3832     xcb_out.context_tag = context_tag;
3833     xcb_out.pname = pname;
3834     xcb_out.datum = datum;
3835 
3836     xcb_parts[2].iov_base = (char *) &xcb_out;
3837     xcb_parts[2].iov_len = sizeof(xcb_out);
3838     xcb_parts[3].iov_base = 0;
3839     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3840 
3841     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3842     return xcb_ret;
3843 }
3844 
3845 xcb_void_cookie_t
xcb_glx_pixel_storei_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname,int32_t datum)3846 xcb_glx_pixel_storei_checked (xcb_connection_t      *c  /**< */,
3847                               xcb_glx_context_tag_t  context_tag  /**< */,
3848                               uint32_t               pname  /**< */,
3849                               int32_t                datum  /**< */)
3850 {
3851     static const xcb_protocol_request_t xcb_req = {
3852         /* count */ 2,
3853         /* ext */ &xcb_glx_id,
3854         /* opcode */ XCB_GLX_PIXEL_STOREI,
3855         /* isvoid */ 1
3856     };
3857 
3858     struct iovec xcb_parts[4];
3859     xcb_void_cookie_t xcb_ret;
3860     xcb_glx_pixel_storei_request_t xcb_out;
3861 
3862     xcb_out.context_tag = context_tag;
3863     xcb_out.pname = pname;
3864     xcb_out.datum = datum;
3865 
3866     xcb_parts[2].iov_base = (char *) &xcb_out;
3867     xcb_parts[2].iov_len = sizeof(xcb_out);
3868     xcb_parts[3].iov_base = 0;
3869     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3870 
3871     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3872     return xcb_ret;
3873 }
3874 
3875 xcb_void_cookie_t
xcb_glx_pixel_storei(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname,int32_t datum)3876 xcb_glx_pixel_storei (xcb_connection_t      *c  /**< */,
3877                       xcb_glx_context_tag_t  context_tag  /**< */,
3878                       uint32_t               pname  /**< */,
3879                       int32_t                datum  /**< */)
3880 {
3881     static const xcb_protocol_request_t xcb_req = {
3882         /* count */ 2,
3883         /* ext */ &xcb_glx_id,
3884         /* opcode */ XCB_GLX_PIXEL_STOREI,
3885         /* isvoid */ 1
3886     };
3887 
3888     struct iovec xcb_parts[4];
3889     xcb_void_cookie_t xcb_ret;
3890     xcb_glx_pixel_storei_request_t xcb_out;
3891 
3892     xcb_out.context_tag = context_tag;
3893     xcb_out.pname = pname;
3894     xcb_out.datum = datum;
3895 
3896     xcb_parts[2].iov_base = (char *) &xcb_out;
3897     xcb_parts[2].iov_len = sizeof(xcb_out);
3898     xcb_parts[3].iov_base = 0;
3899     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3900 
3901     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
3902     return xcb_ret;
3903 }
3904 
3905 int
xcb_glx_read_pixels_sizeof(const void * _buffer)3906 xcb_glx_read_pixels_sizeof (const void  *_buffer  /**< */)
3907 {
3908     char *xcb_tmp = (char *)_buffer;
3909     const xcb_glx_read_pixels_reply_t *_aux = (xcb_glx_read_pixels_reply_t *)_buffer;
3910     unsigned int xcb_buffer_len = 0;
3911     unsigned int xcb_block_len = 0;
3912     unsigned int xcb_pad = 0;
3913     unsigned int xcb_align_to = 0;
3914 
3915 
3916     xcb_block_len += sizeof(xcb_glx_read_pixels_reply_t);
3917     xcb_tmp += xcb_block_len;
3918     xcb_buffer_len += xcb_block_len;
3919     xcb_block_len = 0;
3920     /* data */
3921     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
3922     xcb_tmp += xcb_block_len;
3923     xcb_align_to = ALIGNOF(uint8_t);
3924     /* insert padding */
3925     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
3926     xcb_buffer_len += xcb_block_len + xcb_pad;
3927     if (0 != xcb_pad) {
3928         xcb_tmp += xcb_pad;
3929         xcb_pad = 0;
3930     }
3931     xcb_block_len = 0;
3932 
3933     return xcb_buffer_len;
3934 }
3935 
3936 xcb_glx_read_pixels_cookie_t
xcb_glx_read_pixels(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t x,int32_t y,int32_t width,int32_t height,uint32_t format,uint32_t type,uint8_t swap_bytes,uint8_t lsb_first)3937 xcb_glx_read_pixels (xcb_connection_t      *c  /**< */,
3938                      xcb_glx_context_tag_t  context_tag  /**< */,
3939                      int32_t                x  /**< */,
3940                      int32_t                y  /**< */,
3941                      int32_t                width  /**< */,
3942                      int32_t                height  /**< */,
3943                      uint32_t               format  /**< */,
3944                      uint32_t               type  /**< */,
3945                      uint8_t                swap_bytes  /**< */,
3946                      uint8_t                lsb_first  /**< */)
3947 {
3948     static const xcb_protocol_request_t xcb_req = {
3949         /* count */ 2,
3950         /* ext */ &xcb_glx_id,
3951         /* opcode */ XCB_GLX_READ_PIXELS,
3952         /* isvoid */ 0
3953     };
3954 
3955     struct iovec xcb_parts[4];
3956     xcb_glx_read_pixels_cookie_t xcb_ret;
3957     xcb_glx_read_pixels_request_t xcb_out;
3958 
3959     xcb_out.context_tag = context_tag;
3960     xcb_out.x = x;
3961     xcb_out.y = y;
3962     xcb_out.width = width;
3963     xcb_out.height = height;
3964     xcb_out.format = format;
3965     xcb_out.type = type;
3966     xcb_out.swap_bytes = swap_bytes;
3967     xcb_out.lsb_first = lsb_first;
3968 
3969     xcb_parts[2].iov_base = (char *) &xcb_out;
3970     xcb_parts[2].iov_len = sizeof(xcb_out);
3971     xcb_parts[3].iov_base = 0;
3972     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
3973 
3974     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
3975     return xcb_ret;
3976 }
3977 
3978 xcb_glx_read_pixels_cookie_t
xcb_glx_read_pixels_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t x,int32_t y,int32_t width,int32_t height,uint32_t format,uint32_t type,uint8_t swap_bytes,uint8_t lsb_first)3979 xcb_glx_read_pixels_unchecked (xcb_connection_t      *c  /**< */,
3980                                xcb_glx_context_tag_t  context_tag  /**< */,
3981                                int32_t                x  /**< */,
3982                                int32_t                y  /**< */,
3983                                int32_t                width  /**< */,
3984                                int32_t                height  /**< */,
3985                                uint32_t               format  /**< */,
3986                                uint32_t               type  /**< */,
3987                                uint8_t                swap_bytes  /**< */,
3988                                uint8_t                lsb_first  /**< */)
3989 {
3990     static const xcb_protocol_request_t xcb_req = {
3991         /* count */ 2,
3992         /* ext */ &xcb_glx_id,
3993         /* opcode */ XCB_GLX_READ_PIXELS,
3994         /* isvoid */ 0
3995     };
3996 
3997     struct iovec xcb_parts[4];
3998     xcb_glx_read_pixels_cookie_t xcb_ret;
3999     xcb_glx_read_pixels_request_t xcb_out;
4000 
4001     xcb_out.context_tag = context_tag;
4002     xcb_out.x = x;
4003     xcb_out.y = y;
4004     xcb_out.width = width;
4005     xcb_out.height = height;
4006     xcb_out.format = format;
4007     xcb_out.type = type;
4008     xcb_out.swap_bytes = swap_bytes;
4009     xcb_out.lsb_first = lsb_first;
4010 
4011     xcb_parts[2].iov_base = (char *) &xcb_out;
4012     xcb_parts[2].iov_len = sizeof(xcb_out);
4013     xcb_parts[3].iov_base = 0;
4014     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4015 
4016     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4017     return xcb_ret;
4018 }
4019 
4020 uint8_t *
xcb_glx_read_pixels_data(const xcb_glx_read_pixels_reply_t * R)4021 xcb_glx_read_pixels_data (const xcb_glx_read_pixels_reply_t *R  /**< */)
4022 {
4023     return (uint8_t *) (R + 1);
4024 }
4025 
4026 int
xcb_glx_read_pixels_data_length(const xcb_glx_read_pixels_reply_t * R)4027 xcb_glx_read_pixels_data_length (const xcb_glx_read_pixels_reply_t *R  /**< */)
4028 {
4029     return (R->length * 4);
4030 }
4031 
4032 xcb_generic_iterator_t
xcb_glx_read_pixels_data_end(const xcb_glx_read_pixels_reply_t * R)4033 xcb_glx_read_pixels_data_end (const xcb_glx_read_pixels_reply_t *R  /**< */)
4034 {
4035     xcb_generic_iterator_t i;
4036     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
4037     i.rem = 0;
4038     i.index = (char *) i.data - (char *) R;
4039     return i;
4040 }
4041 
4042 xcb_glx_read_pixels_reply_t *
xcb_glx_read_pixels_reply(xcb_connection_t * c,xcb_glx_read_pixels_cookie_t cookie,xcb_generic_error_t ** e)4043 xcb_glx_read_pixels_reply (xcb_connection_t              *c  /**< */,
4044                            xcb_glx_read_pixels_cookie_t   cookie  /**< */,
4045                            xcb_generic_error_t          **e  /**< */)
4046 {
4047     return (xcb_glx_read_pixels_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4048 }
4049 
4050 int
xcb_glx_get_booleanv_sizeof(const void * _buffer)4051 xcb_glx_get_booleanv_sizeof (const void  *_buffer  /**< */)
4052 {
4053     char *xcb_tmp = (char *)_buffer;
4054     const xcb_glx_get_booleanv_reply_t *_aux = (xcb_glx_get_booleanv_reply_t *)_buffer;
4055     unsigned int xcb_buffer_len = 0;
4056     unsigned int xcb_block_len = 0;
4057     unsigned int xcb_pad = 0;
4058     unsigned int xcb_align_to = 0;
4059 
4060 
4061     xcb_block_len += sizeof(xcb_glx_get_booleanv_reply_t);
4062     xcb_tmp += xcb_block_len;
4063     xcb_buffer_len += xcb_block_len;
4064     xcb_block_len = 0;
4065     /* data */
4066     xcb_block_len += _aux->n * sizeof(uint8_t);
4067     xcb_tmp += xcb_block_len;
4068     xcb_align_to = ALIGNOF(uint8_t);
4069     /* insert padding */
4070     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4071     xcb_buffer_len += xcb_block_len + xcb_pad;
4072     if (0 != xcb_pad) {
4073         xcb_tmp += xcb_pad;
4074         xcb_pad = 0;
4075     }
4076     xcb_block_len = 0;
4077 
4078     return xcb_buffer_len;
4079 }
4080 
4081 xcb_glx_get_booleanv_cookie_t
xcb_glx_get_booleanv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t pname)4082 xcb_glx_get_booleanv (xcb_connection_t      *c  /**< */,
4083                       xcb_glx_context_tag_t  context_tag  /**< */,
4084                       int32_t                pname  /**< */)
4085 {
4086     static const xcb_protocol_request_t xcb_req = {
4087         /* count */ 2,
4088         /* ext */ &xcb_glx_id,
4089         /* opcode */ XCB_GLX_GET_BOOLEANV,
4090         /* isvoid */ 0
4091     };
4092 
4093     struct iovec xcb_parts[4];
4094     xcb_glx_get_booleanv_cookie_t xcb_ret;
4095     xcb_glx_get_booleanv_request_t xcb_out;
4096 
4097     xcb_out.context_tag = context_tag;
4098     xcb_out.pname = pname;
4099 
4100     xcb_parts[2].iov_base = (char *) &xcb_out;
4101     xcb_parts[2].iov_len = sizeof(xcb_out);
4102     xcb_parts[3].iov_base = 0;
4103     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4104 
4105     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4106     return xcb_ret;
4107 }
4108 
4109 xcb_glx_get_booleanv_cookie_t
xcb_glx_get_booleanv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t pname)4110 xcb_glx_get_booleanv_unchecked (xcb_connection_t      *c  /**< */,
4111                                 xcb_glx_context_tag_t  context_tag  /**< */,
4112                                 int32_t                pname  /**< */)
4113 {
4114     static const xcb_protocol_request_t xcb_req = {
4115         /* count */ 2,
4116         /* ext */ &xcb_glx_id,
4117         /* opcode */ XCB_GLX_GET_BOOLEANV,
4118         /* isvoid */ 0
4119     };
4120 
4121     struct iovec xcb_parts[4];
4122     xcb_glx_get_booleanv_cookie_t xcb_ret;
4123     xcb_glx_get_booleanv_request_t xcb_out;
4124 
4125     xcb_out.context_tag = context_tag;
4126     xcb_out.pname = pname;
4127 
4128     xcb_parts[2].iov_base = (char *) &xcb_out;
4129     xcb_parts[2].iov_len = sizeof(xcb_out);
4130     xcb_parts[3].iov_base = 0;
4131     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4132 
4133     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4134     return xcb_ret;
4135 }
4136 
4137 uint8_t *
xcb_glx_get_booleanv_data(const xcb_glx_get_booleanv_reply_t * R)4138 xcb_glx_get_booleanv_data (const xcb_glx_get_booleanv_reply_t *R  /**< */)
4139 {
4140     return (uint8_t *) (R + 1);
4141 }
4142 
4143 int
xcb_glx_get_booleanv_data_length(const xcb_glx_get_booleanv_reply_t * R)4144 xcb_glx_get_booleanv_data_length (const xcb_glx_get_booleanv_reply_t *R  /**< */)
4145 {
4146     return R->n;
4147 }
4148 
4149 xcb_generic_iterator_t
xcb_glx_get_booleanv_data_end(const xcb_glx_get_booleanv_reply_t * R)4150 xcb_glx_get_booleanv_data_end (const xcb_glx_get_booleanv_reply_t *R  /**< */)
4151 {
4152     xcb_generic_iterator_t i;
4153     i.data = ((uint8_t *) (R + 1)) + (R->n);
4154     i.rem = 0;
4155     i.index = (char *) i.data - (char *) R;
4156     return i;
4157 }
4158 
4159 xcb_glx_get_booleanv_reply_t *
xcb_glx_get_booleanv_reply(xcb_connection_t * c,xcb_glx_get_booleanv_cookie_t cookie,xcb_generic_error_t ** e)4160 xcb_glx_get_booleanv_reply (xcb_connection_t               *c  /**< */,
4161                             xcb_glx_get_booleanv_cookie_t   cookie  /**< */,
4162                             xcb_generic_error_t           **e  /**< */)
4163 {
4164     return (xcb_glx_get_booleanv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4165 }
4166 
4167 int
xcb_glx_get_clip_plane_sizeof(const void * _buffer)4168 xcb_glx_get_clip_plane_sizeof (const void  *_buffer  /**< */)
4169 {
4170     char *xcb_tmp = (char *)_buffer;
4171     const xcb_glx_get_clip_plane_reply_t *_aux = (xcb_glx_get_clip_plane_reply_t *)_buffer;
4172     unsigned int xcb_buffer_len = 0;
4173     unsigned int xcb_block_len = 0;
4174     unsigned int xcb_pad = 0;
4175     unsigned int xcb_align_to = 0;
4176 
4177 
4178     xcb_block_len += sizeof(xcb_glx_get_clip_plane_reply_t);
4179     xcb_tmp += xcb_block_len;
4180     xcb_buffer_len += xcb_block_len;
4181     xcb_block_len = 0;
4182     /* data */
4183     xcb_block_len += (_aux->length / 2) * sizeof(xcb_glx_float64_t);
4184     xcb_tmp += xcb_block_len;
4185     xcb_align_to = ALIGNOF(xcb_glx_float64_t);
4186     /* insert padding */
4187     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4188     xcb_buffer_len += xcb_block_len + xcb_pad;
4189     if (0 != xcb_pad) {
4190         xcb_tmp += xcb_pad;
4191         xcb_pad = 0;
4192     }
4193     xcb_block_len = 0;
4194 
4195     return xcb_buffer_len;
4196 }
4197 
4198 xcb_glx_get_clip_plane_cookie_t
xcb_glx_get_clip_plane(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t plane)4199 xcb_glx_get_clip_plane (xcb_connection_t      *c  /**< */,
4200                         xcb_glx_context_tag_t  context_tag  /**< */,
4201                         int32_t                plane  /**< */)
4202 {
4203     static const xcb_protocol_request_t xcb_req = {
4204         /* count */ 2,
4205         /* ext */ &xcb_glx_id,
4206         /* opcode */ XCB_GLX_GET_CLIP_PLANE,
4207         /* isvoid */ 0
4208     };
4209 
4210     struct iovec xcb_parts[4];
4211     xcb_glx_get_clip_plane_cookie_t xcb_ret;
4212     xcb_glx_get_clip_plane_request_t xcb_out;
4213 
4214     xcb_out.context_tag = context_tag;
4215     xcb_out.plane = plane;
4216 
4217     xcb_parts[2].iov_base = (char *) &xcb_out;
4218     xcb_parts[2].iov_len = sizeof(xcb_out);
4219     xcb_parts[3].iov_base = 0;
4220     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4221 
4222     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4223     return xcb_ret;
4224 }
4225 
4226 xcb_glx_get_clip_plane_cookie_t
xcb_glx_get_clip_plane_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t plane)4227 xcb_glx_get_clip_plane_unchecked (xcb_connection_t      *c  /**< */,
4228                                   xcb_glx_context_tag_t  context_tag  /**< */,
4229                                   int32_t                plane  /**< */)
4230 {
4231     static const xcb_protocol_request_t xcb_req = {
4232         /* count */ 2,
4233         /* ext */ &xcb_glx_id,
4234         /* opcode */ XCB_GLX_GET_CLIP_PLANE,
4235         /* isvoid */ 0
4236     };
4237 
4238     struct iovec xcb_parts[4];
4239     xcb_glx_get_clip_plane_cookie_t xcb_ret;
4240     xcb_glx_get_clip_plane_request_t xcb_out;
4241 
4242     xcb_out.context_tag = context_tag;
4243     xcb_out.plane = plane;
4244 
4245     xcb_parts[2].iov_base = (char *) &xcb_out;
4246     xcb_parts[2].iov_len = sizeof(xcb_out);
4247     xcb_parts[3].iov_base = 0;
4248     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4249 
4250     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4251     return xcb_ret;
4252 }
4253 
4254 xcb_glx_float64_t *
xcb_glx_get_clip_plane_data(const xcb_glx_get_clip_plane_reply_t * R)4255 xcb_glx_get_clip_plane_data (const xcb_glx_get_clip_plane_reply_t *R  /**< */)
4256 {
4257     return (xcb_glx_float64_t *) (R + 1);
4258 }
4259 
4260 int
xcb_glx_get_clip_plane_data_length(const xcb_glx_get_clip_plane_reply_t * R)4261 xcb_glx_get_clip_plane_data_length (const xcb_glx_get_clip_plane_reply_t *R  /**< */)
4262 {
4263     return (R->length / 2);
4264 }
4265 
4266 xcb_generic_iterator_t
xcb_glx_get_clip_plane_data_end(const xcb_glx_get_clip_plane_reply_t * R)4267 xcb_glx_get_clip_plane_data_end (const xcb_glx_get_clip_plane_reply_t *R  /**< */)
4268 {
4269     xcb_generic_iterator_t i;
4270     i.data = ((xcb_glx_float64_t *) (R + 1)) + ((R->length / 2));
4271     i.rem = 0;
4272     i.index = (char *) i.data - (char *) R;
4273     return i;
4274 }
4275 
4276 xcb_glx_get_clip_plane_reply_t *
xcb_glx_get_clip_plane_reply(xcb_connection_t * c,xcb_glx_get_clip_plane_cookie_t cookie,xcb_generic_error_t ** e)4277 xcb_glx_get_clip_plane_reply (xcb_connection_t                 *c  /**< */,
4278                               xcb_glx_get_clip_plane_cookie_t   cookie  /**< */,
4279                               xcb_generic_error_t             **e  /**< */)
4280 {
4281     return (xcb_glx_get_clip_plane_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4282 }
4283 
4284 int
xcb_glx_get_doublev_sizeof(const void * _buffer)4285 xcb_glx_get_doublev_sizeof (const void  *_buffer  /**< */)
4286 {
4287     char *xcb_tmp = (char *)_buffer;
4288     const xcb_glx_get_doublev_reply_t *_aux = (xcb_glx_get_doublev_reply_t *)_buffer;
4289     unsigned int xcb_buffer_len = 0;
4290     unsigned int xcb_block_len = 0;
4291     unsigned int xcb_pad = 0;
4292     unsigned int xcb_align_to = 0;
4293 
4294 
4295     xcb_block_len += sizeof(xcb_glx_get_doublev_reply_t);
4296     xcb_tmp += xcb_block_len;
4297     xcb_buffer_len += xcb_block_len;
4298     xcb_block_len = 0;
4299     /* data */
4300     xcb_block_len += _aux->n * sizeof(xcb_glx_float64_t);
4301     xcb_tmp += xcb_block_len;
4302     xcb_align_to = ALIGNOF(xcb_glx_float64_t);
4303     /* insert padding */
4304     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4305     xcb_buffer_len += xcb_block_len + xcb_pad;
4306     if (0 != xcb_pad) {
4307         xcb_tmp += xcb_pad;
4308         xcb_pad = 0;
4309     }
4310     xcb_block_len = 0;
4311 
4312     return xcb_buffer_len;
4313 }
4314 
4315 xcb_glx_get_doublev_cookie_t
xcb_glx_get_doublev(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname)4316 xcb_glx_get_doublev (xcb_connection_t      *c  /**< */,
4317                      xcb_glx_context_tag_t  context_tag  /**< */,
4318                      uint32_t               pname  /**< */)
4319 {
4320     static const xcb_protocol_request_t xcb_req = {
4321         /* count */ 2,
4322         /* ext */ &xcb_glx_id,
4323         /* opcode */ XCB_GLX_GET_DOUBLEV,
4324         /* isvoid */ 0
4325     };
4326 
4327     struct iovec xcb_parts[4];
4328     xcb_glx_get_doublev_cookie_t xcb_ret;
4329     xcb_glx_get_doublev_request_t xcb_out;
4330 
4331     xcb_out.context_tag = context_tag;
4332     xcb_out.pname = pname;
4333 
4334     xcb_parts[2].iov_base = (char *) &xcb_out;
4335     xcb_parts[2].iov_len = sizeof(xcb_out);
4336     xcb_parts[3].iov_base = 0;
4337     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4338 
4339     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4340     return xcb_ret;
4341 }
4342 
4343 xcb_glx_get_doublev_cookie_t
xcb_glx_get_doublev_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname)4344 xcb_glx_get_doublev_unchecked (xcb_connection_t      *c  /**< */,
4345                                xcb_glx_context_tag_t  context_tag  /**< */,
4346                                uint32_t               pname  /**< */)
4347 {
4348     static const xcb_protocol_request_t xcb_req = {
4349         /* count */ 2,
4350         /* ext */ &xcb_glx_id,
4351         /* opcode */ XCB_GLX_GET_DOUBLEV,
4352         /* isvoid */ 0
4353     };
4354 
4355     struct iovec xcb_parts[4];
4356     xcb_glx_get_doublev_cookie_t xcb_ret;
4357     xcb_glx_get_doublev_request_t xcb_out;
4358 
4359     xcb_out.context_tag = context_tag;
4360     xcb_out.pname = pname;
4361 
4362     xcb_parts[2].iov_base = (char *) &xcb_out;
4363     xcb_parts[2].iov_len = sizeof(xcb_out);
4364     xcb_parts[3].iov_base = 0;
4365     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4366 
4367     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4368     return xcb_ret;
4369 }
4370 
4371 xcb_glx_float64_t *
xcb_glx_get_doublev_data(const xcb_glx_get_doublev_reply_t * R)4372 xcb_glx_get_doublev_data (const xcb_glx_get_doublev_reply_t *R  /**< */)
4373 {
4374     return (xcb_glx_float64_t *) (R + 1);
4375 }
4376 
4377 int
xcb_glx_get_doublev_data_length(const xcb_glx_get_doublev_reply_t * R)4378 xcb_glx_get_doublev_data_length (const xcb_glx_get_doublev_reply_t *R  /**< */)
4379 {
4380     return R->n;
4381 }
4382 
4383 xcb_generic_iterator_t
xcb_glx_get_doublev_data_end(const xcb_glx_get_doublev_reply_t * R)4384 xcb_glx_get_doublev_data_end (const xcb_glx_get_doublev_reply_t *R  /**< */)
4385 {
4386     xcb_generic_iterator_t i;
4387     i.data = ((xcb_glx_float64_t *) (R + 1)) + (R->n);
4388     i.rem = 0;
4389     i.index = (char *) i.data - (char *) R;
4390     return i;
4391 }
4392 
4393 xcb_glx_get_doublev_reply_t *
xcb_glx_get_doublev_reply(xcb_connection_t * c,xcb_glx_get_doublev_cookie_t cookie,xcb_generic_error_t ** e)4394 xcb_glx_get_doublev_reply (xcb_connection_t              *c  /**< */,
4395                            xcb_glx_get_doublev_cookie_t   cookie  /**< */,
4396                            xcb_generic_error_t          **e  /**< */)
4397 {
4398     return (xcb_glx_get_doublev_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4399 }
4400 
4401 xcb_glx_get_error_cookie_t
xcb_glx_get_error(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)4402 xcb_glx_get_error (xcb_connection_t      *c  /**< */,
4403                    xcb_glx_context_tag_t  context_tag  /**< */)
4404 {
4405     static const xcb_protocol_request_t xcb_req = {
4406         /* count */ 2,
4407         /* ext */ &xcb_glx_id,
4408         /* opcode */ XCB_GLX_GET_ERROR,
4409         /* isvoid */ 0
4410     };
4411 
4412     struct iovec xcb_parts[4];
4413     xcb_glx_get_error_cookie_t xcb_ret;
4414     xcb_glx_get_error_request_t xcb_out;
4415 
4416     xcb_out.context_tag = context_tag;
4417 
4418     xcb_parts[2].iov_base = (char *) &xcb_out;
4419     xcb_parts[2].iov_len = sizeof(xcb_out);
4420     xcb_parts[3].iov_base = 0;
4421     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4422 
4423     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4424     return xcb_ret;
4425 }
4426 
4427 xcb_glx_get_error_cookie_t
xcb_glx_get_error_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)4428 xcb_glx_get_error_unchecked (xcb_connection_t      *c  /**< */,
4429                              xcb_glx_context_tag_t  context_tag  /**< */)
4430 {
4431     static const xcb_protocol_request_t xcb_req = {
4432         /* count */ 2,
4433         /* ext */ &xcb_glx_id,
4434         /* opcode */ XCB_GLX_GET_ERROR,
4435         /* isvoid */ 0
4436     };
4437 
4438     struct iovec xcb_parts[4];
4439     xcb_glx_get_error_cookie_t xcb_ret;
4440     xcb_glx_get_error_request_t xcb_out;
4441 
4442     xcb_out.context_tag = context_tag;
4443 
4444     xcb_parts[2].iov_base = (char *) &xcb_out;
4445     xcb_parts[2].iov_len = sizeof(xcb_out);
4446     xcb_parts[3].iov_base = 0;
4447     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4448 
4449     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4450     return xcb_ret;
4451 }
4452 
4453 xcb_glx_get_error_reply_t *
xcb_glx_get_error_reply(xcb_connection_t * c,xcb_glx_get_error_cookie_t cookie,xcb_generic_error_t ** e)4454 xcb_glx_get_error_reply (xcb_connection_t            *c  /**< */,
4455                          xcb_glx_get_error_cookie_t   cookie  /**< */,
4456                          xcb_generic_error_t        **e  /**< */)
4457 {
4458     return (xcb_glx_get_error_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4459 }
4460 
4461 int
xcb_glx_get_floatv_sizeof(const void * _buffer)4462 xcb_glx_get_floatv_sizeof (const void  *_buffer  /**< */)
4463 {
4464     char *xcb_tmp = (char *)_buffer;
4465     const xcb_glx_get_floatv_reply_t *_aux = (xcb_glx_get_floatv_reply_t *)_buffer;
4466     unsigned int xcb_buffer_len = 0;
4467     unsigned int xcb_block_len = 0;
4468     unsigned int xcb_pad = 0;
4469     unsigned int xcb_align_to = 0;
4470 
4471 
4472     xcb_block_len += sizeof(xcb_glx_get_floatv_reply_t);
4473     xcb_tmp += xcb_block_len;
4474     xcb_buffer_len += xcb_block_len;
4475     xcb_block_len = 0;
4476     /* data */
4477     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
4478     xcb_tmp += xcb_block_len;
4479     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
4480     /* insert padding */
4481     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4482     xcb_buffer_len += xcb_block_len + xcb_pad;
4483     if (0 != xcb_pad) {
4484         xcb_tmp += xcb_pad;
4485         xcb_pad = 0;
4486     }
4487     xcb_block_len = 0;
4488 
4489     return xcb_buffer_len;
4490 }
4491 
4492 xcb_glx_get_floatv_cookie_t
xcb_glx_get_floatv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname)4493 xcb_glx_get_floatv (xcb_connection_t      *c  /**< */,
4494                     xcb_glx_context_tag_t  context_tag  /**< */,
4495                     uint32_t               pname  /**< */)
4496 {
4497     static const xcb_protocol_request_t xcb_req = {
4498         /* count */ 2,
4499         /* ext */ &xcb_glx_id,
4500         /* opcode */ XCB_GLX_GET_FLOATV,
4501         /* isvoid */ 0
4502     };
4503 
4504     struct iovec xcb_parts[4];
4505     xcb_glx_get_floatv_cookie_t xcb_ret;
4506     xcb_glx_get_floatv_request_t xcb_out;
4507 
4508     xcb_out.context_tag = context_tag;
4509     xcb_out.pname = pname;
4510 
4511     xcb_parts[2].iov_base = (char *) &xcb_out;
4512     xcb_parts[2].iov_len = sizeof(xcb_out);
4513     xcb_parts[3].iov_base = 0;
4514     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4515 
4516     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4517     return xcb_ret;
4518 }
4519 
4520 xcb_glx_get_floatv_cookie_t
xcb_glx_get_floatv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname)4521 xcb_glx_get_floatv_unchecked (xcb_connection_t      *c  /**< */,
4522                               xcb_glx_context_tag_t  context_tag  /**< */,
4523                               uint32_t               pname  /**< */)
4524 {
4525     static const xcb_protocol_request_t xcb_req = {
4526         /* count */ 2,
4527         /* ext */ &xcb_glx_id,
4528         /* opcode */ XCB_GLX_GET_FLOATV,
4529         /* isvoid */ 0
4530     };
4531 
4532     struct iovec xcb_parts[4];
4533     xcb_glx_get_floatv_cookie_t xcb_ret;
4534     xcb_glx_get_floatv_request_t xcb_out;
4535 
4536     xcb_out.context_tag = context_tag;
4537     xcb_out.pname = pname;
4538 
4539     xcb_parts[2].iov_base = (char *) &xcb_out;
4540     xcb_parts[2].iov_len = sizeof(xcb_out);
4541     xcb_parts[3].iov_base = 0;
4542     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4543 
4544     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4545     return xcb_ret;
4546 }
4547 
4548 xcb_glx_float32_t *
xcb_glx_get_floatv_data(const xcb_glx_get_floatv_reply_t * R)4549 xcb_glx_get_floatv_data (const xcb_glx_get_floatv_reply_t *R  /**< */)
4550 {
4551     return (xcb_glx_float32_t *) (R + 1);
4552 }
4553 
4554 int
xcb_glx_get_floatv_data_length(const xcb_glx_get_floatv_reply_t * R)4555 xcb_glx_get_floatv_data_length (const xcb_glx_get_floatv_reply_t *R  /**< */)
4556 {
4557     return R->n;
4558 }
4559 
4560 xcb_generic_iterator_t
xcb_glx_get_floatv_data_end(const xcb_glx_get_floatv_reply_t * R)4561 xcb_glx_get_floatv_data_end (const xcb_glx_get_floatv_reply_t *R  /**< */)
4562 {
4563     xcb_generic_iterator_t i;
4564     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
4565     i.rem = 0;
4566     i.index = (char *) i.data - (char *) R;
4567     return i;
4568 }
4569 
4570 xcb_glx_get_floatv_reply_t *
xcb_glx_get_floatv_reply(xcb_connection_t * c,xcb_glx_get_floatv_cookie_t cookie,xcb_generic_error_t ** e)4571 xcb_glx_get_floatv_reply (xcb_connection_t             *c  /**< */,
4572                           xcb_glx_get_floatv_cookie_t   cookie  /**< */,
4573                           xcb_generic_error_t         **e  /**< */)
4574 {
4575     return (xcb_glx_get_floatv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4576 }
4577 
4578 int
xcb_glx_get_integerv_sizeof(const void * _buffer)4579 xcb_glx_get_integerv_sizeof (const void  *_buffer  /**< */)
4580 {
4581     char *xcb_tmp = (char *)_buffer;
4582     const xcb_glx_get_integerv_reply_t *_aux = (xcb_glx_get_integerv_reply_t *)_buffer;
4583     unsigned int xcb_buffer_len = 0;
4584     unsigned int xcb_block_len = 0;
4585     unsigned int xcb_pad = 0;
4586     unsigned int xcb_align_to = 0;
4587 
4588 
4589     xcb_block_len += sizeof(xcb_glx_get_integerv_reply_t);
4590     xcb_tmp += xcb_block_len;
4591     xcb_buffer_len += xcb_block_len;
4592     xcb_block_len = 0;
4593     /* data */
4594     xcb_block_len += _aux->n * sizeof(int32_t);
4595     xcb_tmp += xcb_block_len;
4596     xcb_align_to = ALIGNOF(int32_t);
4597     /* insert padding */
4598     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4599     xcb_buffer_len += xcb_block_len + xcb_pad;
4600     if (0 != xcb_pad) {
4601         xcb_tmp += xcb_pad;
4602         xcb_pad = 0;
4603     }
4604     xcb_block_len = 0;
4605 
4606     return xcb_buffer_len;
4607 }
4608 
4609 xcb_glx_get_integerv_cookie_t
xcb_glx_get_integerv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname)4610 xcb_glx_get_integerv (xcb_connection_t      *c  /**< */,
4611                       xcb_glx_context_tag_t  context_tag  /**< */,
4612                       uint32_t               pname  /**< */)
4613 {
4614     static const xcb_protocol_request_t xcb_req = {
4615         /* count */ 2,
4616         /* ext */ &xcb_glx_id,
4617         /* opcode */ XCB_GLX_GET_INTEGERV,
4618         /* isvoid */ 0
4619     };
4620 
4621     struct iovec xcb_parts[4];
4622     xcb_glx_get_integerv_cookie_t xcb_ret;
4623     xcb_glx_get_integerv_request_t xcb_out;
4624 
4625     xcb_out.context_tag = context_tag;
4626     xcb_out.pname = pname;
4627 
4628     xcb_parts[2].iov_base = (char *) &xcb_out;
4629     xcb_parts[2].iov_len = sizeof(xcb_out);
4630     xcb_parts[3].iov_base = 0;
4631     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4632 
4633     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4634     return xcb_ret;
4635 }
4636 
4637 xcb_glx_get_integerv_cookie_t
xcb_glx_get_integerv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t pname)4638 xcb_glx_get_integerv_unchecked (xcb_connection_t      *c  /**< */,
4639                                 xcb_glx_context_tag_t  context_tag  /**< */,
4640                                 uint32_t               pname  /**< */)
4641 {
4642     static const xcb_protocol_request_t xcb_req = {
4643         /* count */ 2,
4644         /* ext */ &xcb_glx_id,
4645         /* opcode */ XCB_GLX_GET_INTEGERV,
4646         /* isvoid */ 0
4647     };
4648 
4649     struct iovec xcb_parts[4];
4650     xcb_glx_get_integerv_cookie_t xcb_ret;
4651     xcb_glx_get_integerv_request_t xcb_out;
4652 
4653     xcb_out.context_tag = context_tag;
4654     xcb_out.pname = pname;
4655 
4656     xcb_parts[2].iov_base = (char *) &xcb_out;
4657     xcb_parts[2].iov_len = sizeof(xcb_out);
4658     xcb_parts[3].iov_base = 0;
4659     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4660 
4661     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4662     return xcb_ret;
4663 }
4664 
4665 int32_t *
xcb_glx_get_integerv_data(const xcb_glx_get_integerv_reply_t * R)4666 xcb_glx_get_integerv_data (const xcb_glx_get_integerv_reply_t *R  /**< */)
4667 {
4668     return (int32_t *) (R + 1);
4669 }
4670 
4671 int
xcb_glx_get_integerv_data_length(const xcb_glx_get_integerv_reply_t * R)4672 xcb_glx_get_integerv_data_length (const xcb_glx_get_integerv_reply_t *R  /**< */)
4673 {
4674     return R->n;
4675 }
4676 
4677 xcb_generic_iterator_t
xcb_glx_get_integerv_data_end(const xcb_glx_get_integerv_reply_t * R)4678 xcb_glx_get_integerv_data_end (const xcb_glx_get_integerv_reply_t *R  /**< */)
4679 {
4680     xcb_generic_iterator_t i;
4681     i.data = ((int32_t *) (R + 1)) + (R->n);
4682     i.rem = 0;
4683     i.index = (char *) i.data - (char *) R;
4684     return i;
4685 }
4686 
4687 xcb_glx_get_integerv_reply_t *
xcb_glx_get_integerv_reply(xcb_connection_t * c,xcb_glx_get_integerv_cookie_t cookie,xcb_generic_error_t ** e)4688 xcb_glx_get_integerv_reply (xcb_connection_t               *c  /**< */,
4689                             xcb_glx_get_integerv_cookie_t   cookie  /**< */,
4690                             xcb_generic_error_t           **e  /**< */)
4691 {
4692     return (xcb_glx_get_integerv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4693 }
4694 
4695 int
xcb_glx_get_lightfv_sizeof(const void * _buffer)4696 xcb_glx_get_lightfv_sizeof (const void  *_buffer  /**< */)
4697 {
4698     char *xcb_tmp = (char *)_buffer;
4699     const xcb_glx_get_lightfv_reply_t *_aux = (xcb_glx_get_lightfv_reply_t *)_buffer;
4700     unsigned int xcb_buffer_len = 0;
4701     unsigned int xcb_block_len = 0;
4702     unsigned int xcb_pad = 0;
4703     unsigned int xcb_align_to = 0;
4704 
4705 
4706     xcb_block_len += sizeof(xcb_glx_get_lightfv_reply_t);
4707     xcb_tmp += xcb_block_len;
4708     xcb_buffer_len += xcb_block_len;
4709     xcb_block_len = 0;
4710     /* data */
4711     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
4712     xcb_tmp += xcb_block_len;
4713     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
4714     /* insert padding */
4715     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4716     xcb_buffer_len += xcb_block_len + xcb_pad;
4717     if (0 != xcb_pad) {
4718         xcb_tmp += xcb_pad;
4719         xcb_pad = 0;
4720     }
4721     xcb_block_len = 0;
4722 
4723     return xcb_buffer_len;
4724 }
4725 
4726 xcb_glx_get_lightfv_cookie_t
xcb_glx_get_lightfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t light,uint32_t pname)4727 xcb_glx_get_lightfv (xcb_connection_t      *c  /**< */,
4728                      xcb_glx_context_tag_t  context_tag  /**< */,
4729                      uint32_t               light  /**< */,
4730                      uint32_t               pname  /**< */)
4731 {
4732     static const xcb_protocol_request_t xcb_req = {
4733         /* count */ 2,
4734         /* ext */ &xcb_glx_id,
4735         /* opcode */ XCB_GLX_GET_LIGHTFV,
4736         /* isvoid */ 0
4737     };
4738 
4739     struct iovec xcb_parts[4];
4740     xcb_glx_get_lightfv_cookie_t xcb_ret;
4741     xcb_glx_get_lightfv_request_t xcb_out;
4742 
4743     xcb_out.context_tag = context_tag;
4744     xcb_out.light = light;
4745     xcb_out.pname = pname;
4746 
4747     xcb_parts[2].iov_base = (char *) &xcb_out;
4748     xcb_parts[2].iov_len = sizeof(xcb_out);
4749     xcb_parts[3].iov_base = 0;
4750     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4751 
4752     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4753     return xcb_ret;
4754 }
4755 
4756 xcb_glx_get_lightfv_cookie_t
xcb_glx_get_lightfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t light,uint32_t pname)4757 xcb_glx_get_lightfv_unchecked (xcb_connection_t      *c  /**< */,
4758                                xcb_glx_context_tag_t  context_tag  /**< */,
4759                                uint32_t               light  /**< */,
4760                                uint32_t               pname  /**< */)
4761 {
4762     static const xcb_protocol_request_t xcb_req = {
4763         /* count */ 2,
4764         /* ext */ &xcb_glx_id,
4765         /* opcode */ XCB_GLX_GET_LIGHTFV,
4766         /* isvoid */ 0
4767     };
4768 
4769     struct iovec xcb_parts[4];
4770     xcb_glx_get_lightfv_cookie_t xcb_ret;
4771     xcb_glx_get_lightfv_request_t xcb_out;
4772 
4773     xcb_out.context_tag = context_tag;
4774     xcb_out.light = light;
4775     xcb_out.pname = pname;
4776 
4777     xcb_parts[2].iov_base = (char *) &xcb_out;
4778     xcb_parts[2].iov_len = sizeof(xcb_out);
4779     xcb_parts[3].iov_base = 0;
4780     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4781 
4782     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4783     return xcb_ret;
4784 }
4785 
4786 xcb_glx_float32_t *
xcb_glx_get_lightfv_data(const xcb_glx_get_lightfv_reply_t * R)4787 xcb_glx_get_lightfv_data (const xcb_glx_get_lightfv_reply_t *R  /**< */)
4788 {
4789     return (xcb_glx_float32_t *) (R + 1);
4790 }
4791 
4792 int
xcb_glx_get_lightfv_data_length(const xcb_glx_get_lightfv_reply_t * R)4793 xcb_glx_get_lightfv_data_length (const xcb_glx_get_lightfv_reply_t *R  /**< */)
4794 {
4795     return R->n;
4796 }
4797 
4798 xcb_generic_iterator_t
xcb_glx_get_lightfv_data_end(const xcb_glx_get_lightfv_reply_t * R)4799 xcb_glx_get_lightfv_data_end (const xcb_glx_get_lightfv_reply_t *R  /**< */)
4800 {
4801     xcb_generic_iterator_t i;
4802     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
4803     i.rem = 0;
4804     i.index = (char *) i.data - (char *) R;
4805     return i;
4806 }
4807 
4808 xcb_glx_get_lightfv_reply_t *
xcb_glx_get_lightfv_reply(xcb_connection_t * c,xcb_glx_get_lightfv_cookie_t cookie,xcb_generic_error_t ** e)4809 xcb_glx_get_lightfv_reply (xcb_connection_t              *c  /**< */,
4810                            xcb_glx_get_lightfv_cookie_t   cookie  /**< */,
4811                            xcb_generic_error_t          **e  /**< */)
4812 {
4813     return (xcb_glx_get_lightfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4814 }
4815 
4816 int
xcb_glx_get_lightiv_sizeof(const void * _buffer)4817 xcb_glx_get_lightiv_sizeof (const void  *_buffer  /**< */)
4818 {
4819     char *xcb_tmp = (char *)_buffer;
4820     const xcb_glx_get_lightiv_reply_t *_aux = (xcb_glx_get_lightiv_reply_t *)_buffer;
4821     unsigned int xcb_buffer_len = 0;
4822     unsigned int xcb_block_len = 0;
4823     unsigned int xcb_pad = 0;
4824     unsigned int xcb_align_to = 0;
4825 
4826 
4827     xcb_block_len += sizeof(xcb_glx_get_lightiv_reply_t);
4828     xcb_tmp += xcb_block_len;
4829     xcb_buffer_len += xcb_block_len;
4830     xcb_block_len = 0;
4831     /* data */
4832     xcb_block_len += _aux->n * sizeof(int32_t);
4833     xcb_tmp += xcb_block_len;
4834     xcb_align_to = ALIGNOF(int32_t);
4835     /* insert padding */
4836     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4837     xcb_buffer_len += xcb_block_len + xcb_pad;
4838     if (0 != xcb_pad) {
4839         xcb_tmp += xcb_pad;
4840         xcb_pad = 0;
4841     }
4842     xcb_block_len = 0;
4843 
4844     return xcb_buffer_len;
4845 }
4846 
4847 xcb_glx_get_lightiv_cookie_t
xcb_glx_get_lightiv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t light,uint32_t pname)4848 xcb_glx_get_lightiv (xcb_connection_t      *c  /**< */,
4849                      xcb_glx_context_tag_t  context_tag  /**< */,
4850                      uint32_t               light  /**< */,
4851                      uint32_t               pname  /**< */)
4852 {
4853     static const xcb_protocol_request_t xcb_req = {
4854         /* count */ 2,
4855         /* ext */ &xcb_glx_id,
4856         /* opcode */ XCB_GLX_GET_LIGHTIV,
4857         /* isvoid */ 0
4858     };
4859 
4860     struct iovec xcb_parts[4];
4861     xcb_glx_get_lightiv_cookie_t xcb_ret;
4862     xcb_glx_get_lightiv_request_t xcb_out;
4863 
4864     xcb_out.context_tag = context_tag;
4865     xcb_out.light = light;
4866     xcb_out.pname = pname;
4867 
4868     xcb_parts[2].iov_base = (char *) &xcb_out;
4869     xcb_parts[2].iov_len = sizeof(xcb_out);
4870     xcb_parts[3].iov_base = 0;
4871     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4872 
4873     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4874     return xcb_ret;
4875 }
4876 
4877 xcb_glx_get_lightiv_cookie_t
xcb_glx_get_lightiv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t light,uint32_t pname)4878 xcb_glx_get_lightiv_unchecked (xcb_connection_t      *c  /**< */,
4879                                xcb_glx_context_tag_t  context_tag  /**< */,
4880                                uint32_t               light  /**< */,
4881                                uint32_t               pname  /**< */)
4882 {
4883     static const xcb_protocol_request_t xcb_req = {
4884         /* count */ 2,
4885         /* ext */ &xcb_glx_id,
4886         /* opcode */ XCB_GLX_GET_LIGHTIV,
4887         /* isvoid */ 0
4888     };
4889 
4890     struct iovec xcb_parts[4];
4891     xcb_glx_get_lightiv_cookie_t xcb_ret;
4892     xcb_glx_get_lightiv_request_t xcb_out;
4893 
4894     xcb_out.context_tag = context_tag;
4895     xcb_out.light = light;
4896     xcb_out.pname = pname;
4897 
4898     xcb_parts[2].iov_base = (char *) &xcb_out;
4899     xcb_parts[2].iov_len = sizeof(xcb_out);
4900     xcb_parts[3].iov_base = 0;
4901     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4902 
4903     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
4904     return xcb_ret;
4905 }
4906 
4907 int32_t *
xcb_glx_get_lightiv_data(const xcb_glx_get_lightiv_reply_t * R)4908 xcb_glx_get_lightiv_data (const xcb_glx_get_lightiv_reply_t *R  /**< */)
4909 {
4910     return (int32_t *) (R + 1);
4911 }
4912 
4913 int
xcb_glx_get_lightiv_data_length(const xcb_glx_get_lightiv_reply_t * R)4914 xcb_glx_get_lightiv_data_length (const xcb_glx_get_lightiv_reply_t *R  /**< */)
4915 {
4916     return R->n;
4917 }
4918 
4919 xcb_generic_iterator_t
xcb_glx_get_lightiv_data_end(const xcb_glx_get_lightiv_reply_t * R)4920 xcb_glx_get_lightiv_data_end (const xcb_glx_get_lightiv_reply_t *R  /**< */)
4921 {
4922     xcb_generic_iterator_t i;
4923     i.data = ((int32_t *) (R + 1)) + (R->n);
4924     i.rem = 0;
4925     i.index = (char *) i.data - (char *) R;
4926     return i;
4927 }
4928 
4929 xcb_glx_get_lightiv_reply_t *
xcb_glx_get_lightiv_reply(xcb_connection_t * c,xcb_glx_get_lightiv_cookie_t cookie,xcb_generic_error_t ** e)4930 xcb_glx_get_lightiv_reply (xcb_connection_t              *c  /**< */,
4931                            xcb_glx_get_lightiv_cookie_t   cookie  /**< */,
4932                            xcb_generic_error_t          **e  /**< */)
4933 {
4934     return (xcb_glx_get_lightiv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
4935 }
4936 
4937 int
xcb_glx_get_mapdv_sizeof(const void * _buffer)4938 xcb_glx_get_mapdv_sizeof (const void  *_buffer  /**< */)
4939 {
4940     char *xcb_tmp = (char *)_buffer;
4941     const xcb_glx_get_mapdv_reply_t *_aux = (xcb_glx_get_mapdv_reply_t *)_buffer;
4942     unsigned int xcb_buffer_len = 0;
4943     unsigned int xcb_block_len = 0;
4944     unsigned int xcb_pad = 0;
4945     unsigned int xcb_align_to = 0;
4946 
4947 
4948     xcb_block_len += sizeof(xcb_glx_get_mapdv_reply_t);
4949     xcb_tmp += xcb_block_len;
4950     xcb_buffer_len += xcb_block_len;
4951     xcb_block_len = 0;
4952     /* data */
4953     xcb_block_len += _aux->n * sizeof(xcb_glx_float64_t);
4954     xcb_tmp += xcb_block_len;
4955     xcb_align_to = ALIGNOF(xcb_glx_float64_t);
4956     /* insert padding */
4957     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
4958     xcb_buffer_len += xcb_block_len + xcb_pad;
4959     if (0 != xcb_pad) {
4960         xcb_tmp += xcb_pad;
4961         xcb_pad = 0;
4962     }
4963     xcb_block_len = 0;
4964 
4965     return xcb_buffer_len;
4966 }
4967 
4968 xcb_glx_get_mapdv_cookie_t
xcb_glx_get_mapdv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t query)4969 xcb_glx_get_mapdv (xcb_connection_t      *c  /**< */,
4970                    xcb_glx_context_tag_t  context_tag  /**< */,
4971                    uint32_t               target  /**< */,
4972                    uint32_t               query  /**< */)
4973 {
4974     static const xcb_protocol_request_t xcb_req = {
4975         /* count */ 2,
4976         /* ext */ &xcb_glx_id,
4977         /* opcode */ XCB_GLX_GET_MAPDV,
4978         /* isvoid */ 0
4979     };
4980 
4981     struct iovec xcb_parts[4];
4982     xcb_glx_get_mapdv_cookie_t xcb_ret;
4983     xcb_glx_get_mapdv_request_t xcb_out;
4984 
4985     xcb_out.context_tag = context_tag;
4986     xcb_out.target = target;
4987     xcb_out.query = query;
4988 
4989     xcb_parts[2].iov_base = (char *) &xcb_out;
4990     xcb_parts[2].iov_len = sizeof(xcb_out);
4991     xcb_parts[3].iov_base = 0;
4992     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
4993 
4994     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
4995     return xcb_ret;
4996 }
4997 
4998 xcb_glx_get_mapdv_cookie_t
xcb_glx_get_mapdv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t query)4999 xcb_glx_get_mapdv_unchecked (xcb_connection_t      *c  /**< */,
5000                              xcb_glx_context_tag_t  context_tag  /**< */,
5001                              uint32_t               target  /**< */,
5002                              uint32_t               query  /**< */)
5003 {
5004     static const xcb_protocol_request_t xcb_req = {
5005         /* count */ 2,
5006         /* ext */ &xcb_glx_id,
5007         /* opcode */ XCB_GLX_GET_MAPDV,
5008         /* isvoid */ 0
5009     };
5010 
5011     struct iovec xcb_parts[4];
5012     xcb_glx_get_mapdv_cookie_t xcb_ret;
5013     xcb_glx_get_mapdv_request_t xcb_out;
5014 
5015     xcb_out.context_tag = context_tag;
5016     xcb_out.target = target;
5017     xcb_out.query = query;
5018 
5019     xcb_parts[2].iov_base = (char *) &xcb_out;
5020     xcb_parts[2].iov_len = sizeof(xcb_out);
5021     xcb_parts[3].iov_base = 0;
5022     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5023 
5024     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5025     return xcb_ret;
5026 }
5027 
5028 xcb_glx_float64_t *
xcb_glx_get_mapdv_data(const xcb_glx_get_mapdv_reply_t * R)5029 xcb_glx_get_mapdv_data (const xcb_glx_get_mapdv_reply_t *R  /**< */)
5030 {
5031     return (xcb_glx_float64_t *) (R + 1);
5032 }
5033 
5034 int
xcb_glx_get_mapdv_data_length(const xcb_glx_get_mapdv_reply_t * R)5035 xcb_glx_get_mapdv_data_length (const xcb_glx_get_mapdv_reply_t *R  /**< */)
5036 {
5037     return R->n;
5038 }
5039 
5040 xcb_generic_iterator_t
xcb_glx_get_mapdv_data_end(const xcb_glx_get_mapdv_reply_t * R)5041 xcb_glx_get_mapdv_data_end (const xcb_glx_get_mapdv_reply_t *R  /**< */)
5042 {
5043     xcb_generic_iterator_t i;
5044     i.data = ((xcb_glx_float64_t *) (R + 1)) + (R->n);
5045     i.rem = 0;
5046     i.index = (char *) i.data - (char *) R;
5047     return i;
5048 }
5049 
5050 xcb_glx_get_mapdv_reply_t *
xcb_glx_get_mapdv_reply(xcb_connection_t * c,xcb_glx_get_mapdv_cookie_t cookie,xcb_generic_error_t ** e)5051 xcb_glx_get_mapdv_reply (xcb_connection_t            *c  /**< */,
5052                          xcb_glx_get_mapdv_cookie_t   cookie  /**< */,
5053                          xcb_generic_error_t        **e  /**< */)
5054 {
5055     return (xcb_glx_get_mapdv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5056 }
5057 
5058 int
xcb_glx_get_mapfv_sizeof(const void * _buffer)5059 xcb_glx_get_mapfv_sizeof (const void  *_buffer  /**< */)
5060 {
5061     char *xcb_tmp = (char *)_buffer;
5062     const xcb_glx_get_mapfv_reply_t *_aux = (xcb_glx_get_mapfv_reply_t *)_buffer;
5063     unsigned int xcb_buffer_len = 0;
5064     unsigned int xcb_block_len = 0;
5065     unsigned int xcb_pad = 0;
5066     unsigned int xcb_align_to = 0;
5067 
5068 
5069     xcb_block_len += sizeof(xcb_glx_get_mapfv_reply_t);
5070     xcb_tmp += xcb_block_len;
5071     xcb_buffer_len += xcb_block_len;
5072     xcb_block_len = 0;
5073     /* data */
5074     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
5075     xcb_tmp += xcb_block_len;
5076     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
5077     /* insert padding */
5078     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5079     xcb_buffer_len += xcb_block_len + xcb_pad;
5080     if (0 != xcb_pad) {
5081         xcb_tmp += xcb_pad;
5082         xcb_pad = 0;
5083     }
5084     xcb_block_len = 0;
5085 
5086     return xcb_buffer_len;
5087 }
5088 
5089 xcb_glx_get_mapfv_cookie_t
xcb_glx_get_mapfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t query)5090 xcb_glx_get_mapfv (xcb_connection_t      *c  /**< */,
5091                    xcb_glx_context_tag_t  context_tag  /**< */,
5092                    uint32_t               target  /**< */,
5093                    uint32_t               query  /**< */)
5094 {
5095     static const xcb_protocol_request_t xcb_req = {
5096         /* count */ 2,
5097         /* ext */ &xcb_glx_id,
5098         /* opcode */ XCB_GLX_GET_MAPFV,
5099         /* isvoid */ 0
5100     };
5101 
5102     struct iovec xcb_parts[4];
5103     xcb_glx_get_mapfv_cookie_t xcb_ret;
5104     xcb_glx_get_mapfv_request_t xcb_out;
5105 
5106     xcb_out.context_tag = context_tag;
5107     xcb_out.target = target;
5108     xcb_out.query = query;
5109 
5110     xcb_parts[2].iov_base = (char *) &xcb_out;
5111     xcb_parts[2].iov_len = sizeof(xcb_out);
5112     xcb_parts[3].iov_base = 0;
5113     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5114 
5115     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5116     return xcb_ret;
5117 }
5118 
5119 xcb_glx_get_mapfv_cookie_t
xcb_glx_get_mapfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t query)5120 xcb_glx_get_mapfv_unchecked (xcb_connection_t      *c  /**< */,
5121                              xcb_glx_context_tag_t  context_tag  /**< */,
5122                              uint32_t               target  /**< */,
5123                              uint32_t               query  /**< */)
5124 {
5125     static const xcb_protocol_request_t xcb_req = {
5126         /* count */ 2,
5127         /* ext */ &xcb_glx_id,
5128         /* opcode */ XCB_GLX_GET_MAPFV,
5129         /* isvoid */ 0
5130     };
5131 
5132     struct iovec xcb_parts[4];
5133     xcb_glx_get_mapfv_cookie_t xcb_ret;
5134     xcb_glx_get_mapfv_request_t xcb_out;
5135 
5136     xcb_out.context_tag = context_tag;
5137     xcb_out.target = target;
5138     xcb_out.query = query;
5139 
5140     xcb_parts[2].iov_base = (char *) &xcb_out;
5141     xcb_parts[2].iov_len = sizeof(xcb_out);
5142     xcb_parts[3].iov_base = 0;
5143     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5144 
5145     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5146     return xcb_ret;
5147 }
5148 
5149 xcb_glx_float32_t *
xcb_glx_get_mapfv_data(const xcb_glx_get_mapfv_reply_t * R)5150 xcb_glx_get_mapfv_data (const xcb_glx_get_mapfv_reply_t *R  /**< */)
5151 {
5152     return (xcb_glx_float32_t *) (R + 1);
5153 }
5154 
5155 int
xcb_glx_get_mapfv_data_length(const xcb_glx_get_mapfv_reply_t * R)5156 xcb_glx_get_mapfv_data_length (const xcb_glx_get_mapfv_reply_t *R  /**< */)
5157 {
5158     return R->n;
5159 }
5160 
5161 xcb_generic_iterator_t
xcb_glx_get_mapfv_data_end(const xcb_glx_get_mapfv_reply_t * R)5162 xcb_glx_get_mapfv_data_end (const xcb_glx_get_mapfv_reply_t *R  /**< */)
5163 {
5164     xcb_generic_iterator_t i;
5165     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
5166     i.rem = 0;
5167     i.index = (char *) i.data - (char *) R;
5168     return i;
5169 }
5170 
5171 xcb_glx_get_mapfv_reply_t *
xcb_glx_get_mapfv_reply(xcb_connection_t * c,xcb_glx_get_mapfv_cookie_t cookie,xcb_generic_error_t ** e)5172 xcb_glx_get_mapfv_reply (xcb_connection_t            *c  /**< */,
5173                          xcb_glx_get_mapfv_cookie_t   cookie  /**< */,
5174                          xcb_generic_error_t        **e  /**< */)
5175 {
5176     return (xcb_glx_get_mapfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5177 }
5178 
5179 int
xcb_glx_get_mapiv_sizeof(const void * _buffer)5180 xcb_glx_get_mapiv_sizeof (const void  *_buffer  /**< */)
5181 {
5182     char *xcb_tmp = (char *)_buffer;
5183     const xcb_glx_get_mapiv_reply_t *_aux = (xcb_glx_get_mapiv_reply_t *)_buffer;
5184     unsigned int xcb_buffer_len = 0;
5185     unsigned int xcb_block_len = 0;
5186     unsigned int xcb_pad = 0;
5187     unsigned int xcb_align_to = 0;
5188 
5189 
5190     xcb_block_len += sizeof(xcb_glx_get_mapiv_reply_t);
5191     xcb_tmp += xcb_block_len;
5192     xcb_buffer_len += xcb_block_len;
5193     xcb_block_len = 0;
5194     /* data */
5195     xcb_block_len += _aux->n * sizeof(int32_t);
5196     xcb_tmp += xcb_block_len;
5197     xcb_align_to = ALIGNOF(int32_t);
5198     /* insert padding */
5199     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5200     xcb_buffer_len += xcb_block_len + xcb_pad;
5201     if (0 != xcb_pad) {
5202         xcb_tmp += xcb_pad;
5203         xcb_pad = 0;
5204     }
5205     xcb_block_len = 0;
5206 
5207     return xcb_buffer_len;
5208 }
5209 
5210 xcb_glx_get_mapiv_cookie_t
xcb_glx_get_mapiv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t query)5211 xcb_glx_get_mapiv (xcb_connection_t      *c  /**< */,
5212                    xcb_glx_context_tag_t  context_tag  /**< */,
5213                    uint32_t               target  /**< */,
5214                    uint32_t               query  /**< */)
5215 {
5216     static const xcb_protocol_request_t xcb_req = {
5217         /* count */ 2,
5218         /* ext */ &xcb_glx_id,
5219         /* opcode */ XCB_GLX_GET_MAPIV,
5220         /* isvoid */ 0
5221     };
5222 
5223     struct iovec xcb_parts[4];
5224     xcb_glx_get_mapiv_cookie_t xcb_ret;
5225     xcb_glx_get_mapiv_request_t xcb_out;
5226 
5227     xcb_out.context_tag = context_tag;
5228     xcb_out.target = target;
5229     xcb_out.query = query;
5230 
5231     xcb_parts[2].iov_base = (char *) &xcb_out;
5232     xcb_parts[2].iov_len = sizeof(xcb_out);
5233     xcb_parts[3].iov_base = 0;
5234     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5235 
5236     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5237     return xcb_ret;
5238 }
5239 
5240 xcb_glx_get_mapiv_cookie_t
xcb_glx_get_mapiv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t query)5241 xcb_glx_get_mapiv_unchecked (xcb_connection_t      *c  /**< */,
5242                              xcb_glx_context_tag_t  context_tag  /**< */,
5243                              uint32_t               target  /**< */,
5244                              uint32_t               query  /**< */)
5245 {
5246     static const xcb_protocol_request_t xcb_req = {
5247         /* count */ 2,
5248         /* ext */ &xcb_glx_id,
5249         /* opcode */ XCB_GLX_GET_MAPIV,
5250         /* isvoid */ 0
5251     };
5252 
5253     struct iovec xcb_parts[4];
5254     xcb_glx_get_mapiv_cookie_t xcb_ret;
5255     xcb_glx_get_mapiv_request_t xcb_out;
5256 
5257     xcb_out.context_tag = context_tag;
5258     xcb_out.target = target;
5259     xcb_out.query = query;
5260 
5261     xcb_parts[2].iov_base = (char *) &xcb_out;
5262     xcb_parts[2].iov_len = sizeof(xcb_out);
5263     xcb_parts[3].iov_base = 0;
5264     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5265 
5266     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5267     return xcb_ret;
5268 }
5269 
5270 int32_t *
xcb_glx_get_mapiv_data(const xcb_glx_get_mapiv_reply_t * R)5271 xcb_glx_get_mapiv_data (const xcb_glx_get_mapiv_reply_t *R  /**< */)
5272 {
5273     return (int32_t *) (R + 1);
5274 }
5275 
5276 int
xcb_glx_get_mapiv_data_length(const xcb_glx_get_mapiv_reply_t * R)5277 xcb_glx_get_mapiv_data_length (const xcb_glx_get_mapiv_reply_t *R  /**< */)
5278 {
5279     return R->n;
5280 }
5281 
5282 xcb_generic_iterator_t
xcb_glx_get_mapiv_data_end(const xcb_glx_get_mapiv_reply_t * R)5283 xcb_glx_get_mapiv_data_end (const xcb_glx_get_mapiv_reply_t *R  /**< */)
5284 {
5285     xcb_generic_iterator_t i;
5286     i.data = ((int32_t *) (R + 1)) + (R->n);
5287     i.rem = 0;
5288     i.index = (char *) i.data - (char *) R;
5289     return i;
5290 }
5291 
5292 xcb_glx_get_mapiv_reply_t *
xcb_glx_get_mapiv_reply(xcb_connection_t * c,xcb_glx_get_mapiv_cookie_t cookie,xcb_generic_error_t ** e)5293 xcb_glx_get_mapiv_reply (xcb_connection_t            *c  /**< */,
5294                          xcb_glx_get_mapiv_cookie_t   cookie  /**< */,
5295                          xcb_generic_error_t        **e  /**< */)
5296 {
5297     return (xcb_glx_get_mapiv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5298 }
5299 
5300 int
xcb_glx_get_materialfv_sizeof(const void * _buffer)5301 xcb_glx_get_materialfv_sizeof (const void  *_buffer  /**< */)
5302 {
5303     char *xcb_tmp = (char *)_buffer;
5304     const xcb_glx_get_materialfv_reply_t *_aux = (xcb_glx_get_materialfv_reply_t *)_buffer;
5305     unsigned int xcb_buffer_len = 0;
5306     unsigned int xcb_block_len = 0;
5307     unsigned int xcb_pad = 0;
5308     unsigned int xcb_align_to = 0;
5309 
5310 
5311     xcb_block_len += sizeof(xcb_glx_get_materialfv_reply_t);
5312     xcb_tmp += xcb_block_len;
5313     xcb_buffer_len += xcb_block_len;
5314     xcb_block_len = 0;
5315     /* data */
5316     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
5317     xcb_tmp += xcb_block_len;
5318     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
5319     /* insert padding */
5320     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5321     xcb_buffer_len += xcb_block_len + xcb_pad;
5322     if (0 != xcb_pad) {
5323         xcb_tmp += xcb_pad;
5324         xcb_pad = 0;
5325     }
5326     xcb_block_len = 0;
5327 
5328     return xcb_buffer_len;
5329 }
5330 
5331 xcb_glx_get_materialfv_cookie_t
xcb_glx_get_materialfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t face,uint32_t pname)5332 xcb_glx_get_materialfv (xcb_connection_t      *c  /**< */,
5333                         xcb_glx_context_tag_t  context_tag  /**< */,
5334                         uint32_t               face  /**< */,
5335                         uint32_t               pname  /**< */)
5336 {
5337     static const xcb_protocol_request_t xcb_req = {
5338         /* count */ 2,
5339         /* ext */ &xcb_glx_id,
5340         /* opcode */ XCB_GLX_GET_MATERIALFV,
5341         /* isvoid */ 0
5342     };
5343 
5344     struct iovec xcb_parts[4];
5345     xcb_glx_get_materialfv_cookie_t xcb_ret;
5346     xcb_glx_get_materialfv_request_t xcb_out;
5347 
5348     xcb_out.context_tag = context_tag;
5349     xcb_out.face = face;
5350     xcb_out.pname = pname;
5351 
5352     xcb_parts[2].iov_base = (char *) &xcb_out;
5353     xcb_parts[2].iov_len = sizeof(xcb_out);
5354     xcb_parts[3].iov_base = 0;
5355     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5356 
5357     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5358     return xcb_ret;
5359 }
5360 
5361 xcb_glx_get_materialfv_cookie_t
xcb_glx_get_materialfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t face,uint32_t pname)5362 xcb_glx_get_materialfv_unchecked (xcb_connection_t      *c  /**< */,
5363                                   xcb_glx_context_tag_t  context_tag  /**< */,
5364                                   uint32_t               face  /**< */,
5365                                   uint32_t               pname  /**< */)
5366 {
5367     static const xcb_protocol_request_t xcb_req = {
5368         /* count */ 2,
5369         /* ext */ &xcb_glx_id,
5370         /* opcode */ XCB_GLX_GET_MATERIALFV,
5371         /* isvoid */ 0
5372     };
5373 
5374     struct iovec xcb_parts[4];
5375     xcb_glx_get_materialfv_cookie_t xcb_ret;
5376     xcb_glx_get_materialfv_request_t xcb_out;
5377 
5378     xcb_out.context_tag = context_tag;
5379     xcb_out.face = face;
5380     xcb_out.pname = pname;
5381 
5382     xcb_parts[2].iov_base = (char *) &xcb_out;
5383     xcb_parts[2].iov_len = sizeof(xcb_out);
5384     xcb_parts[3].iov_base = 0;
5385     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5386 
5387     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5388     return xcb_ret;
5389 }
5390 
5391 xcb_glx_float32_t *
xcb_glx_get_materialfv_data(const xcb_glx_get_materialfv_reply_t * R)5392 xcb_glx_get_materialfv_data (const xcb_glx_get_materialfv_reply_t *R  /**< */)
5393 {
5394     return (xcb_glx_float32_t *) (R + 1);
5395 }
5396 
5397 int
xcb_glx_get_materialfv_data_length(const xcb_glx_get_materialfv_reply_t * R)5398 xcb_glx_get_materialfv_data_length (const xcb_glx_get_materialfv_reply_t *R  /**< */)
5399 {
5400     return R->n;
5401 }
5402 
5403 xcb_generic_iterator_t
xcb_glx_get_materialfv_data_end(const xcb_glx_get_materialfv_reply_t * R)5404 xcb_glx_get_materialfv_data_end (const xcb_glx_get_materialfv_reply_t *R  /**< */)
5405 {
5406     xcb_generic_iterator_t i;
5407     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
5408     i.rem = 0;
5409     i.index = (char *) i.data - (char *) R;
5410     return i;
5411 }
5412 
5413 xcb_glx_get_materialfv_reply_t *
xcb_glx_get_materialfv_reply(xcb_connection_t * c,xcb_glx_get_materialfv_cookie_t cookie,xcb_generic_error_t ** e)5414 xcb_glx_get_materialfv_reply (xcb_connection_t                 *c  /**< */,
5415                               xcb_glx_get_materialfv_cookie_t   cookie  /**< */,
5416                               xcb_generic_error_t             **e  /**< */)
5417 {
5418     return (xcb_glx_get_materialfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5419 }
5420 
5421 int
xcb_glx_get_materialiv_sizeof(const void * _buffer)5422 xcb_glx_get_materialiv_sizeof (const void  *_buffer  /**< */)
5423 {
5424     char *xcb_tmp = (char *)_buffer;
5425     const xcb_glx_get_materialiv_reply_t *_aux = (xcb_glx_get_materialiv_reply_t *)_buffer;
5426     unsigned int xcb_buffer_len = 0;
5427     unsigned int xcb_block_len = 0;
5428     unsigned int xcb_pad = 0;
5429     unsigned int xcb_align_to = 0;
5430 
5431 
5432     xcb_block_len += sizeof(xcb_glx_get_materialiv_reply_t);
5433     xcb_tmp += xcb_block_len;
5434     xcb_buffer_len += xcb_block_len;
5435     xcb_block_len = 0;
5436     /* data */
5437     xcb_block_len += _aux->n * sizeof(int32_t);
5438     xcb_tmp += xcb_block_len;
5439     xcb_align_to = ALIGNOF(int32_t);
5440     /* insert padding */
5441     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5442     xcb_buffer_len += xcb_block_len + xcb_pad;
5443     if (0 != xcb_pad) {
5444         xcb_tmp += xcb_pad;
5445         xcb_pad = 0;
5446     }
5447     xcb_block_len = 0;
5448 
5449     return xcb_buffer_len;
5450 }
5451 
5452 xcb_glx_get_materialiv_cookie_t
xcb_glx_get_materialiv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t face,uint32_t pname)5453 xcb_glx_get_materialiv (xcb_connection_t      *c  /**< */,
5454                         xcb_glx_context_tag_t  context_tag  /**< */,
5455                         uint32_t               face  /**< */,
5456                         uint32_t               pname  /**< */)
5457 {
5458     static const xcb_protocol_request_t xcb_req = {
5459         /* count */ 2,
5460         /* ext */ &xcb_glx_id,
5461         /* opcode */ XCB_GLX_GET_MATERIALIV,
5462         /* isvoid */ 0
5463     };
5464 
5465     struct iovec xcb_parts[4];
5466     xcb_glx_get_materialiv_cookie_t xcb_ret;
5467     xcb_glx_get_materialiv_request_t xcb_out;
5468 
5469     xcb_out.context_tag = context_tag;
5470     xcb_out.face = face;
5471     xcb_out.pname = pname;
5472 
5473     xcb_parts[2].iov_base = (char *) &xcb_out;
5474     xcb_parts[2].iov_len = sizeof(xcb_out);
5475     xcb_parts[3].iov_base = 0;
5476     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5477 
5478     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5479     return xcb_ret;
5480 }
5481 
5482 xcb_glx_get_materialiv_cookie_t
xcb_glx_get_materialiv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t face,uint32_t pname)5483 xcb_glx_get_materialiv_unchecked (xcb_connection_t      *c  /**< */,
5484                                   xcb_glx_context_tag_t  context_tag  /**< */,
5485                                   uint32_t               face  /**< */,
5486                                   uint32_t               pname  /**< */)
5487 {
5488     static const xcb_protocol_request_t xcb_req = {
5489         /* count */ 2,
5490         /* ext */ &xcb_glx_id,
5491         /* opcode */ XCB_GLX_GET_MATERIALIV,
5492         /* isvoid */ 0
5493     };
5494 
5495     struct iovec xcb_parts[4];
5496     xcb_glx_get_materialiv_cookie_t xcb_ret;
5497     xcb_glx_get_materialiv_request_t xcb_out;
5498 
5499     xcb_out.context_tag = context_tag;
5500     xcb_out.face = face;
5501     xcb_out.pname = pname;
5502 
5503     xcb_parts[2].iov_base = (char *) &xcb_out;
5504     xcb_parts[2].iov_len = sizeof(xcb_out);
5505     xcb_parts[3].iov_base = 0;
5506     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5507 
5508     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5509     return xcb_ret;
5510 }
5511 
5512 int32_t *
xcb_glx_get_materialiv_data(const xcb_glx_get_materialiv_reply_t * R)5513 xcb_glx_get_materialiv_data (const xcb_glx_get_materialiv_reply_t *R  /**< */)
5514 {
5515     return (int32_t *) (R + 1);
5516 }
5517 
5518 int
xcb_glx_get_materialiv_data_length(const xcb_glx_get_materialiv_reply_t * R)5519 xcb_glx_get_materialiv_data_length (const xcb_glx_get_materialiv_reply_t *R  /**< */)
5520 {
5521     return R->n;
5522 }
5523 
5524 xcb_generic_iterator_t
xcb_glx_get_materialiv_data_end(const xcb_glx_get_materialiv_reply_t * R)5525 xcb_glx_get_materialiv_data_end (const xcb_glx_get_materialiv_reply_t *R  /**< */)
5526 {
5527     xcb_generic_iterator_t i;
5528     i.data = ((int32_t *) (R + 1)) + (R->n);
5529     i.rem = 0;
5530     i.index = (char *) i.data - (char *) R;
5531     return i;
5532 }
5533 
5534 xcb_glx_get_materialiv_reply_t *
xcb_glx_get_materialiv_reply(xcb_connection_t * c,xcb_glx_get_materialiv_cookie_t cookie,xcb_generic_error_t ** e)5535 xcb_glx_get_materialiv_reply (xcb_connection_t                 *c  /**< */,
5536                               xcb_glx_get_materialiv_cookie_t   cookie  /**< */,
5537                               xcb_generic_error_t             **e  /**< */)
5538 {
5539     return (xcb_glx_get_materialiv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5540 }
5541 
5542 int
xcb_glx_get_pixel_mapfv_sizeof(const void * _buffer)5543 xcb_glx_get_pixel_mapfv_sizeof (const void  *_buffer  /**< */)
5544 {
5545     char *xcb_tmp = (char *)_buffer;
5546     const xcb_glx_get_pixel_mapfv_reply_t *_aux = (xcb_glx_get_pixel_mapfv_reply_t *)_buffer;
5547     unsigned int xcb_buffer_len = 0;
5548     unsigned int xcb_block_len = 0;
5549     unsigned int xcb_pad = 0;
5550     unsigned int xcb_align_to = 0;
5551 
5552 
5553     xcb_block_len += sizeof(xcb_glx_get_pixel_mapfv_reply_t);
5554     xcb_tmp += xcb_block_len;
5555     xcb_buffer_len += xcb_block_len;
5556     xcb_block_len = 0;
5557     /* data */
5558     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
5559     xcb_tmp += xcb_block_len;
5560     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
5561     /* insert padding */
5562     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5563     xcb_buffer_len += xcb_block_len + xcb_pad;
5564     if (0 != xcb_pad) {
5565         xcb_tmp += xcb_pad;
5566         xcb_pad = 0;
5567     }
5568     xcb_block_len = 0;
5569 
5570     return xcb_buffer_len;
5571 }
5572 
5573 xcb_glx_get_pixel_mapfv_cookie_t
xcb_glx_get_pixel_mapfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t map)5574 xcb_glx_get_pixel_mapfv (xcb_connection_t      *c  /**< */,
5575                          xcb_glx_context_tag_t  context_tag  /**< */,
5576                          uint32_t               map  /**< */)
5577 {
5578     static const xcb_protocol_request_t xcb_req = {
5579         /* count */ 2,
5580         /* ext */ &xcb_glx_id,
5581         /* opcode */ XCB_GLX_GET_PIXEL_MAPFV,
5582         /* isvoid */ 0
5583     };
5584 
5585     struct iovec xcb_parts[4];
5586     xcb_glx_get_pixel_mapfv_cookie_t xcb_ret;
5587     xcb_glx_get_pixel_mapfv_request_t xcb_out;
5588 
5589     xcb_out.context_tag = context_tag;
5590     xcb_out.map = map;
5591 
5592     xcb_parts[2].iov_base = (char *) &xcb_out;
5593     xcb_parts[2].iov_len = sizeof(xcb_out);
5594     xcb_parts[3].iov_base = 0;
5595     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5596 
5597     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5598     return xcb_ret;
5599 }
5600 
5601 xcb_glx_get_pixel_mapfv_cookie_t
xcb_glx_get_pixel_mapfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t map)5602 xcb_glx_get_pixel_mapfv_unchecked (xcb_connection_t      *c  /**< */,
5603                                    xcb_glx_context_tag_t  context_tag  /**< */,
5604                                    uint32_t               map  /**< */)
5605 {
5606     static const xcb_protocol_request_t xcb_req = {
5607         /* count */ 2,
5608         /* ext */ &xcb_glx_id,
5609         /* opcode */ XCB_GLX_GET_PIXEL_MAPFV,
5610         /* isvoid */ 0
5611     };
5612 
5613     struct iovec xcb_parts[4];
5614     xcb_glx_get_pixel_mapfv_cookie_t xcb_ret;
5615     xcb_glx_get_pixel_mapfv_request_t xcb_out;
5616 
5617     xcb_out.context_tag = context_tag;
5618     xcb_out.map = map;
5619 
5620     xcb_parts[2].iov_base = (char *) &xcb_out;
5621     xcb_parts[2].iov_len = sizeof(xcb_out);
5622     xcb_parts[3].iov_base = 0;
5623     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5624 
5625     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5626     return xcb_ret;
5627 }
5628 
5629 xcb_glx_float32_t *
xcb_glx_get_pixel_mapfv_data(const xcb_glx_get_pixel_mapfv_reply_t * R)5630 xcb_glx_get_pixel_mapfv_data (const xcb_glx_get_pixel_mapfv_reply_t *R  /**< */)
5631 {
5632     return (xcb_glx_float32_t *) (R + 1);
5633 }
5634 
5635 int
xcb_glx_get_pixel_mapfv_data_length(const xcb_glx_get_pixel_mapfv_reply_t * R)5636 xcb_glx_get_pixel_mapfv_data_length (const xcb_glx_get_pixel_mapfv_reply_t *R  /**< */)
5637 {
5638     return R->n;
5639 }
5640 
5641 xcb_generic_iterator_t
xcb_glx_get_pixel_mapfv_data_end(const xcb_glx_get_pixel_mapfv_reply_t * R)5642 xcb_glx_get_pixel_mapfv_data_end (const xcb_glx_get_pixel_mapfv_reply_t *R  /**< */)
5643 {
5644     xcb_generic_iterator_t i;
5645     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
5646     i.rem = 0;
5647     i.index = (char *) i.data - (char *) R;
5648     return i;
5649 }
5650 
5651 xcb_glx_get_pixel_mapfv_reply_t *
xcb_glx_get_pixel_mapfv_reply(xcb_connection_t * c,xcb_glx_get_pixel_mapfv_cookie_t cookie,xcb_generic_error_t ** e)5652 xcb_glx_get_pixel_mapfv_reply (xcb_connection_t                  *c  /**< */,
5653                                xcb_glx_get_pixel_mapfv_cookie_t   cookie  /**< */,
5654                                xcb_generic_error_t              **e  /**< */)
5655 {
5656     return (xcb_glx_get_pixel_mapfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5657 }
5658 
5659 int
xcb_glx_get_pixel_mapuiv_sizeof(const void * _buffer)5660 xcb_glx_get_pixel_mapuiv_sizeof (const void  *_buffer  /**< */)
5661 {
5662     char *xcb_tmp = (char *)_buffer;
5663     const xcb_glx_get_pixel_mapuiv_reply_t *_aux = (xcb_glx_get_pixel_mapuiv_reply_t *)_buffer;
5664     unsigned int xcb_buffer_len = 0;
5665     unsigned int xcb_block_len = 0;
5666     unsigned int xcb_pad = 0;
5667     unsigned int xcb_align_to = 0;
5668 
5669 
5670     xcb_block_len += sizeof(xcb_glx_get_pixel_mapuiv_reply_t);
5671     xcb_tmp += xcb_block_len;
5672     xcb_buffer_len += xcb_block_len;
5673     xcb_block_len = 0;
5674     /* data */
5675     xcb_block_len += _aux->n * sizeof(uint32_t);
5676     xcb_tmp += xcb_block_len;
5677     xcb_align_to = ALIGNOF(uint32_t);
5678     /* insert padding */
5679     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5680     xcb_buffer_len += xcb_block_len + xcb_pad;
5681     if (0 != xcb_pad) {
5682         xcb_tmp += xcb_pad;
5683         xcb_pad = 0;
5684     }
5685     xcb_block_len = 0;
5686 
5687     return xcb_buffer_len;
5688 }
5689 
5690 xcb_glx_get_pixel_mapuiv_cookie_t
xcb_glx_get_pixel_mapuiv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t map)5691 xcb_glx_get_pixel_mapuiv (xcb_connection_t      *c  /**< */,
5692                           xcb_glx_context_tag_t  context_tag  /**< */,
5693                           uint32_t               map  /**< */)
5694 {
5695     static const xcb_protocol_request_t xcb_req = {
5696         /* count */ 2,
5697         /* ext */ &xcb_glx_id,
5698         /* opcode */ XCB_GLX_GET_PIXEL_MAPUIV,
5699         /* isvoid */ 0
5700     };
5701 
5702     struct iovec xcb_parts[4];
5703     xcb_glx_get_pixel_mapuiv_cookie_t xcb_ret;
5704     xcb_glx_get_pixel_mapuiv_request_t xcb_out;
5705 
5706     xcb_out.context_tag = context_tag;
5707     xcb_out.map = map;
5708 
5709     xcb_parts[2].iov_base = (char *) &xcb_out;
5710     xcb_parts[2].iov_len = sizeof(xcb_out);
5711     xcb_parts[3].iov_base = 0;
5712     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5713 
5714     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5715     return xcb_ret;
5716 }
5717 
5718 xcb_glx_get_pixel_mapuiv_cookie_t
xcb_glx_get_pixel_mapuiv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t map)5719 xcb_glx_get_pixel_mapuiv_unchecked (xcb_connection_t      *c  /**< */,
5720                                     xcb_glx_context_tag_t  context_tag  /**< */,
5721                                     uint32_t               map  /**< */)
5722 {
5723     static const xcb_protocol_request_t xcb_req = {
5724         /* count */ 2,
5725         /* ext */ &xcb_glx_id,
5726         /* opcode */ XCB_GLX_GET_PIXEL_MAPUIV,
5727         /* isvoid */ 0
5728     };
5729 
5730     struct iovec xcb_parts[4];
5731     xcb_glx_get_pixel_mapuiv_cookie_t xcb_ret;
5732     xcb_glx_get_pixel_mapuiv_request_t xcb_out;
5733 
5734     xcb_out.context_tag = context_tag;
5735     xcb_out.map = map;
5736 
5737     xcb_parts[2].iov_base = (char *) &xcb_out;
5738     xcb_parts[2].iov_len = sizeof(xcb_out);
5739     xcb_parts[3].iov_base = 0;
5740     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5741 
5742     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5743     return xcb_ret;
5744 }
5745 
5746 uint32_t *
xcb_glx_get_pixel_mapuiv_data(const xcb_glx_get_pixel_mapuiv_reply_t * R)5747 xcb_glx_get_pixel_mapuiv_data (const xcb_glx_get_pixel_mapuiv_reply_t *R  /**< */)
5748 {
5749     return (uint32_t *) (R + 1);
5750 }
5751 
5752 int
xcb_glx_get_pixel_mapuiv_data_length(const xcb_glx_get_pixel_mapuiv_reply_t * R)5753 xcb_glx_get_pixel_mapuiv_data_length (const xcb_glx_get_pixel_mapuiv_reply_t *R  /**< */)
5754 {
5755     return R->n;
5756 }
5757 
5758 xcb_generic_iterator_t
xcb_glx_get_pixel_mapuiv_data_end(const xcb_glx_get_pixel_mapuiv_reply_t * R)5759 xcb_glx_get_pixel_mapuiv_data_end (const xcb_glx_get_pixel_mapuiv_reply_t *R  /**< */)
5760 {
5761     xcb_generic_iterator_t i;
5762     i.data = ((uint32_t *) (R + 1)) + (R->n);
5763     i.rem = 0;
5764     i.index = (char *) i.data - (char *) R;
5765     return i;
5766 }
5767 
5768 xcb_glx_get_pixel_mapuiv_reply_t *
xcb_glx_get_pixel_mapuiv_reply(xcb_connection_t * c,xcb_glx_get_pixel_mapuiv_cookie_t cookie,xcb_generic_error_t ** e)5769 xcb_glx_get_pixel_mapuiv_reply (xcb_connection_t                   *c  /**< */,
5770                                 xcb_glx_get_pixel_mapuiv_cookie_t   cookie  /**< */,
5771                                 xcb_generic_error_t               **e  /**< */)
5772 {
5773     return (xcb_glx_get_pixel_mapuiv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5774 }
5775 
5776 int
xcb_glx_get_pixel_mapusv_sizeof(const void * _buffer)5777 xcb_glx_get_pixel_mapusv_sizeof (const void  *_buffer  /**< */)
5778 {
5779     char *xcb_tmp = (char *)_buffer;
5780     const xcb_glx_get_pixel_mapusv_reply_t *_aux = (xcb_glx_get_pixel_mapusv_reply_t *)_buffer;
5781     unsigned int xcb_buffer_len = 0;
5782     unsigned int xcb_block_len = 0;
5783     unsigned int xcb_pad = 0;
5784     unsigned int xcb_align_to = 0;
5785 
5786 
5787     xcb_block_len += sizeof(xcb_glx_get_pixel_mapusv_reply_t);
5788     xcb_tmp += xcb_block_len;
5789     xcb_buffer_len += xcb_block_len;
5790     xcb_block_len = 0;
5791     /* data */
5792     xcb_block_len += _aux->n * sizeof(uint16_t);
5793     xcb_tmp += xcb_block_len;
5794     xcb_align_to = ALIGNOF(uint16_t);
5795     /* insert padding */
5796     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5797     xcb_buffer_len += xcb_block_len + xcb_pad;
5798     if (0 != xcb_pad) {
5799         xcb_tmp += xcb_pad;
5800         xcb_pad = 0;
5801     }
5802     xcb_block_len = 0;
5803 
5804     return xcb_buffer_len;
5805 }
5806 
5807 xcb_glx_get_pixel_mapusv_cookie_t
xcb_glx_get_pixel_mapusv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t map)5808 xcb_glx_get_pixel_mapusv (xcb_connection_t      *c  /**< */,
5809                           xcb_glx_context_tag_t  context_tag  /**< */,
5810                           uint32_t               map  /**< */)
5811 {
5812     static const xcb_protocol_request_t xcb_req = {
5813         /* count */ 2,
5814         /* ext */ &xcb_glx_id,
5815         /* opcode */ XCB_GLX_GET_PIXEL_MAPUSV,
5816         /* isvoid */ 0
5817     };
5818 
5819     struct iovec xcb_parts[4];
5820     xcb_glx_get_pixel_mapusv_cookie_t xcb_ret;
5821     xcb_glx_get_pixel_mapusv_request_t xcb_out;
5822 
5823     xcb_out.context_tag = context_tag;
5824     xcb_out.map = map;
5825 
5826     xcb_parts[2].iov_base = (char *) &xcb_out;
5827     xcb_parts[2].iov_len = sizeof(xcb_out);
5828     xcb_parts[3].iov_base = 0;
5829     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5830 
5831     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5832     return xcb_ret;
5833 }
5834 
5835 xcb_glx_get_pixel_mapusv_cookie_t
xcb_glx_get_pixel_mapusv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t map)5836 xcb_glx_get_pixel_mapusv_unchecked (xcb_connection_t      *c  /**< */,
5837                                     xcb_glx_context_tag_t  context_tag  /**< */,
5838                                     uint32_t               map  /**< */)
5839 {
5840     static const xcb_protocol_request_t xcb_req = {
5841         /* count */ 2,
5842         /* ext */ &xcb_glx_id,
5843         /* opcode */ XCB_GLX_GET_PIXEL_MAPUSV,
5844         /* isvoid */ 0
5845     };
5846 
5847     struct iovec xcb_parts[4];
5848     xcb_glx_get_pixel_mapusv_cookie_t xcb_ret;
5849     xcb_glx_get_pixel_mapusv_request_t xcb_out;
5850 
5851     xcb_out.context_tag = context_tag;
5852     xcb_out.map = map;
5853 
5854     xcb_parts[2].iov_base = (char *) &xcb_out;
5855     xcb_parts[2].iov_len = sizeof(xcb_out);
5856     xcb_parts[3].iov_base = 0;
5857     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5858 
5859     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5860     return xcb_ret;
5861 }
5862 
5863 uint16_t *
xcb_glx_get_pixel_mapusv_data(const xcb_glx_get_pixel_mapusv_reply_t * R)5864 xcb_glx_get_pixel_mapusv_data (const xcb_glx_get_pixel_mapusv_reply_t *R  /**< */)
5865 {
5866     return (uint16_t *) (R + 1);
5867 }
5868 
5869 int
xcb_glx_get_pixel_mapusv_data_length(const xcb_glx_get_pixel_mapusv_reply_t * R)5870 xcb_glx_get_pixel_mapusv_data_length (const xcb_glx_get_pixel_mapusv_reply_t *R  /**< */)
5871 {
5872     return R->n;
5873 }
5874 
5875 xcb_generic_iterator_t
xcb_glx_get_pixel_mapusv_data_end(const xcb_glx_get_pixel_mapusv_reply_t * R)5876 xcb_glx_get_pixel_mapusv_data_end (const xcb_glx_get_pixel_mapusv_reply_t *R  /**< */)
5877 {
5878     xcb_generic_iterator_t i;
5879     i.data = ((uint16_t *) (R + 1)) + (R->n);
5880     i.rem = 0;
5881     i.index = (char *) i.data - (char *) R;
5882     return i;
5883 }
5884 
5885 xcb_glx_get_pixel_mapusv_reply_t *
xcb_glx_get_pixel_mapusv_reply(xcb_connection_t * c,xcb_glx_get_pixel_mapusv_cookie_t cookie,xcb_generic_error_t ** e)5886 xcb_glx_get_pixel_mapusv_reply (xcb_connection_t                   *c  /**< */,
5887                                 xcb_glx_get_pixel_mapusv_cookie_t   cookie  /**< */,
5888                                 xcb_generic_error_t               **e  /**< */)
5889 {
5890     return (xcb_glx_get_pixel_mapusv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
5891 }
5892 
5893 int
xcb_glx_get_polygon_stipple_sizeof(const void * _buffer)5894 xcb_glx_get_polygon_stipple_sizeof (const void  *_buffer  /**< */)
5895 {
5896     char *xcb_tmp = (char *)_buffer;
5897     const xcb_glx_get_polygon_stipple_reply_t *_aux = (xcb_glx_get_polygon_stipple_reply_t *)_buffer;
5898     unsigned int xcb_buffer_len = 0;
5899     unsigned int xcb_block_len = 0;
5900     unsigned int xcb_pad = 0;
5901     unsigned int xcb_align_to = 0;
5902 
5903 
5904     xcb_block_len += sizeof(xcb_glx_get_polygon_stipple_reply_t);
5905     xcb_tmp += xcb_block_len;
5906     xcb_buffer_len += xcb_block_len;
5907     xcb_block_len = 0;
5908     /* data */
5909     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
5910     xcb_tmp += xcb_block_len;
5911     xcb_align_to = ALIGNOF(uint8_t);
5912     /* insert padding */
5913     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
5914     xcb_buffer_len += xcb_block_len + xcb_pad;
5915     if (0 != xcb_pad) {
5916         xcb_tmp += xcb_pad;
5917         xcb_pad = 0;
5918     }
5919     xcb_block_len = 0;
5920 
5921     return xcb_buffer_len;
5922 }
5923 
5924 xcb_glx_get_polygon_stipple_cookie_t
xcb_glx_get_polygon_stipple(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint8_t lsb_first)5925 xcb_glx_get_polygon_stipple (xcb_connection_t      *c  /**< */,
5926                              xcb_glx_context_tag_t  context_tag  /**< */,
5927                              uint8_t                lsb_first  /**< */)
5928 {
5929     static const xcb_protocol_request_t xcb_req = {
5930         /* count */ 2,
5931         /* ext */ &xcb_glx_id,
5932         /* opcode */ XCB_GLX_GET_POLYGON_STIPPLE,
5933         /* isvoid */ 0
5934     };
5935 
5936     struct iovec xcb_parts[4];
5937     xcb_glx_get_polygon_stipple_cookie_t xcb_ret;
5938     xcb_glx_get_polygon_stipple_request_t xcb_out;
5939 
5940     xcb_out.context_tag = context_tag;
5941     xcb_out.lsb_first = lsb_first;
5942 
5943     xcb_parts[2].iov_base = (char *) &xcb_out;
5944     xcb_parts[2].iov_len = sizeof(xcb_out);
5945     xcb_parts[3].iov_base = 0;
5946     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5947 
5948     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
5949     return xcb_ret;
5950 }
5951 
5952 xcb_glx_get_polygon_stipple_cookie_t
xcb_glx_get_polygon_stipple_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint8_t lsb_first)5953 xcb_glx_get_polygon_stipple_unchecked (xcb_connection_t      *c  /**< */,
5954                                        xcb_glx_context_tag_t  context_tag  /**< */,
5955                                        uint8_t                lsb_first  /**< */)
5956 {
5957     static const xcb_protocol_request_t xcb_req = {
5958         /* count */ 2,
5959         /* ext */ &xcb_glx_id,
5960         /* opcode */ XCB_GLX_GET_POLYGON_STIPPLE,
5961         /* isvoid */ 0
5962     };
5963 
5964     struct iovec xcb_parts[4];
5965     xcb_glx_get_polygon_stipple_cookie_t xcb_ret;
5966     xcb_glx_get_polygon_stipple_request_t xcb_out;
5967 
5968     xcb_out.context_tag = context_tag;
5969     xcb_out.lsb_first = lsb_first;
5970 
5971     xcb_parts[2].iov_base = (char *) &xcb_out;
5972     xcb_parts[2].iov_len = sizeof(xcb_out);
5973     xcb_parts[3].iov_base = 0;
5974     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
5975 
5976     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
5977     return xcb_ret;
5978 }
5979 
5980 uint8_t *
xcb_glx_get_polygon_stipple_data(const xcb_glx_get_polygon_stipple_reply_t * R)5981 xcb_glx_get_polygon_stipple_data (const xcb_glx_get_polygon_stipple_reply_t *R  /**< */)
5982 {
5983     return (uint8_t *) (R + 1);
5984 }
5985 
5986 int
xcb_glx_get_polygon_stipple_data_length(const xcb_glx_get_polygon_stipple_reply_t * R)5987 xcb_glx_get_polygon_stipple_data_length (const xcb_glx_get_polygon_stipple_reply_t *R  /**< */)
5988 {
5989     return (R->length * 4);
5990 }
5991 
5992 xcb_generic_iterator_t
xcb_glx_get_polygon_stipple_data_end(const xcb_glx_get_polygon_stipple_reply_t * R)5993 xcb_glx_get_polygon_stipple_data_end (const xcb_glx_get_polygon_stipple_reply_t *R  /**< */)
5994 {
5995     xcb_generic_iterator_t i;
5996     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
5997     i.rem = 0;
5998     i.index = (char *) i.data - (char *) R;
5999     return i;
6000 }
6001 
6002 xcb_glx_get_polygon_stipple_reply_t *
xcb_glx_get_polygon_stipple_reply(xcb_connection_t * c,xcb_glx_get_polygon_stipple_cookie_t cookie,xcb_generic_error_t ** e)6003 xcb_glx_get_polygon_stipple_reply (xcb_connection_t                      *c  /**< */,
6004                                    xcb_glx_get_polygon_stipple_cookie_t   cookie  /**< */,
6005                                    xcb_generic_error_t                  **e  /**< */)
6006 {
6007     return (xcb_glx_get_polygon_stipple_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6008 }
6009 
6010 int
xcb_glx_get_string_sizeof(const void * _buffer)6011 xcb_glx_get_string_sizeof (const void  *_buffer  /**< */)
6012 {
6013     char *xcb_tmp = (char *)_buffer;
6014     const xcb_glx_get_string_reply_t *_aux = (xcb_glx_get_string_reply_t *)_buffer;
6015     unsigned int xcb_buffer_len = 0;
6016     unsigned int xcb_block_len = 0;
6017     unsigned int xcb_pad = 0;
6018     unsigned int xcb_align_to = 0;
6019 
6020 
6021     xcb_block_len += sizeof(xcb_glx_get_string_reply_t);
6022     xcb_tmp += xcb_block_len;
6023     xcb_buffer_len += xcb_block_len;
6024     xcb_block_len = 0;
6025     /* string */
6026     xcb_block_len += _aux->n * sizeof(char);
6027     xcb_tmp += xcb_block_len;
6028     xcb_align_to = ALIGNOF(char);
6029     /* insert padding */
6030     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6031     xcb_buffer_len += xcb_block_len + xcb_pad;
6032     if (0 != xcb_pad) {
6033         xcb_tmp += xcb_pad;
6034         xcb_pad = 0;
6035     }
6036     xcb_block_len = 0;
6037 
6038     return xcb_buffer_len;
6039 }
6040 
6041 xcb_glx_get_string_cookie_t
xcb_glx_get_string(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t name)6042 xcb_glx_get_string (xcb_connection_t      *c  /**< */,
6043                     xcb_glx_context_tag_t  context_tag  /**< */,
6044                     uint32_t               name  /**< */)
6045 {
6046     static const xcb_protocol_request_t xcb_req = {
6047         /* count */ 2,
6048         /* ext */ &xcb_glx_id,
6049         /* opcode */ XCB_GLX_GET_STRING,
6050         /* isvoid */ 0
6051     };
6052 
6053     struct iovec xcb_parts[4];
6054     xcb_glx_get_string_cookie_t xcb_ret;
6055     xcb_glx_get_string_request_t xcb_out;
6056 
6057     xcb_out.context_tag = context_tag;
6058     xcb_out.name = name;
6059 
6060     xcb_parts[2].iov_base = (char *) &xcb_out;
6061     xcb_parts[2].iov_len = sizeof(xcb_out);
6062     xcb_parts[3].iov_base = 0;
6063     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6064 
6065     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6066     return xcb_ret;
6067 }
6068 
6069 xcb_glx_get_string_cookie_t
xcb_glx_get_string_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t name)6070 xcb_glx_get_string_unchecked (xcb_connection_t      *c  /**< */,
6071                               xcb_glx_context_tag_t  context_tag  /**< */,
6072                               uint32_t               name  /**< */)
6073 {
6074     static const xcb_protocol_request_t xcb_req = {
6075         /* count */ 2,
6076         /* ext */ &xcb_glx_id,
6077         /* opcode */ XCB_GLX_GET_STRING,
6078         /* isvoid */ 0
6079     };
6080 
6081     struct iovec xcb_parts[4];
6082     xcb_glx_get_string_cookie_t xcb_ret;
6083     xcb_glx_get_string_request_t xcb_out;
6084 
6085     xcb_out.context_tag = context_tag;
6086     xcb_out.name = name;
6087 
6088     xcb_parts[2].iov_base = (char *) &xcb_out;
6089     xcb_parts[2].iov_len = sizeof(xcb_out);
6090     xcb_parts[3].iov_base = 0;
6091     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6092 
6093     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6094     return xcb_ret;
6095 }
6096 
6097 char *
xcb_glx_get_string_string(const xcb_glx_get_string_reply_t * R)6098 xcb_glx_get_string_string (const xcb_glx_get_string_reply_t *R  /**< */)
6099 {
6100     return (char *) (R + 1);
6101 }
6102 
6103 int
xcb_glx_get_string_string_length(const xcb_glx_get_string_reply_t * R)6104 xcb_glx_get_string_string_length (const xcb_glx_get_string_reply_t *R  /**< */)
6105 {
6106     return R->n;
6107 }
6108 
6109 xcb_generic_iterator_t
xcb_glx_get_string_string_end(const xcb_glx_get_string_reply_t * R)6110 xcb_glx_get_string_string_end (const xcb_glx_get_string_reply_t *R  /**< */)
6111 {
6112     xcb_generic_iterator_t i;
6113     i.data = ((char *) (R + 1)) + (R->n);
6114     i.rem = 0;
6115     i.index = (char *) i.data - (char *) R;
6116     return i;
6117 }
6118 
6119 xcb_glx_get_string_reply_t *
xcb_glx_get_string_reply(xcb_connection_t * c,xcb_glx_get_string_cookie_t cookie,xcb_generic_error_t ** e)6120 xcb_glx_get_string_reply (xcb_connection_t             *c  /**< */,
6121                           xcb_glx_get_string_cookie_t   cookie  /**< */,
6122                           xcb_generic_error_t         **e  /**< */)
6123 {
6124     return (xcb_glx_get_string_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6125 }
6126 
6127 int
xcb_glx_get_tex_envfv_sizeof(const void * _buffer)6128 xcb_glx_get_tex_envfv_sizeof (const void  *_buffer  /**< */)
6129 {
6130     char *xcb_tmp = (char *)_buffer;
6131     const xcb_glx_get_tex_envfv_reply_t *_aux = (xcb_glx_get_tex_envfv_reply_t *)_buffer;
6132     unsigned int xcb_buffer_len = 0;
6133     unsigned int xcb_block_len = 0;
6134     unsigned int xcb_pad = 0;
6135     unsigned int xcb_align_to = 0;
6136 
6137 
6138     xcb_block_len += sizeof(xcb_glx_get_tex_envfv_reply_t);
6139     xcb_tmp += xcb_block_len;
6140     xcb_buffer_len += xcb_block_len;
6141     xcb_block_len = 0;
6142     /* data */
6143     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
6144     xcb_tmp += xcb_block_len;
6145     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
6146     /* insert padding */
6147     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6148     xcb_buffer_len += xcb_block_len + xcb_pad;
6149     if (0 != xcb_pad) {
6150         xcb_tmp += xcb_pad;
6151         xcb_pad = 0;
6152     }
6153     xcb_block_len = 0;
6154 
6155     return xcb_buffer_len;
6156 }
6157 
6158 xcb_glx_get_tex_envfv_cookie_t
xcb_glx_get_tex_envfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)6159 xcb_glx_get_tex_envfv (xcb_connection_t      *c  /**< */,
6160                        xcb_glx_context_tag_t  context_tag  /**< */,
6161                        uint32_t               target  /**< */,
6162                        uint32_t               pname  /**< */)
6163 {
6164     static const xcb_protocol_request_t xcb_req = {
6165         /* count */ 2,
6166         /* ext */ &xcb_glx_id,
6167         /* opcode */ XCB_GLX_GET_TEX_ENVFV,
6168         /* isvoid */ 0
6169     };
6170 
6171     struct iovec xcb_parts[4];
6172     xcb_glx_get_tex_envfv_cookie_t xcb_ret;
6173     xcb_glx_get_tex_envfv_request_t xcb_out;
6174 
6175     xcb_out.context_tag = context_tag;
6176     xcb_out.target = target;
6177     xcb_out.pname = pname;
6178 
6179     xcb_parts[2].iov_base = (char *) &xcb_out;
6180     xcb_parts[2].iov_len = sizeof(xcb_out);
6181     xcb_parts[3].iov_base = 0;
6182     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6183 
6184     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6185     return xcb_ret;
6186 }
6187 
6188 xcb_glx_get_tex_envfv_cookie_t
xcb_glx_get_tex_envfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)6189 xcb_glx_get_tex_envfv_unchecked (xcb_connection_t      *c  /**< */,
6190                                  xcb_glx_context_tag_t  context_tag  /**< */,
6191                                  uint32_t               target  /**< */,
6192                                  uint32_t               pname  /**< */)
6193 {
6194     static const xcb_protocol_request_t xcb_req = {
6195         /* count */ 2,
6196         /* ext */ &xcb_glx_id,
6197         /* opcode */ XCB_GLX_GET_TEX_ENVFV,
6198         /* isvoid */ 0
6199     };
6200 
6201     struct iovec xcb_parts[4];
6202     xcb_glx_get_tex_envfv_cookie_t xcb_ret;
6203     xcb_glx_get_tex_envfv_request_t xcb_out;
6204 
6205     xcb_out.context_tag = context_tag;
6206     xcb_out.target = target;
6207     xcb_out.pname = pname;
6208 
6209     xcb_parts[2].iov_base = (char *) &xcb_out;
6210     xcb_parts[2].iov_len = sizeof(xcb_out);
6211     xcb_parts[3].iov_base = 0;
6212     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6213 
6214     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6215     return xcb_ret;
6216 }
6217 
6218 xcb_glx_float32_t *
xcb_glx_get_tex_envfv_data(const xcb_glx_get_tex_envfv_reply_t * R)6219 xcb_glx_get_tex_envfv_data (const xcb_glx_get_tex_envfv_reply_t *R  /**< */)
6220 {
6221     return (xcb_glx_float32_t *) (R + 1);
6222 }
6223 
6224 int
xcb_glx_get_tex_envfv_data_length(const xcb_glx_get_tex_envfv_reply_t * R)6225 xcb_glx_get_tex_envfv_data_length (const xcb_glx_get_tex_envfv_reply_t *R  /**< */)
6226 {
6227     return R->n;
6228 }
6229 
6230 xcb_generic_iterator_t
xcb_glx_get_tex_envfv_data_end(const xcb_glx_get_tex_envfv_reply_t * R)6231 xcb_glx_get_tex_envfv_data_end (const xcb_glx_get_tex_envfv_reply_t *R  /**< */)
6232 {
6233     xcb_generic_iterator_t i;
6234     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
6235     i.rem = 0;
6236     i.index = (char *) i.data - (char *) R;
6237     return i;
6238 }
6239 
6240 xcb_glx_get_tex_envfv_reply_t *
xcb_glx_get_tex_envfv_reply(xcb_connection_t * c,xcb_glx_get_tex_envfv_cookie_t cookie,xcb_generic_error_t ** e)6241 xcb_glx_get_tex_envfv_reply (xcb_connection_t                *c  /**< */,
6242                              xcb_glx_get_tex_envfv_cookie_t   cookie  /**< */,
6243                              xcb_generic_error_t            **e  /**< */)
6244 {
6245     return (xcb_glx_get_tex_envfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6246 }
6247 
6248 int
xcb_glx_get_tex_enviv_sizeof(const void * _buffer)6249 xcb_glx_get_tex_enviv_sizeof (const void  *_buffer  /**< */)
6250 {
6251     char *xcb_tmp = (char *)_buffer;
6252     const xcb_glx_get_tex_enviv_reply_t *_aux = (xcb_glx_get_tex_enviv_reply_t *)_buffer;
6253     unsigned int xcb_buffer_len = 0;
6254     unsigned int xcb_block_len = 0;
6255     unsigned int xcb_pad = 0;
6256     unsigned int xcb_align_to = 0;
6257 
6258 
6259     xcb_block_len += sizeof(xcb_glx_get_tex_enviv_reply_t);
6260     xcb_tmp += xcb_block_len;
6261     xcb_buffer_len += xcb_block_len;
6262     xcb_block_len = 0;
6263     /* data */
6264     xcb_block_len += _aux->n * sizeof(int32_t);
6265     xcb_tmp += xcb_block_len;
6266     xcb_align_to = ALIGNOF(int32_t);
6267     /* insert padding */
6268     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6269     xcb_buffer_len += xcb_block_len + xcb_pad;
6270     if (0 != xcb_pad) {
6271         xcb_tmp += xcb_pad;
6272         xcb_pad = 0;
6273     }
6274     xcb_block_len = 0;
6275 
6276     return xcb_buffer_len;
6277 }
6278 
6279 xcb_glx_get_tex_enviv_cookie_t
xcb_glx_get_tex_enviv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)6280 xcb_glx_get_tex_enviv (xcb_connection_t      *c  /**< */,
6281                        xcb_glx_context_tag_t  context_tag  /**< */,
6282                        uint32_t               target  /**< */,
6283                        uint32_t               pname  /**< */)
6284 {
6285     static const xcb_protocol_request_t xcb_req = {
6286         /* count */ 2,
6287         /* ext */ &xcb_glx_id,
6288         /* opcode */ XCB_GLX_GET_TEX_ENVIV,
6289         /* isvoid */ 0
6290     };
6291 
6292     struct iovec xcb_parts[4];
6293     xcb_glx_get_tex_enviv_cookie_t xcb_ret;
6294     xcb_glx_get_tex_enviv_request_t xcb_out;
6295 
6296     xcb_out.context_tag = context_tag;
6297     xcb_out.target = target;
6298     xcb_out.pname = pname;
6299 
6300     xcb_parts[2].iov_base = (char *) &xcb_out;
6301     xcb_parts[2].iov_len = sizeof(xcb_out);
6302     xcb_parts[3].iov_base = 0;
6303     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6304 
6305     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6306     return xcb_ret;
6307 }
6308 
6309 xcb_glx_get_tex_enviv_cookie_t
xcb_glx_get_tex_enviv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)6310 xcb_glx_get_tex_enviv_unchecked (xcb_connection_t      *c  /**< */,
6311                                  xcb_glx_context_tag_t  context_tag  /**< */,
6312                                  uint32_t               target  /**< */,
6313                                  uint32_t               pname  /**< */)
6314 {
6315     static const xcb_protocol_request_t xcb_req = {
6316         /* count */ 2,
6317         /* ext */ &xcb_glx_id,
6318         /* opcode */ XCB_GLX_GET_TEX_ENVIV,
6319         /* isvoid */ 0
6320     };
6321 
6322     struct iovec xcb_parts[4];
6323     xcb_glx_get_tex_enviv_cookie_t xcb_ret;
6324     xcb_glx_get_tex_enviv_request_t xcb_out;
6325 
6326     xcb_out.context_tag = context_tag;
6327     xcb_out.target = target;
6328     xcb_out.pname = pname;
6329 
6330     xcb_parts[2].iov_base = (char *) &xcb_out;
6331     xcb_parts[2].iov_len = sizeof(xcb_out);
6332     xcb_parts[3].iov_base = 0;
6333     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6334 
6335     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6336     return xcb_ret;
6337 }
6338 
6339 int32_t *
xcb_glx_get_tex_enviv_data(const xcb_glx_get_tex_enviv_reply_t * R)6340 xcb_glx_get_tex_enviv_data (const xcb_glx_get_tex_enviv_reply_t *R  /**< */)
6341 {
6342     return (int32_t *) (R + 1);
6343 }
6344 
6345 int
xcb_glx_get_tex_enviv_data_length(const xcb_glx_get_tex_enviv_reply_t * R)6346 xcb_glx_get_tex_enviv_data_length (const xcb_glx_get_tex_enviv_reply_t *R  /**< */)
6347 {
6348     return R->n;
6349 }
6350 
6351 xcb_generic_iterator_t
xcb_glx_get_tex_enviv_data_end(const xcb_glx_get_tex_enviv_reply_t * R)6352 xcb_glx_get_tex_enviv_data_end (const xcb_glx_get_tex_enviv_reply_t *R  /**< */)
6353 {
6354     xcb_generic_iterator_t i;
6355     i.data = ((int32_t *) (R + 1)) + (R->n);
6356     i.rem = 0;
6357     i.index = (char *) i.data - (char *) R;
6358     return i;
6359 }
6360 
6361 xcb_glx_get_tex_enviv_reply_t *
xcb_glx_get_tex_enviv_reply(xcb_connection_t * c,xcb_glx_get_tex_enviv_cookie_t cookie,xcb_generic_error_t ** e)6362 xcb_glx_get_tex_enviv_reply (xcb_connection_t                *c  /**< */,
6363                              xcb_glx_get_tex_enviv_cookie_t   cookie  /**< */,
6364                              xcb_generic_error_t            **e  /**< */)
6365 {
6366     return (xcb_glx_get_tex_enviv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6367 }
6368 
6369 int
xcb_glx_get_tex_gendv_sizeof(const void * _buffer)6370 xcb_glx_get_tex_gendv_sizeof (const void  *_buffer  /**< */)
6371 {
6372     char *xcb_tmp = (char *)_buffer;
6373     const xcb_glx_get_tex_gendv_reply_t *_aux = (xcb_glx_get_tex_gendv_reply_t *)_buffer;
6374     unsigned int xcb_buffer_len = 0;
6375     unsigned int xcb_block_len = 0;
6376     unsigned int xcb_pad = 0;
6377     unsigned int xcb_align_to = 0;
6378 
6379 
6380     xcb_block_len += sizeof(xcb_glx_get_tex_gendv_reply_t);
6381     xcb_tmp += xcb_block_len;
6382     xcb_buffer_len += xcb_block_len;
6383     xcb_block_len = 0;
6384     /* data */
6385     xcb_block_len += _aux->n * sizeof(xcb_glx_float64_t);
6386     xcb_tmp += xcb_block_len;
6387     xcb_align_to = ALIGNOF(xcb_glx_float64_t);
6388     /* insert padding */
6389     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6390     xcb_buffer_len += xcb_block_len + xcb_pad;
6391     if (0 != xcb_pad) {
6392         xcb_tmp += xcb_pad;
6393         xcb_pad = 0;
6394     }
6395     xcb_block_len = 0;
6396 
6397     return xcb_buffer_len;
6398 }
6399 
6400 xcb_glx_get_tex_gendv_cookie_t
xcb_glx_get_tex_gendv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t coord,uint32_t pname)6401 xcb_glx_get_tex_gendv (xcb_connection_t      *c  /**< */,
6402                        xcb_glx_context_tag_t  context_tag  /**< */,
6403                        uint32_t               coord  /**< */,
6404                        uint32_t               pname  /**< */)
6405 {
6406     static const xcb_protocol_request_t xcb_req = {
6407         /* count */ 2,
6408         /* ext */ &xcb_glx_id,
6409         /* opcode */ XCB_GLX_GET_TEX_GENDV,
6410         /* isvoid */ 0
6411     };
6412 
6413     struct iovec xcb_parts[4];
6414     xcb_glx_get_tex_gendv_cookie_t xcb_ret;
6415     xcb_glx_get_tex_gendv_request_t xcb_out;
6416 
6417     xcb_out.context_tag = context_tag;
6418     xcb_out.coord = coord;
6419     xcb_out.pname = pname;
6420 
6421     xcb_parts[2].iov_base = (char *) &xcb_out;
6422     xcb_parts[2].iov_len = sizeof(xcb_out);
6423     xcb_parts[3].iov_base = 0;
6424     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6425 
6426     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6427     return xcb_ret;
6428 }
6429 
6430 xcb_glx_get_tex_gendv_cookie_t
xcb_glx_get_tex_gendv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t coord,uint32_t pname)6431 xcb_glx_get_tex_gendv_unchecked (xcb_connection_t      *c  /**< */,
6432                                  xcb_glx_context_tag_t  context_tag  /**< */,
6433                                  uint32_t               coord  /**< */,
6434                                  uint32_t               pname  /**< */)
6435 {
6436     static const xcb_protocol_request_t xcb_req = {
6437         /* count */ 2,
6438         /* ext */ &xcb_glx_id,
6439         /* opcode */ XCB_GLX_GET_TEX_GENDV,
6440         /* isvoid */ 0
6441     };
6442 
6443     struct iovec xcb_parts[4];
6444     xcb_glx_get_tex_gendv_cookie_t xcb_ret;
6445     xcb_glx_get_tex_gendv_request_t xcb_out;
6446 
6447     xcb_out.context_tag = context_tag;
6448     xcb_out.coord = coord;
6449     xcb_out.pname = pname;
6450 
6451     xcb_parts[2].iov_base = (char *) &xcb_out;
6452     xcb_parts[2].iov_len = sizeof(xcb_out);
6453     xcb_parts[3].iov_base = 0;
6454     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6455 
6456     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6457     return xcb_ret;
6458 }
6459 
6460 xcb_glx_float64_t *
xcb_glx_get_tex_gendv_data(const xcb_glx_get_tex_gendv_reply_t * R)6461 xcb_glx_get_tex_gendv_data (const xcb_glx_get_tex_gendv_reply_t *R  /**< */)
6462 {
6463     return (xcb_glx_float64_t *) (R + 1);
6464 }
6465 
6466 int
xcb_glx_get_tex_gendv_data_length(const xcb_glx_get_tex_gendv_reply_t * R)6467 xcb_glx_get_tex_gendv_data_length (const xcb_glx_get_tex_gendv_reply_t *R  /**< */)
6468 {
6469     return R->n;
6470 }
6471 
6472 xcb_generic_iterator_t
xcb_glx_get_tex_gendv_data_end(const xcb_glx_get_tex_gendv_reply_t * R)6473 xcb_glx_get_tex_gendv_data_end (const xcb_glx_get_tex_gendv_reply_t *R  /**< */)
6474 {
6475     xcb_generic_iterator_t i;
6476     i.data = ((xcb_glx_float64_t *) (R + 1)) + (R->n);
6477     i.rem = 0;
6478     i.index = (char *) i.data - (char *) R;
6479     return i;
6480 }
6481 
6482 xcb_glx_get_tex_gendv_reply_t *
xcb_glx_get_tex_gendv_reply(xcb_connection_t * c,xcb_glx_get_tex_gendv_cookie_t cookie,xcb_generic_error_t ** e)6483 xcb_glx_get_tex_gendv_reply (xcb_connection_t                *c  /**< */,
6484                              xcb_glx_get_tex_gendv_cookie_t   cookie  /**< */,
6485                              xcb_generic_error_t            **e  /**< */)
6486 {
6487     return (xcb_glx_get_tex_gendv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6488 }
6489 
6490 int
xcb_glx_get_tex_genfv_sizeof(const void * _buffer)6491 xcb_glx_get_tex_genfv_sizeof (const void  *_buffer  /**< */)
6492 {
6493     char *xcb_tmp = (char *)_buffer;
6494     const xcb_glx_get_tex_genfv_reply_t *_aux = (xcb_glx_get_tex_genfv_reply_t *)_buffer;
6495     unsigned int xcb_buffer_len = 0;
6496     unsigned int xcb_block_len = 0;
6497     unsigned int xcb_pad = 0;
6498     unsigned int xcb_align_to = 0;
6499 
6500 
6501     xcb_block_len += sizeof(xcb_glx_get_tex_genfv_reply_t);
6502     xcb_tmp += xcb_block_len;
6503     xcb_buffer_len += xcb_block_len;
6504     xcb_block_len = 0;
6505     /* data */
6506     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
6507     xcb_tmp += xcb_block_len;
6508     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
6509     /* insert padding */
6510     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6511     xcb_buffer_len += xcb_block_len + xcb_pad;
6512     if (0 != xcb_pad) {
6513         xcb_tmp += xcb_pad;
6514         xcb_pad = 0;
6515     }
6516     xcb_block_len = 0;
6517 
6518     return xcb_buffer_len;
6519 }
6520 
6521 xcb_glx_get_tex_genfv_cookie_t
xcb_glx_get_tex_genfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t coord,uint32_t pname)6522 xcb_glx_get_tex_genfv (xcb_connection_t      *c  /**< */,
6523                        xcb_glx_context_tag_t  context_tag  /**< */,
6524                        uint32_t               coord  /**< */,
6525                        uint32_t               pname  /**< */)
6526 {
6527     static const xcb_protocol_request_t xcb_req = {
6528         /* count */ 2,
6529         /* ext */ &xcb_glx_id,
6530         /* opcode */ XCB_GLX_GET_TEX_GENFV,
6531         /* isvoid */ 0
6532     };
6533 
6534     struct iovec xcb_parts[4];
6535     xcb_glx_get_tex_genfv_cookie_t xcb_ret;
6536     xcb_glx_get_tex_genfv_request_t xcb_out;
6537 
6538     xcb_out.context_tag = context_tag;
6539     xcb_out.coord = coord;
6540     xcb_out.pname = pname;
6541 
6542     xcb_parts[2].iov_base = (char *) &xcb_out;
6543     xcb_parts[2].iov_len = sizeof(xcb_out);
6544     xcb_parts[3].iov_base = 0;
6545     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6546 
6547     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6548     return xcb_ret;
6549 }
6550 
6551 xcb_glx_get_tex_genfv_cookie_t
xcb_glx_get_tex_genfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t coord,uint32_t pname)6552 xcb_glx_get_tex_genfv_unchecked (xcb_connection_t      *c  /**< */,
6553                                  xcb_glx_context_tag_t  context_tag  /**< */,
6554                                  uint32_t               coord  /**< */,
6555                                  uint32_t               pname  /**< */)
6556 {
6557     static const xcb_protocol_request_t xcb_req = {
6558         /* count */ 2,
6559         /* ext */ &xcb_glx_id,
6560         /* opcode */ XCB_GLX_GET_TEX_GENFV,
6561         /* isvoid */ 0
6562     };
6563 
6564     struct iovec xcb_parts[4];
6565     xcb_glx_get_tex_genfv_cookie_t xcb_ret;
6566     xcb_glx_get_tex_genfv_request_t xcb_out;
6567 
6568     xcb_out.context_tag = context_tag;
6569     xcb_out.coord = coord;
6570     xcb_out.pname = pname;
6571 
6572     xcb_parts[2].iov_base = (char *) &xcb_out;
6573     xcb_parts[2].iov_len = sizeof(xcb_out);
6574     xcb_parts[3].iov_base = 0;
6575     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6576 
6577     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6578     return xcb_ret;
6579 }
6580 
6581 xcb_glx_float32_t *
xcb_glx_get_tex_genfv_data(const xcb_glx_get_tex_genfv_reply_t * R)6582 xcb_glx_get_tex_genfv_data (const xcb_glx_get_tex_genfv_reply_t *R  /**< */)
6583 {
6584     return (xcb_glx_float32_t *) (R + 1);
6585 }
6586 
6587 int
xcb_glx_get_tex_genfv_data_length(const xcb_glx_get_tex_genfv_reply_t * R)6588 xcb_glx_get_tex_genfv_data_length (const xcb_glx_get_tex_genfv_reply_t *R  /**< */)
6589 {
6590     return R->n;
6591 }
6592 
6593 xcb_generic_iterator_t
xcb_glx_get_tex_genfv_data_end(const xcb_glx_get_tex_genfv_reply_t * R)6594 xcb_glx_get_tex_genfv_data_end (const xcb_glx_get_tex_genfv_reply_t *R  /**< */)
6595 {
6596     xcb_generic_iterator_t i;
6597     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
6598     i.rem = 0;
6599     i.index = (char *) i.data - (char *) R;
6600     return i;
6601 }
6602 
6603 xcb_glx_get_tex_genfv_reply_t *
xcb_glx_get_tex_genfv_reply(xcb_connection_t * c,xcb_glx_get_tex_genfv_cookie_t cookie,xcb_generic_error_t ** e)6604 xcb_glx_get_tex_genfv_reply (xcb_connection_t                *c  /**< */,
6605                              xcb_glx_get_tex_genfv_cookie_t   cookie  /**< */,
6606                              xcb_generic_error_t            **e  /**< */)
6607 {
6608     return (xcb_glx_get_tex_genfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6609 }
6610 
6611 int
xcb_glx_get_tex_geniv_sizeof(const void * _buffer)6612 xcb_glx_get_tex_geniv_sizeof (const void  *_buffer  /**< */)
6613 {
6614     char *xcb_tmp = (char *)_buffer;
6615     const xcb_glx_get_tex_geniv_reply_t *_aux = (xcb_glx_get_tex_geniv_reply_t *)_buffer;
6616     unsigned int xcb_buffer_len = 0;
6617     unsigned int xcb_block_len = 0;
6618     unsigned int xcb_pad = 0;
6619     unsigned int xcb_align_to = 0;
6620 
6621 
6622     xcb_block_len += sizeof(xcb_glx_get_tex_geniv_reply_t);
6623     xcb_tmp += xcb_block_len;
6624     xcb_buffer_len += xcb_block_len;
6625     xcb_block_len = 0;
6626     /* data */
6627     xcb_block_len += _aux->n * sizeof(int32_t);
6628     xcb_tmp += xcb_block_len;
6629     xcb_align_to = ALIGNOF(int32_t);
6630     /* insert padding */
6631     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6632     xcb_buffer_len += xcb_block_len + xcb_pad;
6633     if (0 != xcb_pad) {
6634         xcb_tmp += xcb_pad;
6635         xcb_pad = 0;
6636     }
6637     xcb_block_len = 0;
6638 
6639     return xcb_buffer_len;
6640 }
6641 
6642 xcb_glx_get_tex_geniv_cookie_t
xcb_glx_get_tex_geniv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t coord,uint32_t pname)6643 xcb_glx_get_tex_geniv (xcb_connection_t      *c  /**< */,
6644                        xcb_glx_context_tag_t  context_tag  /**< */,
6645                        uint32_t               coord  /**< */,
6646                        uint32_t               pname  /**< */)
6647 {
6648     static const xcb_protocol_request_t xcb_req = {
6649         /* count */ 2,
6650         /* ext */ &xcb_glx_id,
6651         /* opcode */ XCB_GLX_GET_TEX_GENIV,
6652         /* isvoid */ 0
6653     };
6654 
6655     struct iovec xcb_parts[4];
6656     xcb_glx_get_tex_geniv_cookie_t xcb_ret;
6657     xcb_glx_get_tex_geniv_request_t xcb_out;
6658 
6659     xcb_out.context_tag = context_tag;
6660     xcb_out.coord = coord;
6661     xcb_out.pname = pname;
6662 
6663     xcb_parts[2].iov_base = (char *) &xcb_out;
6664     xcb_parts[2].iov_len = sizeof(xcb_out);
6665     xcb_parts[3].iov_base = 0;
6666     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6667 
6668     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6669     return xcb_ret;
6670 }
6671 
6672 xcb_glx_get_tex_geniv_cookie_t
xcb_glx_get_tex_geniv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t coord,uint32_t pname)6673 xcb_glx_get_tex_geniv_unchecked (xcb_connection_t      *c  /**< */,
6674                                  xcb_glx_context_tag_t  context_tag  /**< */,
6675                                  uint32_t               coord  /**< */,
6676                                  uint32_t               pname  /**< */)
6677 {
6678     static const xcb_protocol_request_t xcb_req = {
6679         /* count */ 2,
6680         /* ext */ &xcb_glx_id,
6681         /* opcode */ XCB_GLX_GET_TEX_GENIV,
6682         /* isvoid */ 0
6683     };
6684 
6685     struct iovec xcb_parts[4];
6686     xcb_glx_get_tex_geniv_cookie_t xcb_ret;
6687     xcb_glx_get_tex_geniv_request_t xcb_out;
6688 
6689     xcb_out.context_tag = context_tag;
6690     xcb_out.coord = coord;
6691     xcb_out.pname = pname;
6692 
6693     xcb_parts[2].iov_base = (char *) &xcb_out;
6694     xcb_parts[2].iov_len = sizeof(xcb_out);
6695     xcb_parts[3].iov_base = 0;
6696     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6697 
6698     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6699     return xcb_ret;
6700 }
6701 
6702 int32_t *
xcb_glx_get_tex_geniv_data(const xcb_glx_get_tex_geniv_reply_t * R)6703 xcb_glx_get_tex_geniv_data (const xcb_glx_get_tex_geniv_reply_t *R  /**< */)
6704 {
6705     return (int32_t *) (R + 1);
6706 }
6707 
6708 int
xcb_glx_get_tex_geniv_data_length(const xcb_glx_get_tex_geniv_reply_t * R)6709 xcb_glx_get_tex_geniv_data_length (const xcb_glx_get_tex_geniv_reply_t *R  /**< */)
6710 {
6711     return R->n;
6712 }
6713 
6714 xcb_generic_iterator_t
xcb_glx_get_tex_geniv_data_end(const xcb_glx_get_tex_geniv_reply_t * R)6715 xcb_glx_get_tex_geniv_data_end (const xcb_glx_get_tex_geniv_reply_t *R  /**< */)
6716 {
6717     xcb_generic_iterator_t i;
6718     i.data = ((int32_t *) (R + 1)) + (R->n);
6719     i.rem = 0;
6720     i.index = (char *) i.data - (char *) R;
6721     return i;
6722 }
6723 
6724 xcb_glx_get_tex_geniv_reply_t *
xcb_glx_get_tex_geniv_reply(xcb_connection_t * c,xcb_glx_get_tex_geniv_cookie_t cookie,xcb_generic_error_t ** e)6725 xcb_glx_get_tex_geniv_reply (xcb_connection_t                *c  /**< */,
6726                              xcb_glx_get_tex_geniv_cookie_t   cookie  /**< */,
6727                              xcb_generic_error_t            **e  /**< */)
6728 {
6729     return (xcb_glx_get_tex_geniv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6730 }
6731 
6732 int
xcb_glx_get_tex_image_sizeof(const void * _buffer)6733 xcb_glx_get_tex_image_sizeof (const void  *_buffer  /**< */)
6734 {
6735     char *xcb_tmp = (char *)_buffer;
6736     const xcb_glx_get_tex_image_reply_t *_aux = (xcb_glx_get_tex_image_reply_t *)_buffer;
6737     unsigned int xcb_buffer_len = 0;
6738     unsigned int xcb_block_len = 0;
6739     unsigned int xcb_pad = 0;
6740     unsigned int xcb_align_to = 0;
6741 
6742 
6743     xcb_block_len += sizeof(xcb_glx_get_tex_image_reply_t);
6744     xcb_tmp += xcb_block_len;
6745     xcb_buffer_len += xcb_block_len;
6746     xcb_block_len = 0;
6747     /* data */
6748     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
6749     xcb_tmp += xcb_block_len;
6750     xcb_align_to = ALIGNOF(uint8_t);
6751     /* insert padding */
6752     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6753     xcb_buffer_len += xcb_block_len + xcb_pad;
6754     if (0 != xcb_pad) {
6755         xcb_tmp += xcb_pad;
6756         xcb_pad = 0;
6757     }
6758     xcb_block_len = 0;
6759 
6760     return xcb_buffer_len;
6761 }
6762 
6763 xcb_glx_get_tex_image_cookie_t
xcb_glx_get_tex_image(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,int32_t level,uint32_t format,uint32_t type,uint8_t swap_bytes)6764 xcb_glx_get_tex_image (xcb_connection_t      *c  /**< */,
6765                        xcb_glx_context_tag_t  context_tag  /**< */,
6766                        uint32_t               target  /**< */,
6767                        int32_t                level  /**< */,
6768                        uint32_t               format  /**< */,
6769                        uint32_t               type  /**< */,
6770                        uint8_t                swap_bytes  /**< */)
6771 {
6772     static const xcb_protocol_request_t xcb_req = {
6773         /* count */ 2,
6774         /* ext */ &xcb_glx_id,
6775         /* opcode */ XCB_GLX_GET_TEX_IMAGE,
6776         /* isvoid */ 0
6777     };
6778 
6779     struct iovec xcb_parts[4];
6780     xcb_glx_get_tex_image_cookie_t xcb_ret;
6781     xcb_glx_get_tex_image_request_t xcb_out;
6782 
6783     xcb_out.context_tag = context_tag;
6784     xcb_out.target = target;
6785     xcb_out.level = level;
6786     xcb_out.format = format;
6787     xcb_out.type = type;
6788     xcb_out.swap_bytes = swap_bytes;
6789 
6790     xcb_parts[2].iov_base = (char *) &xcb_out;
6791     xcb_parts[2].iov_len = sizeof(xcb_out);
6792     xcb_parts[3].iov_base = 0;
6793     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6794 
6795     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6796     return xcb_ret;
6797 }
6798 
6799 xcb_glx_get_tex_image_cookie_t
xcb_glx_get_tex_image_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,int32_t level,uint32_t format,uint32_t type,uint8_t swap_bytes)6800 xcb_glx_get_tex_image_unchecked (xcb_connection_t      *c  /**< */,
6801                                  xcb_glx_context_tag_t  context_tag  /**< */,
6802                                  uint32_t               target  /**< */,
6803                                  int32_t                level  /**< */,
6804                                  uint32_t               format  /**< */,
6805                                  uint32_t               type  /**< */,
6806                                  uint8_t                swap_bytes  /**< */)
6807 {
6808     static const xcb_protocol_request_t xcb_req = {
6809         /* count */ 2,
6810         /* ext */ &xcb_glx_id,
6811         /* opcode */ XCB_GLX_GET_TEX_IMAGE,
6812         /* isvoid */ 0
6813     };
6814 
6815     struct iovec xcb_parts[4];
6816     xcb_glx_get_tex_image_cookie_t xcb_ret;
6817     xcb_glx_get_tex_image_request_t xcb_out;
6818 
6819     xcb_out.context_tag = context_tag;
6820     xcb_out.target = target;
6821     xcb_out.level = level;
6822     xcb_out.format = format;
6823     xcb_out.type = type;
6824     xcb_out.swap_bytes = swap_bytes;
6825 
6826     xcb_parts[2].iov_base = (char *) &xcb_out;
6827     xcb_parts[2].iov_len = sizeof(xcb_out);
6828     xcb_parts[3].iov_base = 0;
6829     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6830 
6831     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6832     return xcb_ret;
6833 }
6834 
6835 uint8_t *
xcb_glx_get_tex_image_data(const xcb_glx_get_tex_image_reply_t * R)6836 xcb_glx_get_tex_image_data (const xcb_glx_get_tex_image_reply_t *R  /**< */)
6837 {
6838     return (uint8_t *) (R + 1);
6839 }
6840 
6841 int
xcb_glx_get_tex_image_data_length(const xcb_glx_get_tex_image_reply_t * R)6842 xcb_glx_get_tex_image_data_length (const xcb_glx_get_tex_image_reply_t *R  /**< */)
6843 {
6844     return (R->length * 4);
6845 }
6846 
6847 xcb_generic_iterator_t
xcb_glx_get_tex_image_data_end(const xcb_glx_get_tex_image_reply_t * R)6848 xcb_glx_get_tex_image_data_end (const xcb_glx_get_tex_image_reply_t *R  /**< */)
6849 {
6850     xcb_generic_iterator_t i;
6851     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
6852     i.rem = 0;
6853     i.index = (char *) i.data - (char *) R;
6854     return i;
6855 }
6856 
6857 xcb_glx_get_tex_image_reply_t *
xcb_glx_get_tex_image_reply(xcb_connection_t * c,xcb_glx_get_tex_image_cookie_t cookie,xcb_generic_error_t ** e)6858 xcb_glx_get_tex_image_reply (xcb_connection_t                *c  /**< */,
6859                              xcb_glx_get_tex_image_cookie_t   cookie  /**< */,
6860                              xcb_generic_error_t            **e  /**< */)
6861 {
6862     return (xcb_glx_get_tex_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6863 }
6864 
6865 int
xcb_glx_get_tex_parameterfv_sizeof(const void * _buffer)6866 xcb_glx_get_tex_parameterfv_sizeof (const void  *_buffer  /**< */)
6867 {
6868     char *xcb_tmp = (char *)_buffer;
6869     const xcb_glx_get_tex_parameterfv_reply_t *_aux = (xcb_glx_get_tex_parameterfv_reply_t *)_buffer;
6870     unsigned int xcb_buffer_len = 0;
6871     unsigned int xcb_block_len = 0;
6872     unsigned int xcb_pad = 0;
6873     unsigned int xcb_align_to = 0;
6874 
6875 
6876     xcb_block_len += sizeof(xcb_glx_get_tex_parameterfv_reply_t);
6877     xcb_tmp += xcb_block_len;
6878     xcb_buffer_len += xcb_block_len;
6879     xcb_block_len = 0;
6880     /* data */
6881     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
6882     xcb_tmp += xcb_block_len;
6883     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
6884     /* insert padding */
6885     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
6886     xcb_buffer_len += xcb_block_len + xcb_pad;
6887     if (0 != xcb_pad) {
6888         xcb_tmp += xcb_pad;
6889         xcb_pad = 0;
6890     }
6891     xcb_block_len = 0;
6892 
6893     return xcb_buffer_len;
6894 }
6895 
6896 xcb_glx_get_tex_parameterfv_cookie_t
xcb_glx_get_tex_parameterfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)6897 xcb_glx_get_tex_parameterfv (xcb_connection_t      *c  /**< */,
6898                              xcb_glx_context_tag_t  context_tag  /**< */,
6899                              uint32_t               target  /**< */,
6900                              uint32_t               pname  /**< */)
6901 {
6902     static const xcb_protocol_request_t xcb_req = {
6903         /* count */ 2,
6904         /* ext */ &xcb_glx_id,
6905         /* opcode */ XCB_GLX_GET_TEX_PARAMETERFV,
6906         /* isvoid */ 0
6907     };
6908 
6909     struct iovec xcb_parts[4];
6910     xcb_glx_get_tex_parameterfv_cookie_t xcb_ret;
6911     xcb_glx_get_tex_parameterfv_request_t xcb_out;
6912 
6913     xcb_out.context_tag = context_tag;
6914     xcb_out.target = target;
6915     xcb_out.pname = pname;
6916 
6917     xcb_parts[2].iov_base = (char *) &xcb_out;
6918     xcb_parts[2].iov_len = sizeof(xcb_out);
6919     xcb_parts[3].iov_base = 0;
6920     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6921 
6922     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
6923     return xcb_ret;
6924 }
6925 
6926 xcb_glx_get_tex_parameterfv_cookie_t
xcb_glx_get_tex_parameterfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)6927 xcb_glx_get_tex_parameterfv_unchecked (xcb_connection_t      *c  /**< */,
6928                                        xcb_glx_context_tag_t  context_tag  /**< */,
6929                                        uint32_t               target  /**< */,
6930                                        uint32_t               pname  /**< */)
6931 {
6932     static const xcb_protocol_request_t xcb_req = {
6933         /* count */ 2,
6934         /* ext */ &xcb_glx_id,
6935         /* opcode */ XCB_GLX_GET_TEX_PARAMETERFV,
6936         /* isvoid */ 0
6937     };
6938 
6939     struct iovec xcb_parts[4];
6940     xcb_glx_get_tex_parameterfv_cookie_t xcb_ret;
6941     xcb_glx_get_tex_parameterfv_request_t xcb_out;
6942 
6943     xcb_out.context_tag = context_tag;
6944     xcb_out.target = target;
6945     xcb_out.pname = pname;
6946 
6947     xcb_parts[2].iov_base = (char *) &xcb_out;
6948     xcb_parts[2].iov_len = sizeof(xcb_out);
6949     xcb_parts[3].iov_base = 0;
6950     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
6951 
6952     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
6953     return xcb_ret;
6954 }
6955 
6956 xcb_glx_float32_t *
xcb_glx_get_tex_parameterfv_data(const xcb_glx_get_tex_parameterfv_reply_t * R)6957 xcb_glx_get_tex_parameterfv_data (const xcb_glx_get_tex_parameterfv_reply_t *R  /**< */)
6958 {
6959     return (xcb_glx_float32_t *) (R + 1);
6960 }
6961 
6962 int
xcb_glx_get_tex_parameterfv_data_length(const xcb_glx_get_tex_parameterfv_reply_t * R)6963 xcb_glx_get_tex_parameterfv_data_length (const xcb_glx_get_tex_parameterfv_reply_t *R  /**< */)
6964 {
6965     return R->n;
6966 }
6967 
6968 xcb_generic_iterator_t
xcb_glx_get_tex_parameterfv_data_end(const xcb_glx_get_tex_parameterfv_reply_t * R)6969 xcb_glx_get_tex_parameterfv_data_end (const xcb_glx_get_tex_parameterfv_reply_t *R  /**< */)
6970 {
6971     xcb_generic_iterator_t i;
6972     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
6973     i.rem = 0;
6974     i.index = (char *) i.data - (char *) R;
6975     return i;
6976 }
6977 
6978 xcb_glx_get_tex_parameterfv_reply_t *
xcb_glx_get_tex_parameterfv_reply(xcb_connection_t * c,xcb_glx_get_tex_parameterfv_cookie_t cookie,xcb_generic_error_t ** e)6979 xcb_glx_get_tex_parameterfv_reply (xcb_connection_t                      *c  /**< */,
6980                                    xcb_glx_get_tex_parameterfv_cookie_t   cookie  /**< */,
6981                                    xcb_generic_error_t                  **e  /**< */)
6982 {
6983     return (xcb_glx_get_tex_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
6984 }
6985 
6986 int
xcb_glx_get_tex_parameteriv_sizeof(const void * _buffer)6987 xcb_glx_get_tex_parameteriv_sizeof (const void  *_buffer  /**< */)
6988 {
6989     char *xcb_tmp = (char *)_buffer;
6990     const xcb_glx_get_tex_parameteriv_reply_t *_aux = (xcb_glx_get_tex_parameteriv_reply_t *)_buffer;
6991     unsigned int xcb_buffer_len = 0;
6992     unsigned int xcb_block_len = 0;
6993     unsigned int xcb_pad = 0;
6994     unsigned int xcb_align_to = 0;
6995 
6996 
6997     xcb_block_len += sizeof(xcb_glx_get_tex_parameteriv_reply_t);
6998     xcb_tmp += xcb_block_len;
6999     xcb_buffer_len += xcb_block_len;
7000     xcb_block_len = 0;
7001     /* data */
7002     xcb_block_len += _aux->n * sizeof(int32_t);
7003     xcb_tmp += xcb_block_len;
7004     xcb_align_to = ALIGNOF(int32_t);
7005     /* insert padding */
7006     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7007     xcb_buffer_len += xcb_block_len + xcb_pad;
7008     if (0 != xcb_pad) {
7009         xcb_tmp += xcb_pad;
7010         xcb_pad = 0;
7011     }
7012     xcb_block_len = 0;
7013 
7014     return xcb_buffer_len;
7015 }
7016 
7017 xcb_glx_get_tex_parameteriv_cookie_t
xcb_glx_get_tex_parameteriv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)7018 xcb_glx_get_tex_parameteriv (xcb_connection_t      *c  /**< */,
7019                              xcb_glx_context_tag_t  context_tag  /**< */,
7020                              uint32_t               target  /**< */,
7021                              uint32_t               pname  /**< */)
7022 {
7023     static const xcb_protocol_request_t xcb_req = {
7024         /* count */ 2,
7025         /* ext */ &xcb_glx_id,
7026         /* opcode */ XCB_GLX_GET_TEX_PARAMETERIV,
7027         /* isvoid */ 0
7028     };
7029 
7030     struct iovec xcb_parts[4];
7031     xcb_glx_get_tex_parameteriv_cookie_t xcb_ret;
7032     xcb_glx_get_tex_parameteriv_request_t xcb_out;
7033 
7034     xcb_out.context_tag = context_tag;
7035     xcb_out.target = target;
7036     xcb_out.pname = pname;
7037 
7038     xcb_parts[2].iov_base = (char *) &xcb_out;
7039     xcb_parts[2].iov_len = sizeof(xcb_out);
7040     xcb_parts[3].iov_base = 0;
7041     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7042 
7043     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7044     return xcb_ret;
7045 }
7046 
7047 xcb_glx_get_tex_parameteriv_cookie_t
xcb_glx_get_tex_parameteriv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)7048 xcb_glx_get_tex_parameteriv_unchecked (xcb_connection_t      *c  /**< */,
7049                                        xcb_glx_context_tag_t  context_tag  /**< */,
7050                                        uint32_t               target  /**< */,
7051                                        uint32_t               pname  /**< */)
7052 {
7053     static const xcb_protocol_request_t xcb_req = {
7054         /* count */ 2,
7055         /* ext */ &xcb_glx_id,
7056         /* opcode */ XCB_GLX_GET_TEX_PARAMETERIV,
7057         /* isvoid */ 0
7058     };
7059 
7060     struct iovec xcb_parts[4];
7061     xcb_glx_get_tex_parameteriv_cookie_t xcb_ret;
7062     xcb_glx_get_tex_parameteriv_request_t xcb_out;
7063 
7064     xcb_out.context_tag = context_tag;
7065     xcb_out.target = target;
7066     xcb_out.pname = pname;
7067 
7068     xcb_parts[2].iov_base = (char *) &xcb_out;
7069     xcb_parts[2].iov_len = sizeof(xcb_out);
7070     xcb_parts[3].iov_base = 0;
7071     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7072 
7073     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7074     return xcb_ret;
7075 }
7076 
7077 int32_t *
xcb_glx_get_tex_parameteriv_data(const xcb_glx_get_tex_parameteriv_reply_t * R)7078 xcb_glx_get_tex_parameteriv_data (const xcb_glx_get_tex_parameteriv_reply_t *R  /**< */)
7079 {
7080     return (int32_t *) (R + 1);
7081 }
7082 
7083 int
xcb_glx_get_tex_parameteriv_data_length(const xcb_glx_get_tex_parameteriv_reply_t * R)7084 xcb_glx_get_tex_parameteriv_data_length (const xcb_glx_get_tex_parameteriv_reply_t *R  /**< */)
7085 {
7086     return R->n;
7087 }
7088 
7089 xcb_generic_iterator_t
xcb_glx_get_tex_parameteriv_data_end(const xcb_glx_get_tex_parameteriv_reply_t * R)7090 xcb_glx_get_tex_parameteriv_data_end (const xcb_glx_get_tex_parameteriv_reply_t *R  /**< */)
7091 {
7092     xcb_generic_iterator_t i;
7093     i.data = ((int32_t *) (R + 1)) + (R->n);
7094     i.rem = 0;
7095     i.index = (char *) i.data - (char *) R;
7096     return i;
7097 }
7098 
7099 xcb_glx_get_tex_parameteriv_reply_t *
xcb_glx_get_tex_parameteriv_reply(xcb_connection_t * c,xcb_glx_get_tex_parameteriv_cookie_t cookie,xcb_generic_error_t ** e)7100 xcb_glx_get_tex_parameteriv_reply (xcb_connection_t                      *c  /**< */,
7101                                    xcb_glx_get_tex_parameteriv_cookie_t   cookie  /**< */,
7102                                    xcb_generic_error_t                  **e  /**< */)
7103 {
7104     return (xcb_glx_get_tex_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7105 }
7106 
7107 int
xcb_glx_get_tex_level_parameterfv_sizeof(const void * _buffer)7108 xcb_glx_get_tex_level_parameterfv_sizeof (const void  *_buffer  /**< */)
7109 {
7110     char *xcb_tmp = (char *)_buffer;
7111     const xcb_glx_get_tex_level_parameterfv_reply_t *_aux = (xcb_glx_get_tex_level_parameterfv_reply_t *)_buffer;
7112     unsigned int xcb_buffer_len = 0;
7113     unsigned int xcb_block_len = 0;
7114     unsigned int xcb_pad = 0;
7115     unsigned int xcb_align_to = 0;
7116 
7117 
7118     xcb_block_len += sizeof(xcb_glx_get_tex_level_parameterfv_reply_t);
7119     xcb_tmp += xcb_block_len;
7120     xcb_buffer_len += xcb_block_len;
7121     xcb_block_len = 0;
7122     /* data */
7123     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
7124     xcb_tmp += xcb_block_len;
7125     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
7126     /* insert padding */
7127     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7128     xcb_buffer_len += xcb_block_len + xcb_pad;
7129     if (0 != xcb_pad) {
7130         xcb_tmp += xcb_pad;
7131         xcb_pad = 0;
7132     }
7133     xcb_block_len = 0;
7134 
7135     return xcb_buffer_len;
7136 }
7137 
7138 xcb_glx_get_tex_level_parameterfv_cookie_t
xcb_glx_get_tex_level_parameterfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,int32_t level,uint32_t pname)7139 xcb_glx_get_tex_level_parameterfv (xcb_connection_t      *c  /**< */,
7140                                    xcb_glx_context_tag_t  context_tag  /**< */,
7141                                    uint32_t               target  /**< */,
7142                                    int32_t                level  /**< */,
7143                                    uint32_t               pname  /**< */)
7144 {
7145     static const xcb_protocol_request_t xcb_req = {
7146         /* count */ 2,
7147         /* ext */ &xcb_glx_id,
7148         /* opcode */ XCB_GLX_GET_TEX_LEVEL_PARAMETERFV,
7149         /* isvoid */ 0
7150     };
7151 
7152     struct iovec xcb_parts[4];
7153     xcb_glx_get_tex_level_parameterfv_cookie_t xcb_ret;
7154     xcb_glx_get_tex_level_parameterfv_request_t xcb_out;
7155 
7156     xcb_out.context_tag = context_tag;
7157     xcb_out.target = target;
7158     xcb_out.level = level;
7159     xcb_out.pname = pname;
7160 
7161     xcb_parts[2].iov_base = (char *) &xcb_out;
7162     xcb_parts[2].iov_len = sizeof(xcb_out);
7163     xcb_parts[3].iov_base = 0;
7164     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7165 
7166     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7167     return xcb_ret;
7168 }
7169 
7170 xcb_glx_get_tex_level_parameterfv_cookie_t
xcb_glx_get_tex_level_parameterfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,int32_t level,uint32_t pname)7171 xcb_glx_get_tex_level_parameterfv_unchecked (xcb_connection_t      *c  /**< */,
7172                                              xcb_glx_context_tag_t  context_tag  /**< */,
7173                                              uint32_t               target  /**< */,
7174                                              int32_t                level  /**< */,
7175                                              uint32_t               pname  /**< */)
7176 {
7177     static const xcb_protocol_request_t xcb_req = {
7178         /* count */ 2,
7179         /* ext */ &xcb_glx_id,
7180         /* opcode */ XCB_GLX_GET_TEX_LEVEL_PARAMETERFV,
7181         /* isvoid */ 0
7182     };
7183 
7184     struct iovec xcb_parts[4];
7185     xcb_glx_get_tex_level_parameterfv_cookie_t xcb_ret;
7186     xcb_glx_get_tex_level_parameterfv_request_t xcb_out;
7187 
7188     xcb_out.context_tag = context_tag;
7189     xcb_out.target = target;
7190     xcb_out.level = level;
7191     xcb_out.pname = pname;
7192 
7193     xcb_parts[2].iov_base = (char *) &xcb_out;
7194     xcb_parts[2].iov_len = sizeof(xcb_out);
7195     xcb_parts[3].iov_base = 0;
7196     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7197 
7198     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7199     return xcb_ret;
7200 }
7201 
7202 xcb_glx_float32_t *
xcb_glx_get_tex_level_parameterfv_data(const xcb_glx_get_tex_level_parameterfv_reply_t * R)7203 xcb_glx_get_tex_level_parameterfv_data (const xcb_glx_get_tex_level_parameterfv_reply_t *R  /**< */)
7204 {
7205     return (xcb_glx_float32_t *) (R + 1);
7206 }
7207 
7208 int
xcb_glx_get_tex_level_parameterfv_data_length(const xcb_glx_get_tex_level_parameterfv_reply_t * R)7209 xcb_glx_get_tex_level_parameterfv_data_length (const xcb_glx_get_tex_level_parameterfv_reply_t *R  /**< */)
7210 {
7211     return R->n;
7212 }
7213 
7214 xcb_generic_iterator_t
xcb_glx_get_tex_level_parameterfv_data_end(const xcb_glx_get_tex_level_parameterfv_reply_t * R)7215 xcb_glx_get_tex_level_parameterfv_data_end (const xcb_glx_get_tex_level_parameterfv_reply_t *R  /**< */)
7216 {
7217     xcb_generic_iterator_t i;
7218     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
7219     i.rem = 0;
7220     i.index = (char *) i.data - (char *) R;
7221     return i;
7222 }
7223 
7224 xcb_glx_get_tex_level_parameterfv_reply_t *
xcb_glx_get_tex_level_parameterfv_reply(xcb_connection_t * c,xcb_glx_get_tex_level_parameterfv_cookie_t cookie,xcb_generic_error_t ** e)7225 xcb_glx_get_tex_level_parameterfv_reply (xcb_connection_t                            *c  /**< */,
7226                                          xcb_glx_get_tex_level_parameterfv_cookie_t   cookie  /**< */,
7227                                          xcb_generic_error_t                        **e  /**< */)
7228 {
7229     return (xcb_glx_get_tex_level_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7230 }
7231 
7232 int
xcb_glx_get_tex_level_parameteriv_sizeof(const void * _buffer)7233 xcb_glx_get_tex_level_parameteriv_sizeof (const void  *_buffer  /**< */)
7234 {
7235     char *xcb_tmp = (char *)_buffer;
7236     const xcb_glx_get_tex_level_parameteriv_reply_t *_aux = (xcb_glx_get_tex_level_parameteriv_reply_t *)_buffer;
7237     unsigned int xcb_buffer_len = 0;
7238     unsigned int xcb_block_len = 0;
7239     unsigned int xcb_pad = 0;
7240     unsigned int xcb_align_to = 0;
7241 
7242 
7243     xcb_block_len += sizeof(xcb_glx_get_tex_level_parameteriv_reply_t);
7244     xcb_tmp += xcb_block_len;
7245     xcb_buffer_len += xcb_block_len;
7246     xcb_block_len = 0;
7247     /* data */
7248     xcb_block_len += _aux->n * sizeof(int32_t);
7249     xcb_tmp += xcb_block_len;
7250     xcb_align_to = ALIGNOF(int32_t);
7251     /* insert padding */
7252     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7253     xcb_buffer_len += xcb_block_len + xcb_pad;
7254     if (0 != xcb_pad) {
7255         xcb_tmp += xcb_pad;
7256         xcb_pad = 0;
7257     }
7258     xcb_block_len = 0;
7259 
7260     return xcb_buffer_len;
7261 }
7262 
7263 xcb_glx_get_tex_level_parameteriv_cookie_t
xcb_glx_get_tex_level_parameteriv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,int32_t level,uint32_t pname)7264 xcb_glx_get_tex_level_parameteriv (xcb_connection_t      *c  /**< */,
7265                                    xcb_glx_context_tag_t  context_tag  /**< */,
7266                                    uint32_t               target  /**< */,
7267                                    int32_t                level  /**< */,
7268                                    uint32_t               pname  /**< */)
7269 {
7270     static const xcb_protocol_request_t xcb_req = {
7271         /* count */ 2,
7272         /* ext */ &xcb_glx_id,
7273         /* opcode */ XCB_GLX_GET_TEX_LEVEL_PARAMETERIV,
7274         /* isvoid */ 0
7275     };
7276 
7277     struct iovec xcb_parts[4];
7278     xcb_glx_get_tex_level_parameteriv_cookie_t xcb_ret;
7279     xcb_glx_get_tex_level_parameteriv_request_t xcb_out;
7280 
7281     xcb_out.context_tag = context_tag;
7282     xcb_out.target = target;
7283     xcb_out.level = level;
7284     xcb_out.pname = pname;
7285 
7286     xcb_parts[2].iov_base = (char *) &xcb_out;
7287     xcb_parts[2].iov_len = sizeof(xcb_out);
7288     xcb_parts[3].iov_base = 0;
7289     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7290 
7291     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7292     return xcb_ret;
7293 }
7294 
7295 xcb_glx_get_tex_level_parameteriv_cookie_t
xcb_glx_get_tex_level_parameteriv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,int32_t level,uint32_t pname)7296 xcb_glx_get_tex_level_parameteriv_unchecked (xcb_connection_t      *c  /**< */,
7297                                              xcb_glx_context_tag_t  context_tag  /**< */,
7298                                              uint32_t               target  /**< */,
7299                                              int32_t                level  /**< */,
7300                                              uint32_t               pname  /**< */)
7301 {
7302     static const xcb_protocol_request_t xcb_req = {
7303         /* count */ 2,
7304         /* ext */ &xcb_glx_id,
7305         /* opcode */ XCB_GLX_GET_TEX_LEVEL_PARAMETERIV,
7306         /* isvoid */ 0
7307     };
7308 
7309     struct iovec xcb_parts[4];
7310     xcb_glx_get_tex_level_parameteriv_cookie_t xcb_ret;
7311     xcb_glx_get_tex_level_parameteriv_request_t xcb_out;
7312 
7313     xcb_out.context_tag = context_tag;
7314     xcb_out.target = target;
7315     xcb_out.level = level;
7316     xcb_out.pname = pname;
7317 
7318     xcb_parts[2].iov_base = (char *) &xcb_out;
7319     xcb_parts[2].iov_len = sizeof(xcb_out);
7320     xcb_parts[3].iov_base = 0;
7321     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7322 
7323     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7324     return xcb_ret;
7325 }
7326 
7327 int32_t *
xcb_glx_get_tex_level_parameteriv_data(const xcb_glx_get_tex_level_parameteriv_reply_t * R)7328 xcb_glx_get_tex_level_parameteriv_data (const xcb_glx_get_tex_level_parameteriv_reply_t *R  /**< */)
7329 {
7330     return (int32_t *) (R + 1);
7331 }
7332 
7333 int
xcb_glx_get_tex_level_parameteriv_data_length(const xcb_glx_get_tex_level_parameteriv_reply_t * R)7334 xcb_glx_get_tex_level_parameteriv_data_length (const xcb_glx_get_tex_level_parameteriv_reply_t *R  /**< */)
7335 {
7336     return R->n;
7337 }
7338 
7339 xcb_generic_iterator_t
xcb_glx_get_tex_level_parameteriv_data_end(const xcb_glx_get_tex_level_parameteriv_reply_t * R)7340 xcb_glx_get_tex_level_parameteriv_data_end (const xcb_glx_get_tex_level_parameteriv_reply_t *R  /**< */)
7341 {
7342     xcb_generic_iterator_t i;
7343     i.data = ((int32_t *) (R + 1)) + (R->n);
7344     i.rem = 0;
7345     i.index = (char *) i.data - (char *) R;
7346     return i;
7347 }
7348 
7349 xcb_glx_get_tex_level_parameteriv_reply_t *
xcb_glx_get_tex_level_parameteriv_reply(xcb_connection_t * c,xcb_glx_get_tex_level_parameteriv_cookie_t cookie,xcb_generic_error_t ** e)7350 xcb_glx_get_tex_level_parameteriv_reply (xcb_connection_t                            *c  /**< */,
7351                                          xcb_glx_get_tex_level_parameteriv_cookie_t   cookie  /**< */,
7352                                          xcb_generic_error_t                        **e  /**< */)
7353 {
7354     return (xcb_glx_get_tex_level_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7355 }
7356 
7357 xcb_glx_is_list_cookie_t
xcb_glx_is_list(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t list)7358 xcb_glx_is_list (xcb_connection_t      *c  /**< */,
7359                  xcb_glx_context_tag_t  context_tag  /**< */,
7360                  uint32_t               list  /**< */)
7361 {
7362     static const xcb_protocol_request_t xcb_req = {
7363         /* count */ 2,
7364         /* ext */ &xcb_glx_id,
7365         /* opcode */ XCB_GLX_IS_LIST,
7366         /* isvoid */ 0
7367     };
7368 
7369     struct iovec xcb_parts[4];
7370     xcb_glx_is_list_cookie_t xcb_ret;
7371     xcb_glx_is_list_request_t xcb_out;
7372 
7373     xcb_out.context_tag = context_tag;
7374     xcb_out.list = list;
7375 
7376     xcb_parts[2].iov_base = (char *) &xcb_out;
7377     xcb_parts[2].iov_len = sizeof(xcb_out);
7378     xcb_parts[3].iov_base = 0;
7379     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7380 
7381     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7382     return xcb_ret;
7383 }
7384 
7385 xcb_glx_is_list_cookie_t
xcb_glx_is_list_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t list)7386 xcb_glx_is_list_unchecked (xcb_connection_t      *c  /**< */,
7387                            xcb_glx_context_tag_t  context_tag  /**< */,
7388                            uint32_t               list  /**< */)
7389 {
7390     static const xcb_protocol_request_t xcb_req = {
7391         /* count */ 2,
7392         /* ext */ &xcb_glx_id,
7393         /* opcode */ XCB_GLX_IS_LIST,
7394         /* isvoid */ 0
7395     };
7396 
7397     struct iovec xcb_parts[4];
7398     xcb_glx_is_list_cookie_t xcb_ret;
7399     xcb_glx_is_list_request_t xcb_out;
7400 
7401     xcb_out.context_tag = context_tag;
7402     xcb_out.list = list;
7403 
7404     xcb_parts[2].iov_base = (char *) &xcb_out;
7405     xcb_parts[2].iov_len = sizeof(xcb_out);
7406     xcb_parts[3].iov_base = 0;
7407     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7408 
7409     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7410     return xcb_ret;
7411 }
7412 
7413 xcb_glx_is_list_reply_t *
xcb_glx_is_list_reply(xcb_connection_t * c,xcb_glx_is_list_cookie_t cookie,xcb_generic_error_t ** e)7414 xcb_glx_is_list_reply (xcb_connection_t          *c  /**< */,
7415                        xcb_glx_is_list_cookie_t   cookie  /**< */,
7416                        xcb_generic_error_t      **e  /**< */)
7417 {
7418     return (xcb_glx_is_list_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7419 }
7420 
7421 xcb_void_cookie_t
xcb_glx_flush_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)7422 xcb_glx_flush_checked (xcb_connection_t      *c  /**< */,
7423                        xcb_glx_context_tag_t  context_tag  /**< */)
7424 {
7425     static const xcb_protocol_request_t xcb_req = {
7426         /* count */ 2,
7427         /* ext */ &xcb_glx_id,
7428         /* opcode */ XCB_GLX_FLUSH,
7429         /* isvoid */ 1
7430     };
7431 
7432     struct iovec xcb_parts[4];
7433     xcb_void_cookie_t xcb_ret;
7434     xcb_glx_flush_request_t xcb_out;
7435 
7436     xcb_out.context_tag = context_tag;
7437 
7438     xcb_parts[2].iov_base = (char *) &xcb_out;
7439     xcb_parts[2].iov_len = sizeof(xcb_out);
7440     xcb_parts[3].iov_base = 0;
7441     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7442 
7443     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7444     return xcb_ret;
7445 }
7446 
7447 xcb_void_cookie_t
xcb_glx_flush(xcb_connection_t * c,xcb_glx_context_tag_t context_tag)7448 xcb_glx_flush (xcb_connection_t      *c  /**< */,
7449                xcb_glx_context_tag_t  context_tag  /**< */)
7450 {
7451     static const xcb_protocol_request_t xcb_req = {
7452         /* count */ 2,
7453         /* ext */ &xcb_glx_id,
7454         /* opcode */ XCB_GLX_FLUSH,
7455         /* isvoid */ 1
7456     };
7457 
7458     struct iovec xcb_parts[4];
7459     xcb_void_cookie_t xcb_ret;
7460     xcb_glx_flush_request_t xcb_out;
7461 
7462     xcb_out.context_tag = context_tag;
7463 
7464     xcb_parts[2].iov_base = (char *) &xcb_out;
7465     xcb_parts[2].iov_len = sizeof(xcb_out);
7466     xcb_parts[3].iov_base = 0;
7467     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7468 
7469     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7470     return xcb_ret;
7471 }
7472 
7473 int
xcb_glx_are_textures_resident_sizeof(const void * _buffer)7474 xcb_glx_are_textures_resident_sizeof (const void  *_buffer  /**< */)
7475 {
7476     char *xcb_tmp = (char *)_buffer;
7477     const xcb_glx_are_textures_resident_request_t *_aux = (xcb_glx_are_textures_resident_request_t *)_buffer;
7478     unsigned int xcb_buffer_len = 0;
7479     unsigned int xcb_block_len = 0;
7480     unsigned int xcb_pad = 0;
7481     unsigned int xcb_align_to = 0;
7482 
7483 
7484     xcb_block_len += sizeof(xcb_glx_are_textures_resident_request_t);
7485     xcb_tmp += xcb_block_len;
7486     xcb_buffer_len += xcb_block_len;
7487     xcb_block_len = 0;
7488     /* textures */
7489     xcb_block_len += _aux->n * sizeof(uint32_t);
7490     xcb_tmp += xcb_block_len;
7491     xcb_align_to = ALIGNOF(uint32_t);
7492     /* insert padding */
7493     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7494     xcb_buffer_len += xcb_block_len + xcb_pad;
7495     if (0 != xcb_pad) {
7496         xcb_tmp += xcb_pad;
7497         xcb_pad = 0;
7498     }
7499     xcb_block_len = 0;
7500 
7501     return xcb_buffer_len;
7502 }
7503 
7504 xcb_glx_are_textures_resident_cookie_t
xcb_glx_are_textures_resident(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n,const uint32_t * textures)7505 xcb_glx_are_textures_resident (xcb_connection_t      *c  /**< */,
7506                                xcb_glx_context_tag_t  context_tag  /**< */,
7507                                int32_t                n  /**< */,
7508                                const uint32_t        *textures  /**< */)
7509 {
7510     static const xcb_protocol_request_t xcb_req = {
7511         /* count */ 4,
7512         /* ext */ &xcb_glx_id,
7513         /* opcode */ XCB_GLX_ARE_TEXTURES_RESIDENT,
7514         /* isvoid */ 0
7515     };
7516 
7517     struct iovec xcb_parts[6];
7518     xcb_glx_are_textures_resident_cookie_t xcb_ret;
7519     xcb_glx_are_textures_resident_request_t xcb_out;
7520 
7521     xcb_out.context_tag = context_tag;
7522     xcb_out.n = n;
7523 
7524     xcb_parts[2].iov_base = (char *) &xcb_out;
7525     xcb_parts[2].iov_len = sizeof(xcb_out);
7526     xcb_parts[3].iov_base = 0;
7527     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7528     /* uint32_t textures */
7529     xcb_parts[4].iov_base = (char *) textures;
7530     xcb_parts[4].iov_len = n * sizeof(xcb_glx_bool32_t);
7531     xcb_parts[5].iov_base = 0;
7532     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7533 
7534     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7535     return xcb_ret;
7536 }
7537 
7538 xcb_glx_are_textures_resident_cookie_t
xcb_glx_are_textures_resident_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n,const uint32_t * textures)7539 xcb_glx_are_textures_resident_unchecked (xcb_connection_t      *c  /**< */,
7540                                          xcb_glx_context_tag_t  context_tag  /**< */,
7541                                          int32_t                n  /**< */,
7542                                          const uint32_t        *textures  /**< */)
7543 {
7544     static const xcb_protocol_request_t xcb_req = {
7545         /* count */ 4,
7546         /* ext */ &xcb_glx_id,
7547         /* opcode */ XCB_GLX_ARE_TEXTURES_RESIDENT,
7548         /* isvoid */ 0
7549     };
7550 
7551     struct iovec xcb_parts[6];
7552     xcb_glx_are_textures_resident_cookie_t xcb_ret;
7553     xcb_glx_are_textures_resident_request_t xcb_out;
7554 
7555     xcb_out.context_tag = context_tag;
7556     xcb_out.n = n;
7557 
7558     xcb_parts[2].iov_base = (char *) &xcb_out;
7559     xcb_parts[2].iov_len = sizeof(xcb_out);
7560     xcb_parts[3].iov_base = 0;
7561     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7562     /* uint32_t textures */
7563     xcb_parts[4].iov_base = (char *) textures;
7564     xcb_parts[4].iov_len = n * sizeof(xcb_glx_bool32_t);
7565     xcb_parts[5].iov_base = 0;
7566     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7567 
7568     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7569     return xcb_ret;
7570 }
7571 
7572 uint8_t *
xcb_glx_are_textures_resident_data(const xcb_glx_are_textures_resident_reply_t * R)7573 xcb_glx_are_textures_resident_data (const xcb_glx_are_textures_resident_reply_t *R  /**< */)
7574 {
7575     return (uint8_t *) (R + 1);
7576 }
7577 
7578 int
xcb_glx_are_textures_resident_data_length(const xcb_glx_are_textures_resident_reply_t * R)7579 xcb_glx_are_textures_resident_data_length (const xcb_glx_are_textures_resident_reply_t *R  /**< */)
7580 {
7581     return (R->length * 4);
7582 }
7583 
7584 xcb_generic_iterator_t
xcb_glx_are_textures_resident_data_end(const xcb_glx_are_textures_resident_reply_t * R)7585 xcb_glx_are_textures_resident_data_end (const xcb_glx_are_textures_resident_reply_t *R  /**< */)
7586 {
7587     xcb_generic_iterator_t i;
7588     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
7589     i.rem = 0;
7590     i.index = (char *) i.data - (char *) R;
7591     return i;
7592 }
7593 
7594 xcb_glx_are_textures_resident_reply_t *
xcb_glx_are_textures_resident_reply(xcb_connection_t * c,xcb_glx_are_textures_resident_cookie_t cookie,xcb_generic_error_t ** e)7595 xcb_glx_are_textures_resident_reply (xcb_connection_t                        *c  /**< */,
7596                                      xcb_glx_are_textures_resident_cookie_t   cookie  /**< */,
7597                                      xcb_generic_error_t                    **e  /**< */)
7598 {
7599     return (xcb_glx_are_textures_resident_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7600 }
7601 
7602 int
xcb_glx_delete_textures_sizeof(const void * _buffer)7603 xcb_glx_delete_textures_sizeof (const void  *_buffer  /**< */)
7604 {
7605     char *xcb_tmp = (char *)_buffer;
7606     const xcb_glx_delete_textures_request_t *_aux = (xcb_glx_delete_textures_request_t *)_buffer;
7607     unsigned int xcb_buffer_len = 0;
7608     unsigned int xcb_block_len = 0;
7609     unsigned int xcb_pad = 0;
7610     unsigned int xcb_align_to = 0;
7611 
7612 
7613     xcb_block_len += sizeof(xcb_glx_delete_textures_request_t);
7614     xcb_tmp += xcb_block_len;
7615     xcb_buffer_len += xcb_block_len;
7616     xcb_block_len = 0;
7617     /* textures */
7618     xcb_block_len += _aux->n * sizeof(uint32_t);
7619     xcb_tmp += xcb_block_len;
7620     xcb_align_to = ALIGNOF(uint32_t);
7621     /* insert padding */
7622     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7623     xcb_buffer_len += xcb_block_len + xcb_pad;
7624     if (0 != xcb_pad) {
7625         xcb_tmp += xcb_pad;
7626         xcb_pad = 0;
7627     }
7628     xcb_block_len = 0;
7629 
7630     return xcb_buffer_len;
7631 }
7632 
7633 xcb_void_cookie_t
xcb_glx_delete_textures_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n,const uint32_t * textures)7634 xcb_glx_delete_textures_checked (xcb_connection_t      *c  /**< */,
7635                                  xcb_glx_context_tag_t  context_tag  /**< */,
7636                                  int32_t                n  /**< */,
7637                                  const uint32_t        *textures  /**< */)
7638 {
7639     static const xcb_protocol_request_t xcb_req = {
7640         /* count */ 4,
7641         /* ext */ &xcb_glx_id,
7642         /* opcode */ XCB_GLX_DELETE_TEXTURES,
7643         /* isvoid */ 1
7644     };
7645 
7646     struct iovec xcb_parts[6];
7647     xcb_void_cookie_t xcb_ret;
7648     xcb_glx_delete_textures_request_t xcb_out;
7649 
7650     xcb_out.context_tag = context_tag;
7651     xcb_out.n = n;
7652 
7653     xcb_parts[2].iov_base = (char *) &xcb_out;
7654     xcb_parts[2].iov_len = sizeof(xcb_out);
7655     xcb_parts[3].iov_base = 0;
7656     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7657     /* uint32_t textures */
7658     xcb_parts[4].iov_base = (char *) textures;
7659     xcb_parts[4].iov_len = n * sizeof(uint32_t);
7660     xcb_parts[5].iov_base = 0;
7661     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7662 
7663     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7664     return xcb_ret;
7665 }
7666 
7667 xcb_void_cookie_t
xcb_glx_delete_textures(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n,const uint32_t * textures)7668 xcb_glx_delete_textures (xcb_connection_t      *c  /**< */,
7669                          xcb_glx_context_tag_t  context_tag  /**< */,
7670                          int32_t                n  /**< */,
7671                          const uint32_t        *textures  /**< */)
7672 {
7673     static const xcb_protocol_request_t xcb_req = {
7674         /* count */ 4,
7675         /* ext */ &xcb_glx_id,
7676         /* opcode */ XCB_GLX_DELETE_TEXTURES,
7677         /* isvoid */ 1
7678     };
7679 
7680     struct iovec xcb_parts[6];
7681     xcb_void_cookie_t xcb_ret;
7682     xcb_glx_delete_textures_request_t xcb_out;
7683 
7684     xcb_out.context_tag = context_tag;
7685     xcb_out.n = n;
7686 
7687     xcb_parts[2].iov_base = (char *) &xcb_out;
7688     xcb_parts[2].iov_len = sizeof(xcb_out);
7689     xcb_parts[3].iov_base = 0;
7690     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7691     /* uint32_t textures */
7692     xcb_parts[4].iov_base = (char *) textures;
7693     xcb_parts[4].iov_len = n * sizeof(uint32_t);
7694     xcb_parts[5].iov_base = 0;
7695     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
7696 
7697     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7698     return xcb_ret;
7699 }
7700 
7701 int
xcb_glx_gen_textures_sizeof(const void * _buffer)7702 xcb_glx_gen_textures_sizeof (const void  *_buffer  /**< */)
7703 {
7704     char *xcb_tmp = (char *)_buffer;
7705     const xcb_glx_gen_textures_reply_t *_aux = (xcb_glx_gen_textures_reply_t *)_buffer;
7706     unsigned int xcb_buffer_len = 0;
7707     unsigned int xcb_block_len = 0;
7708     unsigned int xcb_pad = 0;
7709     unsigned int xcb_align_to = 0;
7710 
7711 
7712     xcb_block_len += sizeof(xcb_glx_gen_textures_reply_t);
7713     xcb_tmp += xcb_block_len;
7714     xcb_buffer_len += xcb_block_len;
7715     xcb_block_len = 0;
7716     /* data */
7717     xcb_block_len += _aux->length * sizeof(uint32_t);
7718     xcb_tmp += xcb_block_len;
7719     xcb_align_to = ALIGNOF(uint32_t);
7720     /* insert padding */
7721     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7722     xcb_buffer_len += xcb_block_len + xcb_pad;
7723     if (0 != xcb_pad) {
7724         xcb_tmp += xcb_pad;
7725         xcb_pad = 0;
7726     }
7727     xcb_block_len = 0;
7728 
7729     return xcb_buffer_len;
7730 }
7731 
7732 xcb_glx_gen_textures_cookie_t
xcb_glx_gen_textures(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n)7733 xcb_glx_gen_textures (xcb_connection_t      *c  /**< */,
7734                       xcb_glx_context_tag_t  context_tag  /**< */,
7735                       int32_t                n  /**< */)
7736 {
7737     static const xcb_protocol_request_t xcb_req = {
7738         /* count */ 2,
7739         /* ext */ &xcb_glx_id,
7740         /* opcode */ XCB_GLX_GEN_TEXTURES,
7741         /* isvoid */ 0
7742     };
7743 
7744     struct iovec xcb_parts[4];
7745     xcb_glx_gen_textures_cookie_t xcb_ret;
7746     xcb_glx_gen_textures_request_t xcb_out;
7747 
7748     xcb_out.context_tag = context_tag;
7749     xcb_out.n = n;
7750 
7751     xcb_parts[2].iov_base = (char *) &xcb_out;
7752     xcb_parts[2].iov_len = sizeof(xcb_out);
7753     xcb_parts[3].iov_base = 0;
7754     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7755 
7756     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7757     return xcb_ret;
7758 }
7759 
7760 xcb_glx_gen_textures_cookie_t
xcb_glx_gen_textures_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n)7761 xcb_glx_gen_textures_unchecked (xcb_connection_t      *c  /**< */,
7762                                 xcb_glx_context_tag_t  context_tag  /**< */,
7763                                 int32_t                n  /**< */)
7764 {
7765     static const xcb_protocol_request_t xcb_req = {
7766         /* count */ 2,
7767         /* ext */ &xcb_glx_id,
7768         /* opcode */ XCB_GLX_GEN_TEXTURES,
7769         /* isvoid */ 0
7770     };
7771 
7772     struct iovec xcb_parts[4];
7773     xcb_glx_gen_textures_cookie_t xcb_ret;
7774     xcb_glx_gen_textures_request_t xcb_out;
7775 
7776     xcb_out.context_tag = context_tag;
7777     xcb_out.n = n;
7778 
7779     xcb_parts[2].iov_base = (char *) &xcb_out;
7780     xcb_parts[2].iov_len = sizeof(xcb_out);
7781     xcb_parts[3].iov_base = 0;
7782     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7783 
7784     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7785     return xcb_ret;
7786 }
7787 
7788 uint32_t *
xcb_glx_gen_textures_data(const xcb_glx_gen_textures_reply_t * R)7789 xcb_glx_gen_textures_data (const xcb_glx_gen_textures_reply_t *R  /**< */)
7790 {
7791     return (uint32_t *) (R + 1);
7792 }
7793 
7794 int
xcb_glx_gen_textures_data_length(const xcb_glx_gen_textures_reply_t * R)7795 xcb_glx_gen_textures_data_length (const xcb_glx_gen_textures_reply_t *R  /**< */)
7796 {
7797     return R->length;
7798 }
7799 
7800 xcb_generic_iterator_t
xcb_glx_gen_textures_data_end(const xcb_glx_gen_textures_reply_t * R)7801 xcb_glx_gen_textures_data_end (const xcb_glx_gen_textures_reply_t *R  /**< */)
7802 {
7803     xcb_generic_iterator_t i;
7804     i.data = ((uint32_t *) (R + 1)) + (R->length);
7805     i.rem = 0;
7806     i.index = (char *) i.data - (char *) R;
7807     return i;
7808 }
7809 
7810 xcb_glx_gen_textures_reply_t *
xcb_glx_gen_textures_reply(xcb_connection_t * c,xcb_glx_gen_textures_cookie_t cookie,xcb_generic_error_t ** e)7811 xcb_glx_gen_textures_reply (xcb_connection_t               *c  /**< */,
7812                             xcb_glx_gen_textures_cookie_t   cookie  /**< */,
7813                             xcb_generic_error_t           **e  /**< */)
7814 {
7815     return (xcb_glx_gen_textures_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7816 }
7817 
7818 xcb_glx_is_texture_cookie_t
xcb_glx_is_texture(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t texture)7819 xcb_glx_is_texture (xcb_connection_t      *c  /**< */,
7820                     xcb_glx_context_tag_t  context_tag  /**< */,
7821                     uint32_t               texture  /**< */)
7822 {
7823     static const xcb_protocol_request_t xcb_req = {
7824         /* count */ 2,
7825         /* ext */ &xcb_glx_id,
7826         /* opcode */ XCB_GLX_IS_TEXTURE,
7827         /* isvoid */ 0
7828     };
7829 
7830     struct iovec xcb_parts[4];
7831     xcb_glx_is_texture_cookie_t xcb_ret;
7832     xcb_glx_is_texture_request_t xcb_out;
7833 
7834     xcb_out.context_tag = context_tag;
7835     xcb_out.texture = texture;
7836 
7837     xcb_parts[2].iov_base = (char *) &xcb_out;
7838     xcb_parts[2].iov_len = sizeof(xcb_out);
7839     xcb_parts[3].iov_base = 0;
7840     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7841 
7842     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7843     return xcb_ret;
7844 }
7845 
7846 xcb_glx_is_texture_cookie_t
xcb_glx_is_texture_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t texture)7847 xcb_glx_is_texture_unchecked (xcb_connection_t      *c  /**< */,
7848                               xcb_glx_context_tag_t  context_tag  /**< */,
7849                               uint32_t               texture  /**< */)
7850 {
7851     static const xcb_protocol_request_t xcb_req = {
7852         /* count */ 2,
7853         /* ext */ &xcb_glx_id,
7854         /* opcode */ XCB_GLX_IS_TEXTURE,
7855         /* isvoid */ 0
7856     };
7857 
7858     struct iovec xcb_parts[4];
7859     xcb_glx_is_texture_cookie_t xcb_ret;
7860     xcb_glx_is_texture_request_t xcb_out;
7861 
7862     xcb_out.context_tag = context_tag;
7863     xcb_out.texture = texture;
7864 
7865     xcb_parts[2].iov_base = (char *) &xcb_out;
7866     xcb_parts[2].iov_len = sizeof(xcb_out);
7867     xcb_parts[3].iov_base = 0;
7868     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7869 
7870     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7871     return xcb_ret;
7872 }
7873 
7874 xcb_glx_is_texture_reply_t *
xcb_glx_is_texture_reply(xcb_connection_t * c,xcb_glx_is_texture_cookie_t cookie,xcb_generic_error_t ** e)7875 xcb_glx_is_texture_reply (xcb_connection_t             *c  /**< */,
7876                           xcb_glx_is_texture_cookie_t   cookie  /**< */,
7877                           xcb_generic_error_t         **e  /**< */)
7878 {
7879     return (xcb_glx_is_texture_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
7880 }
7881 
7882 int
xcb_glx_get_color_table_sizeof(const void * _buffer)7883 xcb_glx_get_color_table_sizeof (const void  *_buffer  /**< */)
7884 {
7885     char *xcb_tmp = (char *)_buffer;
7886     const xcb_glx_get_color_table_reply_t *_aux = (xcb_glx_get_color_table_reply_t *)_buffer;
7887     unsigned int xcb_buffer_len = 0;
7888     unsigned int xcb_block_len = 0;
7889     unsigned int xcb_pad = 0;
7890     unsigned int xcb_align_to = 0;
7891 
7892 
7893     xcb_block_len += sizeof(xcb_glx_get_color_table_reply_t);
7894     xcb_tmp += xcb_block_len;
7895     xcb_buffer_len += xcb_block_len;
7896     xcb_block_len = 0;
7897     /* data */
7898     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
7899     xcb_tmp += xcb_block_len;
7900     xcb_align_to = ALIGNOF(uint8_t);
7901     /* insert padding */
7902     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
7903     xcb_buffer_len += xcb_block_len + xcb_pad;
7904     if (0 != xcb_pad) {
7905         xcb_tmp += xcb_pad;
7906         xcb_pad = 0;
7907     }
7908     xcb_block_len = 0;
7909 
7910     return xcb_buffer_len;
7911 }
7912 
7913 xcb_glx_get_color_table_cookie_t
xcb_glx_get_color_table(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes)7914 xcb_glx_get_color_table (xcb_connection_t      *c  /**< */,
7915                          xcb_glx_context_tag_t  context_tag  /**< */,
7916                          uint32_t               target  /**< */,
7917                          uint32_t               format  /**< */,
7918                          uint32_t               type  /**< */,
7919                          uint8_t                swap_bytes  /**< */)
7920 {
7921     static const xcb_protocol_request_t xcb_req = {
7922         /* count */ 2,
7923         /* ext */ &xcb_glx_id,
7924         /* opcode */ XCB_GLX_GET_COLOR_TABLE,
7925         /* isvoid */ 0
7926     };
7927 
7928     struct iovec xcb_parts[4];
7929     xcb_glx_get_color_table_cookie_t xcb_ret;
7930     xcb_glx_get_color_table_request_t xcb_out;
7931 
7932     xcb_out.context_tag = context_tag;
7933     xcb_out.target = target;
7934     xcb_out.format = format;
7935     xcb_out.type = type;
7936     xcb_out.swap_bytes = swap_bytes;
7937 
7938     xcb_parts[2].iov_base = (char *) &xcb_out;
7939     xcb_parts[2].iov_len = sizeof(xcb_out);
7940     xcb_parts[3].iov_base = 0;
7941     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7942 
7943     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
7944     return xcb_ret;
7945 }
7946 
7947 xcb_glx_get_color_table_cookie_t
xcb_glx_get_color_table_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes)7948 xcb_glx_get_color_table_unchecked (xcb_connection_t      *c  /**< */,
7949                                    xcb_glx_context_tag_t  context_tag  /**< */,
7950                                    uint32_t               target  /**< */,
7951                                    uint32_t               format  /**< */,
7952                                    uint32_t               type  /**< */,
7953                                    uint8_t                swap_bytes  /**< */)
7954 {
7955     static const xcb_protocol_request_t xcb_req = {
7956         /* count */ 2,
7957         /* ext */ &xcb_glx_id,
7958         /* opcode */ XCB_GLX_GET_COLOR_TABLE,
7959         /* isvoid */ 0
7960     };
7961 
7962     struct iovec xcb_parts[4];
7963     xcb_glx_get_color_table_cookie_t xcb_ret;
7964     xcb_glx_get_color_table_request_t xcb_out;
7965 
7966     xcb_out.context_tag = context_tag;
7967     xcb_out.target = target;
7968     xcb_out.format = format;
7969     xcb_out.type = type;
7970     xcb_out.swap_bytes = swap_bytes;
7971 
7972     xcb_parts[2].iov_base = (char *) &xcb_out;
7973     xcb_parts[2].iov_len = sizeof(xcb_out);
7974     xcb_parts[3].iov_base = 0;
7975     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
7976 
7977     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
7978     return xcb_ret;
7979 }
7980 
7981 uint8_t *
xcb_glx_get_color_table_data(const xcb_glx_get_color_table_reply_t * R)7982 xcb_glx_get_color_table_data (const xcb_glx_get_color_table_reply_t *R  /**< */)
7983 {
7984     return (uint8_t *) (R + 1);
7985 }
7986 
7987 int
xcb_glx_get_color_table_data_length(const xcb_glx_get_color_table_reply_t * R)7988 xcb_glx_get_color_table_data_length (const xcb_glx_get_color_table_reply_t *R  /**< */)
7989 {
7990     return (R->length * 4);
7991 }
7992 
7993 xcb_generic_iterator_t
xcb_glx_get_color_table_data_end(const xcb_glx_get_color_table_reply_t * R)7994 xcb_glx_get_color_table_data_end (const xcb_glx_get_color_table_reply_t *R  /**< */)
7995 {
7996     xcb_generic_iterator_t i;
7997     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
7998     i.rem = 0;
7999     i.index = (char *) i.data - (char *) R;
8000     return i;
8001 }
8002 
8003 xcb_glx_get_color_table_reply_t *
xcb_glx_get_color_table_reply(xcb_connection_t * c,xcb_glx_get_color_table_cookie_t cookie,xcb_generic_error_t ** e)8004 xcb_glx_get_color_table_reply (xcb_connection_t                  *c  /**< */,
8005                                xcb_glx_get_color_table_cookie_t   cookie  /**< */,
8006                                xcb_generic_error_t              **e  /**< */)
8007 {
8008     return (xcb_glx_get_color_table_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8009 }
8010 
8011 int
xcb_glx_get_color_table_parameterfv_sizeof(const void * _buffer)8012 xcb_glx_get_color_table_parameterfv_sizeof (const void  *_buffer  /**< */)
8013 {
8014     char *xcb_tmp = (char *)_buffer;
8015     const xcb_glx_get_color_table_parameterfv_reply_t *_aux = (xcb_glx_get_color_table_parameterfv_reply_t *)_buffer;
8016     unsigned int xcb_buffer_len = 0;
8017     unsigned int xcb_block_len = 0;
8018     unsigned int xcb_pad = 0;
8019     unsigned int xcb_align_to = 0;
8020 
8021 
8022     xcb_block_len += sizeof(xcb_glx_get_color_table_parameterfv_reply_t);
8023     xcb_tmp += xcb_block_len;
8024     xcb_buffer_len += xcb_block_len;
8025     xcb_block_len = 0;
8026     /* data */
8027     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
8028     xcb_tmp += xcb_block_len;
8029     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
8030     /* insert padding */
8031     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8032     xcb_buffer_len += xcb_block_len + xcb_pad;
8033     if (0 != xcb_pad) {
8034         xcb_tmp += xcb_pad;
8035         xcb_pad = 0;
8036     }
8037     xcb_block_len = 0;
8038 
8039     return xcb_buffer_len;
8040 }
8041 
8042 xcb_glx_get_color_table_parameterfv_cookie_t
xcb_glx_get_color_table_parameterfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8043 xcb_glx_get_color_table_parameterfv (xcb_connection_t      *c  /**< */,
8044                                      xcb_glx_context_tag_t  context_tag  /**< */,
8045                                      uint32_t               target  /**< */,
8046                                      uint32_t               pname  /**< */)
8047 {
8048     static const xcb_protocol_request_t xcb_req = {
8049         /* count */ 2,
8050         /* ext */ &xcb_glx_id,
8051         /* opcode */ XCB_GLX_GET_COLOR_TABLE_PARAMETERFV,
8052         /* isvoid */ 0
8053     };
8054 
8055     struct iovec xcb_parts[4];
8056     xcb_glx_get_color_table_parameterfv_cookie_t xcb_ret;
8057     xcb_glx_get_color_table_parameterfv_request_t xcb_out;
8058 
8059     xcb_out.context_tag = context_tag;
8060     xcb_out.target = target;
8061     xcb_out.pname = pname;
8062 
8063     xcb_parts[2].iov_base = (char *) &xcb_out;
8064     xcb_parts[2].iov_len = sizeof(xcb_out);
8065     xcb_parts[3].iov_base = 0;
8066     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8067 
8068     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8069     return xcb_ret;
8070 }
8071 
8072 xcb_glx_get_color_table_parameterfv_cookie_t
xcb_glx_get_color_table_parameterfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8073 xcb_glx_get_color_table_parameterfv_unchecked (xcb_connection_t      *c  /**< */,
8074                                                xcb_glx_context_tag_t  context_tag  /**< */,
8075                                                uint32_t               target  /**< */,
8076                                                uint32_t               pname  /**< */)
8077 {
8078     static const xcb_protocol_request_t xcb_req = {
8079         /* count */ 2,
8080         /* ext */ &xcb_glx_id,
8081         /* opcode */ XCB_GLX_GET_COLOR_TABLE_PARAMETERFV,
8082         /* isvoid */ 0
8083     };
8084 
8085     struct iovec xcb_parts[4];
8086     xcb_glx_get_color_table_parameterfv_cookie_t xcb_ret;
8087     xcb_glx_get_color_table_parameterfv_request_t xcb_out;
8088 
8089     xcb_out.context_tag = context_tag;
8090     xcb_out.target = target;
8091     xcb_out.pname = pname;
8092 
8093     xcb_parts[2].iov_base = (char *) &xcb_out;
8094     xcb_parts[2].iov_len = sizeof(xcb_out);
8095     xcb_parts[3].iov_base = 0;
8096     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8097 
8098     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8099     return xcb_ret;
8100 }
8101 
8102 xcb_glx_float32_t *
xcb_glx_get_color_table_parameterfv_data(const xcb_glx_get_color_table_parameterfv_reply_t * R)8103 xcb_glx_get_color_table_parameterfv_data (const xcb_glx_get_color_table_parameterfv_reply_t *R  /**< */)
8104 {
8105     return (xcb_glx_float32_t *) (R + 1);
8106 }
8107 
8108 int
xcb_glx_get_color_table_parameterfv_data_length(const xcb_glx_get_color_table_parameterfv_reply_t * R)8109 xcb_glx_get_color_table_parameterfv_data_length (const xcb_glx_get_color_table_parameterfv_reply_t *R  /**< */)
8110 {
8111     return R->n;
8112 }
8113 
8114 xcb_generic_iterator_t
xcb_glx_get_color_table_parameterfv_data_end(const xcb_glx_get_color_table_parameterfv_reply_t * R)8115 xcb_glx_get_color_table_parameterfv_data_end (const xcb_glx_get_color_table_parameterfv_reply_t *R  /**< */)
8116 {
8117     xcb_generic_iterator_t i;
8118     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
8119     i.rem = 0;
8120     i.index = (char *) i.data - (char *) R;
8121     return i;
8122 }
8123 
8124 xcb_glx_get_color_table_parameterfv_reply_t *
xcb_glx_get_color_table_parameterfv_reply(xcb_connection_t * c,xcb_glx_get_color_table_parameterfv_cookie_t cookie,xcb_generic_error_t ** e)8125 xcb_glx_get_color_table_parameterfv_reply (xcb_connection_t                              *c  /**< */,
8126                                            xcb_glx_get_color_table_parameterfv_cookie_t   cookie  /**< */,
8127                                            xcb_generic_error_t                          **e  /**< */)
8128 {
8129     return (xcb_glx_get_color_table_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8130 }
8131 
8132 int
xcb_glx_get_color_table_parameteriv_sizeof(const void * _buffer)8133 xcb_glx_get_color_table_parameteriv_sizeof (const void  *_buffer  /**< */)
8134 {
8135     char *xcb_tmp = (char *)_buffer;
8136     const xcb_glx_get_color_table_parameteriv_reply_t *_aux = (xcb_glx_get_color_table_parameteriv_reply_t *)_buffer;
8137     unsigned int xcb_buffer_len = 0;
8138     unsigned int xcb_block_len = 0;
8139     unsigned int xcb_pad = 0;
8140     unsigned int xcb_align_to = 0;
8141 
8142 
8143     xcb_block_len += sizeof(xcb_glx_get_color_table_parameteriv_reply_t);
8144     xcb_tmp += xcb_block_len;
8145     xcb_buffer_len += xcb_block_len;
8146     xcb_block_len = 0;
8147     /* data */
8148     xcb_block_len += _aux->n * sizeof(int32_t);
8149     xcb_tmp += xcb_block_len;
8150     xcb_align_to = ALIGNOF(int32_t);
8151     /* insert padding */
8152     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8153     xcb_buffer_len += xcb_block_len + xcb_pad;
8154     if (0 != xcb_pad) {
8155         xcb_tmp += xcb_pad;
8156         xcb_pad = 0;
8157     }
8158     xcb_block_len = 0;
8159 
8160     return xcb_buffer_len;
8161 }
8162 
8163 xcb_glx_get_color_table_parameteriv_cookie_t
xcb_glx_get_color_table_parameteriv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8164 xcb_glx_get_color_table_parameteriv (xcb_connection_t      *c  /**< */,
8165                                      xcb_glx_context_tag_t  context_tag  /**< */,
8166                                      uint32_t               target  /**< */,
8167                                      uint32_t               pname  /**< */)
8168 {
8169     static const xcb_protocol_request_t xcb_req = {
8170         /* count */ 2,
8171         /* ext */ &xcb_glx_id,
8172         /* opcode */ XCB_GLX_GET_COLOR_TABLE_PARAMETERIV,
8173         /* isvoid */ 0
8174     };
8175 
8176     struct iovec xcb_parts[4];
8177     xcb_glx_get_color_table_parameteriv_cookie_t xcb_ret;
8178     xcb_glx_get_color_table_parameteriv_request_t xcb_out;
8179 
8180     xcb_out.context_tag = context_tag;
8181     xcb_out.target = target;
8182     xcb_out.pname = pname;
8183 
8184     xcb_parts[2].iov_base = (char *) &xcb_out;
8185     xcb_parts[2].iov_len = sizeof(xcb_out);
8186     xcb_parts[3].iov_base = 0;
8187     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8188 
8189     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8190     return xcb_ret;
8191 }
8192 
8193 xcb_glx_get_color_table_parameteriv_cookie_t
xcb_glx_get_color_table_parameteriv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8194 xcb_glx_get_color_table_parameteriv_unchecked (xcb_connection_t      *c  /**< */,
8195                                                xcb_glx_context_tag_t  context_tag  /**< */,
8196                                                uint32_t               target  /**< */,
8197                                                uint32_t               pname  /**< */)
8198 {
8199     static const xcb_protocol_request_t xcb_req = {
8200         /* count */ 2,
8201         /* ext */ &xcb_glx_id,
8202         /* opcode */ XCB_GLX_GET_COLOR_TABLE_PARAMETERIV,
8203         /* isvoid */ 0
8204     };
8205 
8206     struct iovec xcb_parts[4];
8207     xcb_glx_get_color_table_parameteriv_cookie_t xcb_ret;
8208     xcb_glx_get_color_table_parameteriv_request_t xcb_out;
8209 
8210     xcb_out.context_tag = context_tag;
8211     xcb_out.target = target;
8212     xcb_out.pname = pname;
8213 
8214     xcb_parts[2].iov_base = (char *) &xcb_out;
8215     xcb_parts[2].iov_len = sizeof(xcb_out);
8216     xcb_parts[3].iov_base = 0;
8217     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8218 
8219     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8220     return xcb_ret;
8221 }
8222 
8223 int32_t *
xcb_glx_get_color_table_parameteriv_data(const xcb_glx_get_color_table_parameteriv_reply_t * R)8224 xcb_glx_get_color_table_parameteriv_data (const xcb_glx_get_color_table_parameteriv_reply_t *R  /**< */)
8225 {
8226     return (int32_t *) (R + 1);
8227 }
8228 
8229 int
xcb_glx_get_color_table_parameteriv_data_length(const xcb_glx_get_color_table_parameteriv_reply_t * R)8230 xcb_glx_get_color_table_parameteriv_data_length (const xcb_glx_get_color_table_parameteriv_reply_t *R  /**< */)
8231 {
8232     return R->n;
8233 }
8234 
8235 xcb_generic_iterator_t
xcb_glx_get_color_table_parameteriv_data_end(const xcb_glx_get_color_table_parameteriv_reply_t * R)8236 xcb_glx_get_color_table_parameteriv_data_end (const xcb_glx_get_color_table_parameteriv_reply_t *R  /**< */)
8237 {
8238     xcb_generic_iterator_t i;
8239     i.data = ((int32_t *) (R + 1)) + (R->n);
8240     i.rem = 0;
8241     i.index = (char *) i.data - (char *) R;
8242     return i;
8243 }
8244 
8245 xcb_glx_get_color_table_parameteriv_reply_t *
xcb_glx_get_color_table_parameteriv_reply(xcb_connection_t * c,xcb_glx_get_color_table_parameteriv_cookie_t cookie,xcb_generic_error_t ** e)8246 xcb_glx_get_color_table_parameteriv_reply (xcb_connection_t                              *c  /**< */,
8247                                            xcb_glx_get_color_table_parameteriv_cookie_t   cookie  /**< */,
8248                                            xcb_generic_error_t                          **e  /**< */)
8249 {
8250     return (xcb_glx_get_color_table_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8251 }
8252 
8253 int
xcb_glx_get_convolution_filter_sizeof(const void * _buffer)8254 xcb_glx_get_convolution_filter_sizeof (const void  *_buffer  /**< */)
8255 {
8256     char *xcb_tmp = (char *)_buffer;
8257     const xcb_glx_get_convolution_filter_reply_t *_aux = (xcb_glx_get_convolution_filter_reply_t *)_buffer;
8258     unsigned int xcb_buffer_len = 0;
8259     unsigned int xcb_block_len = 0;
8260     unsigned int xcb_pad = 0;
8261     unsigned int xcb_align_to = 0;
8262 
8263 
8264     xcb_block_len += sizeof(xcb_glx_get_convolution_filter_reply_t);
8265     xcb_tmp += xcb_block_len;
8266     xcb_buffer_len += xcb_block_len;
8267     xcb_block_len = 0;
8268     /* data */
8269     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
8270     xcb_tmp += xcb_block_len;
8271     xcb_align_to = ALIGNOF(uint8_t);
8272     /* insert padding */
8273     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8274     xcb_buffer_len += xcb_block_len + xcb_pad;
8275     if (0 != xcb_pad) {
8276         xcb_tmp += xcb_pad;
8277         xcb_pad = 0;
8278     }
8279     xcb_block_len = 0;
8280 
8281     return xcb_buffer_len;
8282 }
8283 
8284 xcb_glx_get_convolution_filter_cookie_t
xcb_glx_get_convolution_filter(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes)8285 xcb_glx_get_convolution_filter (xcb_connection_t      *c  /**< */,
8286                                 xcb_glx_context_tag_t  context_tag  /**< */,
8287                                 uint32_t               target  /**< */,
8288                                 uint32_t               format  /**< */,
8289                                 uint32_t               type  /**< */,
8290                                 uint8_t                swap_bytes  /**< */)
8291 {
8292     static const xcb_protocol_request_t xcb_req = {
8293         /* count */ 2,
8294         /* ext */ &xcb_glx_id,
8295         /* opcode */ XCB_GLX_GET_CONVOLUTION_FILTER,
8296         /* isvoid */ 0
8297     };
8298 
8299     struct iovec xcb_parts[4];
8300     xcb_glx_get_convolution_filter_cookie_t xcb_ret;
8301     xcb_glx_get_convolution_filter_request_t xcb_out;
8302 
8303     xcb_out.context_tag = context_tag;
8304     xcb_out.target = target;
8305     xcb_out.format = format;
8306     xcb_out.type = type;
8307     xcb_out.swap_bytes = swap_bytes;
8308 
8309     xcb_parts[2].iov_base = (char *) &xcb_out;
8310     xcb_parts[2].iov_len = sizeof(xcb_out);
8311     xcb_parts[3].iov_base = 0;
8312     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8313 
8314     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8315     return xcb_ret;
8316 }
8317 
8318 xcb_glx_get_convolution_filter_cookie_t
xcb_glx_get_convolution_filter_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes)8319 xcb_glx_get_convolution_filter_unchecked (xcb_connection_t      *c  /**< */,
8320                                           xcb_glx_context_tag_t  context_tag  /**< */,
8321                                           uint32_t               target  /**< */,
8322                                           uint32_t               format  /**< */,
8323                                           uint32_t               type  /**< */,
8324                                           uint8_t                swap_bytes  /**< */)
8325 {
8326     static const xcb_protocol_request_t xcb_req = {
8327         /* count */ 2,
8328         /* ext */ &xcb_glx_id,
8329         /* opcode */ XCB_GLX_GET_CONVOLUTION_FILTER,
8330         /* isvoid */ 0
8331     };
8332 
8333     struct iovec xcb_parts[4];
8334     xcb_glx_get_convolution_filter_cookie_t xcb_ret;
8335     xcb_glx_get_convolution_filter_request_t xcb_out;
8336 
8337     xcb_out.context_tag = context_tag;
8338     xcb_out.target = target;
8339     xcb_out.format = format;
8340     xcb_out.type = type;
8341     xcb_out.swap_bytes = swap_bytes;
8342 
8343     xcb_parts[2].iov_base = (char *) &xcb_out;
8344     xcb_parts[2].iov_len = sizeof(xcb_out);
8345     xcb_parts[3].iov_base = 0;
8346     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8347 
8348     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8349     return xcb_ret;
8350 }
8351 
8352 uint8_t *
xcb_glx_get_convolution_filter_data(const xcb_glx_get_convolution_filter_reply_t * R)8353 xcb_glx_get_convolution_filter_data (const xcb_glx_get_convolution_filter_reply_t *R  /**< */)
8354 {
8355     return (uint8_t *) (R + 1);
8356 }
8357 
8358 int
xcb_glx_get_convolution_filter_data_length(const xcb_glx_get_convolution_filter_reply_t * R)8359 xcb_glx_get_convolution_filter_data_length (const xcb_glx_get_convolution_filter_reply_t *R  /**< */)
8360 {
8361     return (R->length * 4);
8362 }
8363 
8364 xcb_generic_iterator_t
xcb_glx_get_convolution_filter_data_end(const xcb_glx_get_convolution_filter_reply_t * R)8365 xcb_glx_get_convolution_filter_data_end (const xcb_glx_get_convolution_filter_reply_t *R  /**< */)
8366 {
8367     xcb_generic_iterator_t i;
8368     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
8369     i.rem = 0;
8370     i.index = (char *) i.data - (char *) R;
8371     return i;
8372 }
8373 
8374 xcb_glx_get_convolution_filter_reply_t *
xcb_glx_get_convolution_filter_reply(xcb_connection_t * c,xcb_glx_get_convolution_filter_cookie_t cookie,xcb_generic_error_t ** e)8375 xcb_glx_get_convolution_filter_reply (xcb_connection_t                         *c  /**< */,
8376                                       xcb_glx_get_convolution_filter_cookie_t   cookie  /**< */,
8377                                       xcb_generic_error_t                     **e  /**< */)
8378 {
8379     return (xcb_glx_get_convolution_filter_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8380 }
8381 
8382 int
xcb_glx_get_convolution_parameterfv_sizeof(const void * _buffer)8383 xcb_glx_get_convolution_parameterfv_sizeof (const void  *_buffer  /**< */)
8384 {
8385     char *xcb_tmp = (char *)_buffer;
8386     const xcb_glx_get_convolution_parameterfv_reply_t *_aux = (xcb_glx_get_convolution_parameterfv_reply_t *)_buffer;
8387     unsigned int xcb_buffer_len = 0;
8388     unsigned int xcb_block_len = 0;
8389     unsigned int xcb_pad = 0;
8390     unsigned int xcb_align_to = 0;
8391 
8392 
8393     xcb_block_len += sizeof(xcb_glx_get_convolution_parameterfv_reply_t);
8394     xcb_tmp += xcb_block_len;
8395     xcb_buffer_len += xcb_block_len;
8396     xcb_block_len = 0;
8397     /* data */
8398     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
8399     xcb_tmp += xcb_block_len;
8400     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
8401     /* insert padding */
8402     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8403     xcb_buffer_len += xcb_block_len + xcb_pad;
8404     if (0 != xcb_pad) {
8405         xcb_tmp += xcb_pad;
8406         xcb_pad = 0;
8407     }
8408     xcb_block_len = 0;
8409 
8410     return xcb_buffer_len;
8411 }
8412 
8413 xcb_glx_get_convolution_parameterfv_cookie_t
xcb_glx_get_convolution_parameterfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8414 xcb_glx_get_convolution_parameterfv (xcb_connection_t      *c  /**< */,
8415                                      xcb_glx_context_tag_t  context_tag  /**< */,
8416                                      uint32_t               target  /**< */,
8417                                      uint32_t               pname  /**< */)
8418 {
8419     static const xcb_protocol_request_t xcb_req = {
8420         /* count */ 2,
8421         /* ext */ &xcb_glx_id,
8422         /* opcode */ XCB_GLX_GET_CONVOLUTION_PARAMETERFV,
8423         /* isvoid */ 0
8424     };
8425 
8426     struct iovec xcb_parts[4];
8427     xcb_glx_get_convolution_parameterfv_cookie_t xcb_ret;
8428     xcb_glx_get_convolution_parameterfv_request_t xcb_out;
8429 
8430     xcb_out.context_tag = context_tag;
8431     xcb_out.target = target;
8432     xcb_out.pname = pname;
8433 
8434     xcb_parts[2].iov_base = (char *) &xcb_out;
8435     xcb_parts[2].iov_len = sizeof(xcb_out);
8436     xcb_parts[3].iov_base = 0;
8437     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8438 
8439     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8440     return xcb_ret;
8441 }
8442 
8443 xcb_glx_get_convolution_parameterfv_cookie_t
xcb_glx_get_convolution_parameterfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8444 xcb_glx_get_convolution_parameterfv_unchecked (xcb_connection_t      *c  /**< */,
8445                                                xcb_glx_context_tag_t  context_tag  /**< */,
8446                                                uint32_t               target  /**< */,
8447                                                uint32_t               pname  /**< */)
8448 {
8449     static const xcb_protocol_request_t xcb_req = {
8450         /* count */ 2,
8451         /* ext */ &xcb_glx_id,
8452         /* opcode */ XCB_GLX_GET_CONVOLUTION_PARAMETERFV,
8453         /* isvoid */ 0
8454     };
8455 
8456     struct iovec xcb_parts[4];
8457     xcb_glx_get_convolution_parameterfv_cookie_t xcb_ret;
8458     xcb_glx_get_convolution_parameterfv_request_t xcb_out;
8459 
8460     xcb_out.context_tag = context_tag;
8461     xcb_out.target = target;
8462     xcb_out.pname = pname;
8463 
8464     xcb_parts[2].iov_base = (char *) &xcb_out;
8465     xcb_parts[2].iov_len = sizeof(xcb_out);
8466     xcb_parts[3].iov_base = 0;
8467     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8468 
8469     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8470     return xcb_ret;
8471 }
8472 
8473 xcb_glx_float32_t *
xcb_glx_get_convolution_parameterfv_data(const xcb_glx_get_convolution_parameterfv_reply_t * R)8474 xcb_glx_get_convolution_parameterfv_data (const xcb_glx_get_convolution_parameterfv_reply_t *R  /**< */)
8475 {
8476     return (xcb_glx_float32_t *) (R + 1);
8477 }
8478 
8479 int
xcb_glx_get_convolution_parameterfv_data_length(const xcb_glx_get_convolution_parameterfv_reply_t * R)8480 xcb_glx_get_convolution_parameterfv_data_length (const xcb_glx_get_convolution_parameterfv_reply_t *R  /**< */)
8481 {
8482     return R->n;
8483 }
8484 
8485 xcb_generic_iterator_t
xcb_glx_get_convolution_parameterfv_data_end(const xcb_glx_get_convolution_parameterfv_reply_t * R)8486 xcb_glx_get_convolution_parameterfv_data_end (const xcb_glx_get_convolution_parameterfv_reply_t *R  /**< */)
8487 {
8488     xcb_generic_iterator_t i;
8489     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
8490     i.rem = 0;
8491     i.index = (char *) i.data - (char *) R;
8492     return i;
8493 }
8494 
8495 xcb_glx_get_convolution_parameterfv_reply_t *
xcb_glx_get_convolution_parameterfv_reply(xcb_connection_t * c,xcb_glx_get_convolution_parameterfv_cookie_t cookie,xcb_generic_error_t ** e)8496 xcb_glx_get_convolution_parameterfv_reply (xcb_connection_t                              *c  /**< */,
8497                                            xcb_glx_get_convolution_parameterfv_cookie_t   cookie  /**< */,
8498                                            xcb_generic_error_t                          **e  /**< */)
8499 {
8500     return (xcb_glx_get_convolution_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8501 }
8502 
8503 int
xcb_glx_get_convolution_parameteriv_sizeof(const void * _buffer)8504 xcb_glx_get_convolution_parameteriv_sizeof (const void  *_buffer  /**< */)
8505 {
8506     char *xcb_tmp = (char *)_buffer;
8507     const xcb_glx_get_convolution_parameteriv_reply_t *_aux = (xcb_glx_get_convolution_parameteriv_reply_t *)_buffer;
8508     unsigned int xcb_buffer_len = 0;
8509     unsigned int xcb_block_len = 0;
8510     unsigned int xcb_pad = 0;
8511     unsigned int xcb_align_to = 0;
8512 
8513 
8514     xcb_block_len += sizeof(xcb_glx_get_convolution_parameteriv_reply_t);
8515     xcb_tmp += xcb_block_len;
8516     xcb_buffer_len += xcb_block_len;
8517     xcb_block_len = 0;
8518     /* data */
8519     xcb_block_len += _aux->n * sizeof(int32_t);
8520     xcb_tmp += xcb_block_len;
8521     xcb_align_to = ALIGNOF(int32_t);
8522     /* insert padding */
8523     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8524     xcb_buffer_len += xcb_block_len + xcb_pad;
8525     if (0 != xcb_pad) {
8526         xcb_tmp += xcb_pad;
8527         xcb_pad = 0;
8528     }
8529     xcb_block_len = 0;
8530 
8531     return xcb_buffer_len;
8532 }
8533 
8534 xcb_glx_get_convolution_parameteriv_cookie_t
xcb_glx_get_convolution_parameteriv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8535 xcb_glx_get_convolution_parameteriv (xcb_connection_t      *c  /**< */,
8536                                      xcb_glx_context_tag_t  context_tag  /**< */,
8537                                      uint32_t               target  /**< */,
8538                                      uint32_t               pname  /**< */)
8539 {
8540     static const xcb_protocol_request_t xcb_req = {
8541         /* count */ 2,
8542         /* ext */ &xcb_glx_id,
8543         /* opcode */ XCB_GLX_GET_CONVOLUTION_PARAMETERIV,
8544         /* isvoid */ 0
8545     };
8546 
8547     struct iovec xcb_parts[4];
8548     xcb_glx_get_convolution_parameteriv_cookie_t xcb_ret;
8549     xcb_glx_get_convolution_parameteriv_request_t xcb_out;
8550 
8551     xcb_out.context_tag = context_tag;
8552     xcb_out.target = target;
8553     xcb_out.pname = pname;
8554 
8555     xcb_parts[2].iov_base = (char *) &xcb_out;
8556     xcb_parts[2].iov_len = sizeof(xcb_out);
8557     xcb_parts[3].iov_base = 0;
8558     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8559 
8560     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8561     return xcb_ret;
8562 }
8563 
8564 xcb_glx_get_convolution_parameteriv_cookie_t
xcb_glx_get_convolution_parameteriv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8565 xcb_glx_get_convolution_parameteriv_unchecked (xcb_connection_t      *c  /**< */,
8566                                                xcb_glx_context_tag_t  context_tag  /**< */,
8567                                                uint32_t               target  /**< */,
8568                                                uint32_t               pname  /**< */)
8569 {
8570     static const xcb_protocol_request_t xcb_req = {
8571         /* count */ 2,
8572         /* ext */ &xcb_glx_id,
8573         /* opcode */ XCB_GLX_GET_CONVOLUTION_PARAMETERIV,
8574         /* isvoid */ 0
8575     };
8576 
8577     struct iovec xcb_parts[4];
8578     xcb_glx_get_convolution_parameteriv_cookie_t xcb_ret;
8579     xcb_glx_get_convolution_parameteriv_request_t xcb_out;
8580 
8581     xcb_out.context_tag = context_tag;
8582     xcb_out.target = target;
8583     xcb_out.pname = pname;
8584 
8585     xcb_parts[2].iov_base = (char *) &xcb_out;
8586     xcb_parts[2].iov_len = sizeof(xcb_out);
8587     xcb_parts[3].iov_base = 0;
8588     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8589 
8590     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8591     return xcb_ret;
8592 }
8593 
8594 int32_t *
xcb_glx_get_convolution_parameteriv_data(const xcb_glx_get_convolution_parameteriv_reply_t * R)8595 xcb_glx_get_convolution_parameteriv_data (const xcb_glx_get_convolution_parameteriv_reply_t *R  /**< */)
8596 {
8597     return (int32_t *) (R + 1);
8598 }
8599 
8600 int
xcb_glx_get_convolution_parameteriv_data_length(const xcb_glx_get_convolution_parameteriv_reply_t * R)8601 xcb_glx_get_convolution_parameteriv_data_length (const xcb_glx_get_convolution_parameteriv_reply_t *R  /**< */)
8602 {
8603     return R->n;
8604 }
8605 
8606 xcb_generic_iterator_t
xcb_glx_get_convolution_parameteriv_data_end(const xcb_glx_get_convolution_parameteriv_reply_t * R)8607 xcb_glx_get_convolution_parameteriv_data_end (const xcb_glx_get_convolution_parameteriv_reply_t *R  /**< */)
8608 {
8609     xcb_generic_iterator_t i;
8610     i.data = ((int32_t *) (R + 1)) + (R->n);
8611     i.rem = 0;
8612     i.index = (char *) i.data - (char *) R;
8613     return i;
8614 }
8615 
8616 xcb_glx_get_convolution_parameteriv_reply_t *
xcb_glx_get_convolution_parameteriv_reply(xcb_connection_t * c,xcb_glx_get_convolution_parameteriv_cookie_t cookie,xcb_generic_error_t ** e)8617 xcb_glx_get_convolution_parameteriv_reply (xcb_connection_t                              *c  /**< */,
8618                                            xcb_glx_get_convolution_parameteriv_cookie_t   cookie  /**< */,
8619                                            xcb_generic_error_t                          **e  /**< */)
8620 {
8621     return (xcb_glx_get_convolution_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8622 }
8623 
8624 int
xcb_glx_get_separable_filter_sizeof(const void * _buffer)8625 xcb_glx_get_separable_filter_sizeof (const void  *_buffer  /**< */)
8626 {
8627     char *xcb_tmp = (char *)_buffer;
8628     const xcb_glx_get_separable_filter_reply_t *_aux = (xcb_glx_get_separable_filter_reply_t *)_buffer;
8629     unsigned int xcb_buffer_len = 0;
8630     unsigned int xcb_block_len = 0;
8631     unsigned int xcb_pad = 0;
8632     unsigned int xcb_align_to = 0;
8633 
8634 
8635     xcb_block_len += sizeof(xcb_glx_get_separable_filter_reply_t);
8636     xcb_tmp += xcb_block_len;
8637     xcb_buffer_len += xcb_block_len;
8638     xcb_block_len = 0;
8639     /* rows_and_cols */
8640     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
8641     xcb_tmp += xcb_block_len;
8642     xcb_align_to = ALIGNOF(uint8_t);
8643     /* insert padding */
8644     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8645     xcb_buffer_len += xcb_block_len + xcb_pad;
8646     if (0 != xcb_pad) {
8647         xcb_tmp += xcb_pad;
8648         xcb_pad = 0;
8649     }
8650     xcb_block_len = 0;
8651 
8652     return xcb_buffer_len;
8653 }
8654 
8655 xcb_glx_get_separable_filter_cookie_t
xcb_glx_get_separable_filter(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes)8656 xcb_glx_get_separable_filter (xcb_connection_t      *c  /**< */,
8657                               xcb_glx_context_tag_t  context_tag  /**< */,
8658                               uint32_t               target  /**< */,
8659                               uint32_t               format  /**< */,
8660                               uint32_t               type  /**< */,
8661                               uint8_t                swap_bytes  /**< */)
8662 {
8663     static const xcb_protocol_request_t xcb_req = {
8664         /* count */ 2,
8665         /* ext */ &xcb_glx_id,
8666         /* opcode */ XCB_GLX_GET_SEPARABLE_FILTER,
8667         /* isvoid */ 0
8668     };
8669 
8670     struct iovec xcb_parts[4];
8671     xcb_glx_get_separable_filter_cookie_t xcb_ret;
8672     xcb_glx_get_separable_filter_request_t xcb_out;
8673 
8674     xcb_out.context_tag = context_tag;
8675     xcb_out.target = target;
8676     xcb_out.format = format;
8677     xcb_out.type = type;
8678     xcb_out.swap_bytes = swap_bytes;
8679 
8680     xcb_parts[2].iov_base = (char *) &xcb_out;
8681     xcb_parts[2].iov_len = sizeof(xcb_out);
8682     xcb_parts[3].iov_base = 0;
8683     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8684 
8685     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8686     return xcb_ret;
8687 }
8688 
8689 xcb_glx_get_separable_filter_cookie_t
xcb_glx_get_separable_filter_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes)8690 xcb_glx_get_separable_filter_unchecked (xcb_connection_t      *c  /**< */,
8691                                         xcb_glx_context_tag_t  context_tag  /**< */,
8692                                         uint32_t               target  /**< */,
8693                                         uint32_t               format  /**< */,
8694                                         uint32_t               type  /**< */,
8695                                         uint8_t                swap_bytes  /**< */)
8696 {
8697     static const xcb_protocol_request_t xcb_req = {
8698         /* count */ 2,
8699         /* ext */ &xcb_glx_id,
8700         /* opcode */ XCB_GLX_GET_SEPARABLE_FILTER,
8701         /* isvoid */ 0
8702     };
8703 
8704     struct iovec xcb_parts[4];
8705     xcb_glx_get_separable_filter_cookie_t xcb_ret;
8706     xcb_glx_get_separable_filter_request_t xcb_out;
8707 
8708     xcb_out.context_tag = context_tag;
8709     xcb_out.target = target;
8710     xcb_out.format = format;
8711     xcb_out.type = type;
8712     xcb_out.swap_bytes = swap_bytes;
8713 
8714     xcb_parts[2].iov_base = (char *) &xcb_out;
8715     xcb_parts[2].iov_len = sizeof(xcb_out);
8716     xcb_parts[3].iov_base = 0;
8717     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8718 
8719     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8720     return xcb_ret;
8721 }
8722 
8723 uint8_t *
xcb_glx_get_separable_filter_rows_and_cols(const xcb_glx_get_separable_filter_reply_t * R)8724 xcb_glx_get_separable_filter_rows_and_cols (const xcb_glx_get_separable_filter_reply_t *R  /**< */)
8725 {
8726     return (uint8_t *) (R + 1);
8727 }
8728 
8729 int
xcb_glx_get_separable_filter_rows_and_cols_length(const xcb_glx_get_separable_filter_reply_t * R)8730 xcb_glx_get_separable_filter_rows_and_cols_length (const xcb_glx_get_separable_filter_reply_t *R  /**< */)
8731 {
8732     return (R->length * 4);
8733 }
8734 
8735 xcb_generic_iterator_t
xcb_glx_get_separable_filter_rows_and_cols_end(const xcb_glx_get_separable_filter_reply_t * R)8736 xcb_glx_get_separable_filter_rows_and_cols_end (const xcb_glx_get_separable_filter_reply_t *R  /**< */)
8737 {
8738     xcb_generic_iterator_t i;
8739     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
8740     i.rem = 0;
8741     i.index = (char *) i.data - (char *) R;
8742     return i;
8743 }
8744 
8745 xcb_glx_get_separable_filter_reply_t *
xcb_glx_get_separable_filter_reply(xcb_connection_t * c,xcb_glx_get_separable_filter_cookie_t cookie,xcb_generic_error_t ** e)8746 xcb_glx_get_separable_filter_reply (xcb_connection_t                       *c  /**< */,
8747                                     xcb_glx_get_separable_filter_cookie_t   cookie  /**< */,
8748                                     xcb_generic_error_t                   **e  /**< */)
8749 {
8750     return (xcb_glx_get_separable_filter_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8751 }
8752 
8753 int
xcb_glx_get_histogram_sizeof(const void * _buffer)8754 xcb_glx_get_histogram_sizeof (const void  *_buffer  /**< */)
8755 {
8756     char *xcb_tmp = (char *)_buffer;
8757     const xcb_glx_get_histogram_reply_t *_aux = (xcb_glx_get_histogram_reply_t *)_buffer;
8758     unsigned int xcb_buffer_len = 0;
8759     unsigned int xcb_block_len = 0;
8760     unsigned int xcb_pad = 0;
8761     unsigned int xcb_align_to = 0;
8762 
8763 
8764     xcb_block_len += sizeof(xcb_glx_get_histogram_reply_t);
8765     xcb_tmp += xcb_block_len;
8766     xcb_buffer_len += xcb_block_len;
8767     xcb_block_len = 0;
8768     /* data */
8769     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
8770     xcb_tmp += xcb_block_len;
8771     xcb_align_to = ALIGNOF(uint8_t);
8772     /* insert padding */
8773     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8774     xcb_buffer_len += xcb_block_len + xcb_pad;
8775     if (0 != xcb_pad) {
8776         xcb_tmp += xcb_pad;
8777         xcb_pad = 0;
8778     }
8779     xcb_block_len = 0;
8780 
8781     return xcb_buffer_len;
8782 }
8783 
8784 xcb_glx_get_histogram_cookie_t
xcb_glx_get_histogram(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes,uint8_t reset)8785 xcb_glx_get_histogram (xcb_connection_t      *c  /**< */,
8786                        xcb_glx_context_tag_t  context_tag  /**< */,
8787                        uint32_t               target  /**< */,
8788                        uint32_t               format  /**< */,
8789                        uint32_t               type  /**< */,
8790                        uint8_t                swap_bytes  /**< */,
8791                        uint8_t                reset  /**< */)
8792 {
8793     static const xcb_protocol_request_t xcb_req = {
8794         /* count */ 2,
8795         /* ext */ &xcb_glx_id,
8796         /* opcode */ XCB_GLX_GET_HISTOGRAM,
8797         /* isvoid */ 0
8798     };
8799 
8800     struct iovec xcb_parts[4];
8801     xcb_glx_get_histogram_cookie_t xcb_ret;
8802     xcb_glx_get_histogram_request_t xcb_out;
8803 
8804     xcb_out.context_tag = context_tag;
8805     xcb_out.target = target;
8806     xcb_out.format = format;
8807     xcb_out.type = type;
8808     xcb_out.swap_bytes = swap_bytes;
8809     xcb_out.reset = reset;
8810 
8811     xcb_parts[2].iov_base = (char *) &xcb_out;
8812     xcb_parts[2].iov_len = sizeof(xcb_out);
8813     xcb_parts[3].iov_base = 0;
8814     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8815 
8816     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8817     return xcb_ret;
8818 }
8819 
8820 xcb_glx_get_histogram_cookie_t
xcb_glx_get_histogram_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes,uint8_t reset)8821 xcb_glx_get_histogram_unchecked (xcb_connection_t      *c  /**< */,
8822                                  xcb_glx_context_tag_t  context_tag  /**< */,
8823                                  uint32_t               target  /**< */,
8824                                  uint32_t               format  /**< */,
8825                                  uint32_t               type  /**< */,
8826                                  uint8_t                swap_bytes  /**< */,
8827                                  uint8_t                reset  /**< */)
8828 {
8829     static const xcb_protocol_request_t xcb_req = {
8830         /* count */ 2,
8831         /* ext */ &xcb_glx_id,
8832         /* opcode */ XCB_GLX_GET_HISTOGRAM,
8833         /* isvoid */ 0
8834     };
8835 
8836     struct iovec xcb_parts[4];
8837     xcb_glx_get_histogram_cookie_t xcb_ret;
8838     xcb_glx_get_histogram_request_t xcb_out;
8839 
8840     xcb_out.context_tag = context_tag;
8841     xcb_out.target = target;
8842     xcb_out.format = format;
8843     xcb_out.type = type;
8844     xcb_out.swap_bytes = swap_bytes;
8845     xcb_out.reset = reset;
8846 
8847     xcb_parts[2].iov_base = (char *) &xcb_out;
8848     xcb_parts[2].iov_len = sizeof(xcb_out);
8849     xcb_parts[3].iov_base = 0;
8850     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8851 
8852     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8853     return xcb_ret;
8854 }
8855 
8856 uint8_t *
xcb_glx_get_histogram_data(const xcb_glx_get_histogram_reply_t * R)8857 xcb_glx_get_histogram_data (const xcb_glx_get_histogram_reply_t *R  /**< */)
8858 {
8859     return (uint8_t *) (R + 1);
8860 }
8861 
8862 int
xcb_glx_get_histogram_data_length(const xcb_glx_get_histogram_reply_t * R)8863 xcb_glx_get_histogram_data_length (const xcb_glx_get_histogram_reply_t *R  /**< */)
8864 {
8865     return (R->length * 4);
8866 }
8867 
8868 xcb_generic_iterator_t
xcb_glx_get_histogram_data_end(const xcb_glx_get_histogram_reply_t * R)8869 xcb_glx_get_histogram_data_end (const xcb_glx_get_histogram_reply_t *R  /**< */)
8870 {
8871     xcb_generic_iterator_t i;
8872     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
8873     i.rem = 0;
8874     i.index = (char *) i.data - (char *) R;
8875     return i;
8876 }
8877 
8878 xcb_glx_get_histogram_reply_t *
xcb_glx_get_histogram_reply(xcb_connection_t * c,xcb_glx_get_histogram_cookie_t cookie,xcb_generic_error_t ** e)8879 xcb_glx_get_histogram_reply (xcb_connection_t                *c  /**< */,
8880                              xcb_glx_get_histogram_cookie_t   cookie  /**< */,
8881                              xcb_generic_error_t            **e  /**< */)
8882 {
8883     return (xcb_glx_get_histogram_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
8884 }
8885 
8886 int
xcb_glx_get_histogram_parameterfv_sizeof(const void * _buffer)8887 xcb_glx_get_histogram_parameterfv_sizeof (const void  *_buffer  /**< */)
8888 {
8889     char *xcb_tmp = (char *)_buffer;
8890     const xcb_glx_get_histogram_parameterfv_reply_t *_aux = (xcb_glx_get_histogram_parameterfv_reply_t *)_buffer;
8891     unsigned int xcb_buffer_len = 0;
8892     unsigned int xcb_block_len = 0;
8893     unsigned int xcb_pad = 0;
8894     unsigned int xcb_align_to = 0;
8895 
8896 
8897     xcb_block_len += sizeof(xcb_glx_get_histogram_parameterfv_reply_t);
8898     xcb_tmp += xcb_block_len;
8899     xcb_buffer_len += xcb_block_len;
8900     xcb_block_len = 0;
8901     /* data */
8902     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
8903     xcb_tmp += xcb_block_len;
8904     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
8905     /* insert padding */
8906     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
8907     xcb_buffer_len += xcb_block_len + xcb_pad;
8908     if (0 != xcb_pad) {
8909         xcb_tmp += xcb_pad;
8910         xcb_pad = 0;
8911     }
8912     xcb_block_len = 0;
8913 
8914     return xcb_buffer_len;
8915 }
8916 
8917 xcb_glx_get_histogram_parameterfv_cookie_t
xcb_glx_get_histogram_parameterfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8918 xcb_glx_get_histogram_parameterfv (xcb_connection_t      *c  /**< */,
8919                                    xcb_glx_context_tag_t  context_tag  /**< */,
8920                                    uint32_t               target  /**< */,
8921                                    uint32_t               pname  /**< */)
8922 {
8923     static const xcb_protocol_request_t xcb_req = {
8924         /* count */ 2,
8925         /* ext */ &xcb_glx_id,
8926         /* opcode */ XCB_GLX_GET_HISTOGRAM_PARAMETERFV,
8927         /* isvoid */ 0
8928     };
8929 
8930     struct iovec xcb_parts[4];
8931     xcb_glx_get_histogram_parameterfv_cookie_t xcb_ret;
8932     xcb_glx_get_histogram_parameterfv_request_t xcb_out;
8933 
8934     xcb_out.context_tag = context_tag;
8935     xcb_out.target = target;
8936     xcb_out.pname = pname;
8937 
8938     xcb_parts[2].iov_base = (char *) &xcb_out;
8939     xcb_parts[2].iov_len = sizeof(xcb_out);
8940     xcb_parts[3].iov_base = 0;
8941     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8942 
8943     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
8944     return xcb_ret;
8945 }
8946 
8947 xcb_glx_get_histogram_parameterfv_cookie_t
xcb_glx_get_histogram_parameterfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)8948 xcb_glx_get_histogram_parameterfv_unchecked (xcb_connection_t      *c  /**< */,
8949                                              xcb_glx_context_tag_t  context_tag  /**< */,
8950                                              uint32_t               target  /**< */,
8951                                              uint32_t               pname  /**< */)
8952 {
8953     static const xcb_protocol_request_t xcb_req = {
8954         /* count */ 2,
8955         /* ext */ &xcb_glx_id,
8956         /* opcode */ XCB_GLX_GET_HISTOGRAM_PARAMETERFV,
8957         /* isvoid */ 0
8958     };
8959 
8960     struct iovec xcb_parts[4];
8961     xcb_glx_get_histogram_parameterfv_cookie_t xcb_ret;
8962     xcb_glx_get_histogram_parameterfv_request_t xcb_out;
8963 
8964     xcb_out.context_tag = context_tag;
8965     xcb_out.target = target;
8966     xcb_out.pname = pname;
8967 
8968     xcb_parts[2].iov_base = (char *) &xcb_out;
8969     xcb_parts[2].iov_len = sizeof(xcb_out);
8970     xcb_parts[3].iov_base = 0;
8971     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
8972 
8973     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
8974     return xcb_ret;
8975 }
8976 
8977 xcb_glx_float32_t *
xcb_glx_get_histogram_parameterfv_data(const xcb_glx_get_histogram_parameterfv_reply_t * R)8978 xcb_glx_get_histogram_parameterfv_data (const xcb_glx_get_histogram_parameterfv_reply_t *R  /**< */)
8979 {
8980     return (xcb_glx_float32_t *) (R + 1);
8981 }
8982 
8983 int
xcb_glx_get_histogram_parameterfv_data_length(const xcb_glx_get_histogram_parameterfv_reply_t * R)8984 xcb_glx_get_histogram_parameterfv_data_length (const xcb_glx_get_histogram_parameterfv_reply_t *R  /**< */)
8985 {
8986     return R->n;
8987 }
8988 
8989 xcb_generic_iterator_t
xcb_glx_get_histogram_parameterfv_data_end(const xcb_glx_get_histogram_parameterfv_reply_t * R)8990 xcb_glx_get_histogram_parameterfv_data_end (const xcb_glx_get_histogram_parameterfv_reply_t *R  /**< */)
8991 {
8992     xcb_generic_iterator_t i;
8993     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
8994     i.rem = 0;
8995     i.index = (char *) i.data - (char *) R;
8996     return i;
8997 }
8998 
8999 xcb_glx_get_histogram_parameterfv_reply_t *
xcb_glx_get_histogram_parameterfv_reply(xcb_connection_t * c,xcb_glx_get_histogram_parameterfv_cookie_t cookie,xcb_generic_error_t ** e)9000 xcb_glx_get_histogram_parameterfv_reply (xcb_connection_t                            *c  /**< */,
9001                                          xcb_glx_get_histogram_parameterfv_cookie_t   cookie  /**< */,
9002                                          xcb_generic_error_t                        **e  /**< */)
9003 {
9004     return (xcb_glx_get_histogram_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
9005 }
9006 
9007 int
xcb_glx_get_histogram_parameteriv_sizeof(const void * _buffer)9008 xcb_glx_get_histogram_parameteriv_sizeof (const void  *_buffer  /**< */)
9009 {
9010     char *xcb_tmp = (char *)_buffer;
9011     const xcb_glx_get_histogram_parameteriv_reply_t *_aux = (xcb_glx_get_histogram_parameteriv_reply_t *)_buffer;
9012     unsigned int xcb_buffer_len = 0;
9013     unsigned int xcb_block_len = 0;
9014     unsigned int xcb_pad = 0;
9015     unsigned int xcb_align_to = 0;
9016 
9017 
9018     xcb_block_len += sizeof(xcb_glx_get_histogram_parameteriv_reply_t);
9019     xcb_tmp += xcb_block_len;
9020     xcb_buffer_len += xcb_block_len;
9021     xcb_block_len = 0;
9022     /* data */
9023     xcb_block_len += _aux->n * sizeof(int32_t);
9024     xcb_tmp += xcb_block_len;
9025     xcb_align_to = ALIGNOF(int32_t);
9026     /* insert padding */
9027     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9028     xcb_buffer_len += xcb_block_len + xcb_pad;
9029     if (0 != xcb_pad) {
9030         xcb_tmp += xcb_pad;
9031         xcb_pad = 0;
9032     }
9033     xcb_block_len = 0;
9034 
9035     return xcb_buffer_len;
9036 }
9037 
9038 xcb_glx_get_histogram_parameteriv_cookie_t
xcb_glx_get_histogram_parameteriv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)9039 xcb_glx_get_histogram_parameteriv (xcb_connection_t      *c  /**< */,
9040                                    xcb_glx_context_tag_t  context_tag  /**< */,
9041                                    uint32_t               target  /**< */,
9042                                    uint32_t               pname  /**< */)
9043 {
9044     static const xcb_protocol_request_t xcb_req = {
9045         /* count */ 2,
9046         /* ext */ &xcb_glx_id,
9047         /* opcode */ XCB_GLX_GET_HISTOGRAM_PARAMETERIV,
9048         /* isvoid */ 0
9049     };
9050 
9051     struct iovec xcb_parts[4];
9052     xcb_glx_get_histogram_parameteriv_cookie_t xcb_ret;
9053     xcb_glx_get_histogram_parameteriv_request_t xcb_out;
9054 
9055     xcb_out.context_tag = context_tag;
9056     xcb_out.target = target;
9057     xcb_out.pname = pname;
9058 
9059     xcb_parts[2].iov_base = (char *) &xcb_out;
9060     xcb_parts[2].iov_len = sizeof(xcb_out);
9061     xcb_parts[3].iov_base = 0;
9062     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9063 
9064     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9065     return xcb_ret;
9066 }
9067 
9068 xcb_glx_get_histogram_parameteriv_cookie_t
xcb_glx_get_histogram_parameteriv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)9069 xcb_glx_get_histogram_parameteriv_unchecked (xcb_connection_t      *c  /**< */,
9070                                              xcb_glx_context_tag_t  context_tag  /**< */,
9071                                              uint32_t               target  /**< */,
9072                                              uint32_t               pname  /**< */)
9073 {
9074     static const xcb_protocol_request_t xcb_req = {
9075         /* count */ 2,
9076         /* ext */ &xcb_glx_id,
9077         /* opcode */ XCB_GLX_GET_HISTOGRAM_PARAMETERIV,
9078         /* isvoid */ 0
9079     };
9080 
9081     struct iovec xcb_parts[4];
9082     xcb_glx_get_histogram_parameteriv_cookie_t xcb_ret;
9083     xcb_glx_get_histogram_parameteriv_request_t xcb_out;
9084 
9085     xcb_out.context_tag = context_tag;
9086     xcb_out.target = target;
9087     xcb_out.pname = pname;
9088 
9089     xcb_parts[2].iov_base = (char *) &xcb_out;
9090     xcb_parts[2].iov_len = sizeof(xcb_out);
9091     xcb_parts[3].iov_base = 0;
9092     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9093 
9094     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9095     return xcb_ret;
9096 }
9097 
9098 int32_t *
xcb_glx_get_histogram_parameteriv_data(const xcb_glx_get_histogram_parameteriv_reply_t * R)9099 xcb_glx_get_histogram_parameteriv_data (const xcb_glx_get_histogram_parameteriv_reply_t *R  /**< */)
9100 {
9101     return (int32_t *) (R + 1);
9102 }
9103 
9104 int
xcb_glx_get_histogram_parameteriv_data_length(const xcb_glx_get_histogram_parameteriv_reply_t * R)9105 xcb_glx_get_histogram_parameteriv_data_length (const xcb_glx_get_histogram_parameteriv_reply_t *R  /**< */)
9106 {
9107     return R->n;
9108 }
9109 
9110 xcb_generic_iterator_t
xcb_glx_get_histogram_parameteriv_data_end(const xcb_glx_get_histogram_parameteriv_reply_t * R)9111 xcb_glx_get_histogram_parameteriv_data_end (const xcb_glx_get_histogram_parameteriv_reply_t *R  /**< */)
9112 {
9113     xcb_generic_iterator_t i;
9114     i.data = ((int32_t *) (R + 1)) + (R->n);
9115     i.rem = 0;
9116     i.index = (char *) i.data - (char *) R;
9117     return i;
9118 }
9119 
9120 xcb_glx_get_histogram_parameteriv_reply_t *
xcb_glx_get_histogram_parameteriv_reply(xcb_connection_t * c,xcb_glx_get_histogram_parameteriv_cookie_t cookie,xcb_generic_error_t ** e)9121 xcb_glx_get_histogram_parameteriv_reply (xcb_connection_t                            *c  /**< */,
9122                                          xcb_glx_get_histogram_parameteriv_cookie_t   cookie  /**< */,
9123                                          xcb_generic_error_t                        **e  /**< */)
9124 {
9125     return (xcb_glx_get_histogram_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
9126 }
9127 
9128 int
xcb_glx_get_minmax_sizeof(const void * _buffer)9129 xcb_glx_get_minmax_sizeof (const void  *_buffer  /**< */)
9130 {
9131     char *xcb_tmp = (char *)_buffer;
9132     const xcb_glx_get_minmax_reply_t *_aux = (xcb_glx_get_minmax_reply_t *)_buffer;
9133     unsigned int xcb_buffer_len = 0;
9134     unsigned int xcb_block_len = 0;
9135     unsigned int xcb_pad = 0;
9136     unsigned int xcb_align_to = 0;
9137 
9138 
9139     xcb_block_len += sizeof(xcb_glx_get_minmax_reply_t);
9140     xcb_tmp += xcb_block_len;
9141     xcb_buffer_len += xcb_block_len;
9142     xcb_block_len = 0;
9143     /* data */
9144     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
9145     xcb_tmp += xcb_block_len;
9146     xcb_align_to = ALIGNOF(uint8_t);
9147     /* insert padding */
9148     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9149     xcb_buffer_len += xcb_block_len + xcb_pad;
9150     if (0 != xcb_pad) {
9151         xcb_tmp += xcb_pad;
9152         xcb_pad = 0;
9153     }
9154     xcb_block_len = 0;
9155 
9156     return xcb_buffer_len;
9157 }
9158 
9159 xcb_glx_get_minmax_cookie_t
xcb_glx_get_minmax(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes,uint8_t reset)9160 xcb_glx_get_minmax (xcb_connection_t      *c  /**< */,
9161                     xcb_glx_context_tag_t  context_tag  /**< */,
9162                     uint32_t               target  /**< */,
9163                     uint32_t               format  /**< */,
9164                     uint32_t               type  /**< */,
9165                     uint8_t                swap_bytes  /**< */,
9166                     uint8_t                reset  /**< */)
9167 {
9168     static const xcb_protocol_request_t xcb_req = {
9169         /* count */ 2,
9170         /* ext */ &xcb_glx_id,
9171         /* opcode */ XCB_GLX_GET_MINMAX,
9172         /* isvoid */ 0
9173     };
9174 
9175     struct iovec xcb_parts[4];
9176     xcb_glx_get_minmax_cookie_t xcb_ret;
9177     xcb_glx_get_minmax_request_t xcb_out;
9178 
9179     xcb_out.context_tag = context_tag;
9180     xcb_out.target = target;
9181     xcb_out.format = format;
9182     xcb_out.type = type;
9183     xcb_out.swap_bytes = swap_bytes;
9184     xcb_out.reset = reset;
9185 
9186     xcb_parts[2].iov_base = (char *) &xcb_out;
9187     xcb_parts[2].iov_len = sizeof(xcb_out);
9188     xcb_parts[3].iov_base = 0;
9189     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9190 
9191     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9192     return xcb_ret;
9193 }
9194 
9195 xcb_glx_get_minmax_cookie_t
xcb_glx_get_minmax_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t format,uint32_t type,uint8_t swap_bytes,uint8_t reset)9196 xcb_glx_get_minmax_unchecked (xcb_connection_t      *c  /**< */,
9197                               xcb_glx_context_tag_t  context_tag  /**< */,
9198                               uint32_t               target  /**< */,
9199                               uint32_t               format  /**< */,
9200                               uint32_t               type  /**< */,
9201                               uint8_t                swap_bytes  /**< */,
9202                               uint8_t                reset  /**< */)
9203 {
9204     static const xcb_protocol_request_t xcb_req = {
9205         /* count */ 2,
9206         /* ext */ &xcb_glx_id,
9207         /* opcode */ XCB_GLX_GET_MINMAX,
9208         /* isvoid */ 0
9209     };
9210 
9211     struct iovec xcb_parts[4];
9212     xcb_glx_get_minmax_cookie_t xcb_ret;
9213     xcb_glx_get_minmax_request_t xcb_out;
9214 
9215     xcb_out.context_tag = context_tag;
9216     xcb_out.target = target;
9217     xcb_out.format = format;
9218     xcb_out.type = type;
9219     xcb_out.swap_bytes = swap_bytes;
9220     xcb_out.reset = reset;
9221 
9222     xcb_parts[2].iov_base = (char *) &xcb_out;
9223     xcb_parts[2].iov_len = sizeof(xcb_out);
9224     xcb_parts[3].iov_base = 0;
9225     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9226 
9227     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9228     return xcb_ret;
9229 }
9230 
9231 uint8_t *
xcb_glx_get_minmax_data(const xcb_glx_get_minmax_reply_t * R)9232 xcb_glx_get_minmax_data (const xcb_glx_get_minmax_reply_t *R  /**< */)
9233 {
9234     return (uint8_t *) (R + 1);
9235 }
9236 
9237 int
xcb_glx_get_minmax_data_length(const xcb_glx_get_minmax_reply_t * R)9238 xcb_glx_get_minmax_data_length (const xcb_glx_get_minmax_reply_t *R  /**< */)
9239 {
9240     return (R->length * 4);
9241 }
9242 
9243 xcb_generic_iterator_t
xcb_glx_get_minmax_data_end(const xcb_glx_get_minmax_reply_t * R)9244 xcb_glx_get_minmax_data_end (const xcb_glx_get_minmax_reply_t *R  /**< */)
9245 {
9246     xcb_generic_iterator_t i;
9247     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
9248     i.rem = 0;
9249     i.index = (char *) i.data - (char *) R;
9250     return i;
9251 }
9252 
9253 xcb_glx_get_minmax_reply_t *
xcb_glx_get_minmax_reply(xcb_connection_t * c,xcb_glx_get_minmax_cookie_t cookie,xcb_generic_error_t ** e)9254 xcb_glx_get_minmax_reply (xcb_connection_t             *c  /**< */,
9255                           xcb_glx_get_minmax_cookie_t   cookie  /**< */,
9256                           xcb_generic_error_t         **e  /**< */)
9257 {
9258     return (xcb_glx_get_minmax_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
9259 }
9260 
9261 int
xcb_glx_get_minmax_parameterfv_sizeof(const void * _buffer)9262 xcb_glx_get_minmax_parameterfv_sizeof (const void  *_buffer  /**< */)
9263 {
9264     char *xcb_tmp = (char *)_buffer;
9265     const xcb_glx_get_minmax_parameterfv_reply_t *_aux = (xcb_glx_get_minmax_parameterfv_reply_t *)_buffer;
9266     unsigned int xcb_buffer_len = 0;
9267     unsigned int xcb_block_len = 0;
9268     unsigned int xcb_pad = 0;
9269     unsigned int xcb_align_to = 0;
9270 
9271 
9272     xcb_block_len += sizeof(xcb_glx_get_minmax_parameterfv_reply_t);
9273     xcb_tmp += xcb_block_len;
9274     xcb_buffer_len += xcb_block_len;
9275     xcb_block_len = 0;
9276     /* data */
9277     xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t);
9278     xcb_tmp += xcb_block_len;
9279     xcb_align_to = ALIGNOF(xcb_glx_float32_t);
9280     /* insert padding */
9281     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9282     xcb_buffer_len += xcb_block_len + xcb_pad;
9283     if (0 != xcb_pad) {
9284         xcb_tmp += xcb_pad;
9285         xcb_pad = 0;
9286     }
9287     xcb_block_len = 0;
9288 
9289     return xcb_buffer_len;
9290 }
9291 
9292 xcb_glx_get_minmax_parameterfv_cookie_t
xcb_glx_get_minmax_parameterfv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)9293 xcb_glx_get_minmax_parameterfv (xcb_connection_t      *c  /**< */,
9294                                 xcb_glx_context_tag_t  context_tag  /**< */,
9295                                 uint32_t               target  /**< */,
9296                                 uint32_t               pname  /**< */)
9297 {
9298     static const xcb_protocol_request_t xcb_req = {
9299         /* count */ 2,
9300         /* ext */ &xcb_glx_id,
9301         /* opcode */ XCB_GLX_GET_MINMAX_PARAMETERFV,
9302         /* isvoid */ 0
9303     };
9304 
9305     struct iovec xcb_parts[4];
9306     xcb_glx_get_minmax_parameterfv_cookie_t xcb_ret;
9307     xcb_glx_get_minmax_parameterfv_request_t xcb_out;
9308 
9309     xcb_out.context_tag = context_tag;
9310     xcb_out.target = target;
9311     xcb_out.pname = pname;
9312 
9313     xcb_parts[2].iov_base = (char *) &xcb_out;
9314     xcb_parts[2].iov_len = sizeof(xcb_out);
9315     xcb_parts[3].iov_base = 0;
9316     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9317 
9318     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9319     return xcb_ret;
9320 }
9321 
9322 xcb_glx_get_minmax_parameterfv_cookie_t
xcb_glx_get_minmax_parameterfv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)9323 xcb_glx_get_minmax_parameterfv_unchecked (xcb_connection_t      *c  /**< */,
9324                                           xcb_glx_context_tag_t  context_tag  /**< */,
9325                                           uint32_t               target  /**< */,
9326                                           uint32_t               pname  /**< */)
9327 {
9328     static const xcb_protocol_request_t xcb_req = {
9329         /* count */ 2,
9330         /* ext */ &xcb_glx_id,
9331         /* opcode */ XCB_GLX_GET_MINMAX_PARAMETERFV,
9332         /* isvoid */ 0
9333     };
9334 
9335     struct iovec xcb_parts[4];
9336     xcb_glx_get_minmax_parameterfv_cookie_t xcb_ret;
9337     xcb_glx_get_minmax_parameterfv_request_t xcb_out;
9338 
9339     xcb_out.context_tag = context_tag;
9340     xcb_out.target = target;
9341     xcb_out.pname = pname;
9342 
9343     xcb_parts[2].iov_base = (char *) &xcb_out;
9344     xcb_parts[2].iov_len = sizeof(xcb_out);
9345     xcb_parts[3].iov_base = 0;
9346     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9347 
9348     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9349     return xcb_ret;
9350 }
9351 
9352 xcb_glx_float32_t *
xcb_glx_get_minmax_parameterfv_data(const xcb_glx_get_minmax_parameterfv_reply_t * R)9353 xcb_glx_get_minmax_parameterfv_data (const xcb_glx_get_minmax_parameterfv_reply_t *R  /**< */)
9354 {
9355     return (xcb_glx_float32_t *) (R + 1);
9356 }
9357 
9358 int
xcb_glx_get_minmax_parameterfv_data_length(const xcb_glx_get_minmax_parameterfv_reply_t * R)9359 xcb_glx_get_minmax_parameterfv_data_length (const xcb_glx_get_minmax_parameterfv_reply_t *R  /**< */)
9360 {
9361     return R->n;
9362 }
9363 
9364 xcb_generic_iterator_t
xcb_glx_get_minmax_parameterfv_data_end(const xcb_glx_get_minmax_parameterfv_reply_t * R)9365 xcb_glx_get_minmax_parameterfv_data_end (const xcb_glx_get_minmax_parameterfv_reply_t *R  /**< */)
9366 {
9367     xcb_generic_iterator_t i;
9368     i.data = ((xcb_glx_float32_t *) (R + 1)) + (R->n);
9369     i.rem = 0;
9370     i.index = (char *) i.data - (char *) R;
9371     return i;
9372 }
9373 
9374 xcb_glx_get_minmax_parameterfv_reply_t *
xcb_glx_get_minmax_parameterfv_reply(xcb_connection_t * c,xcb_glx_get_minmax_parameterfv_cookie_t cookie,xcb_generic_error_t ** e)9375 xcb_glx_get_minmax_parameterfv_reply (xcb_connection_t                         *c  /**< */,
9376                                       xcb_glx_get_minmax_parameterfv_cookie_t   cookie  /**< */,
9377                                       xcb_generic_error_t                     **e  /**< */)
9378 {
9379     return (xcb_glx_get_minmax_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
9380 }
9381 
9382 int
xcb_glx_get_minmax_parameteriv_sizeof(const void * _buffer)9383 xcb_glx_get_minmax_parameteriv_sizeof (const void  *_buffer  /**< */)
9384 {
9385     char *xcb_tmp = (char *)_buffer;
9386     const xcb_glx_get_minmax_parameteriv_reply_t *_aux = (xcb_glx_get_minmax_parameteriv_reply_t *)_buffer;
9387     unsigned int xcb_buffer_len = 0;
9388     unsigned int xcb_block_len = 0;
9389     unsigned int xcb_pad = 0;
9390     unsigned int xcb_align_to = 0;
9391 
9392 
9393     xcb_block_len += sizeof(xcb_glx_get_minmax_parameteriv_reply_t);
9394     xcb_tmp += xcb_block_len;
9395     xcb_buffer_len += xcb_block_len;
9396     xcb_block_len = 0;
9397     /* data */
9398     xcb_block_len += _aux->n * sizeof(int32_t);
9399     xcb_tmp += xcb_block_len;
9400     xcb_align_to = ALIGNOF(int32_t);
9401     /* insert padding */
9402     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9403     xcb_buffer_len += xcb_block_len + xcb_pad;
9404     if (0 != xcb_pad) {
9405         xcb_tmp += xcb_pad;
9406         xcb_pad = 0;
9407     }
9408     xcb_block_len = 0;
9409 
9410     return xcb_buffer_len;
9411 }
9412 
9413 xcb_glx_get_minmax_parameteriv_cookie_t
xcb_glx_get_minmax_parameteriv(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)9414 xcb_glx_get_minmax_parameteriv (xcb_connection_t      *c  /**< */,
9415                                 xcb_glx_context_tag_t  context_tag  /**< */,
9416                                 uint32_t               target  /**< */,
9417                                 uint32_t               pname  /**< */)
9418 {
9419     static const xcb_protocol_request_t xcb_req = {
9420         /* count */ 2,
9421         /* ext */ &xcb_glx_id,
9422         /* opcode */ XCB_GLX_GET_MINMAX_PARAMETERIV,
9423         /* isvoid */ 0
9424     };
9425 
9426     struct iovec xcb_parts[4];
9427     xcb_glx_get_minmax_parameteriv_cookie_t xcb_ret;
9428     xcb_glx_get_minmax_parameteriv_request_t xcb_out;
9429 
9430     xcb_out.context_tag = context_tag;
9431     xcb_out.target = target;
9432     xcb_out.pname = pname;
9433 
9434     xcb_parts[2].iov_base = (char *) &xcb_out;
9435     xcb_parts[2].iov_len = sizeof(xcb_out);
9436     xcb_parts[3].iov_base = 0;
9437     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9438 
9439     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9440     return xcb_ret;
9441 }
9442 
9443 xcb_glx_get_minmax_parameteriv_cookie_t
xcb_glx_get_minmax_parameteriv_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)9444 xcb_glx_get_minmax_parameteriv_unchecked (xcb_connection_t      *c  /**< */,
9445                                           xcb_glx_context_tag_t  context_tag  /**< */,
9446                                           uint32_t               target  /**< */,
9447                                           uint32_t               pname  /**< */)
9448 {
9449     static const xcb_protocol_request_t xcb_req = {
9450         /* count */ 2,
9451         /* ext */ &xcb_glx_id,
9452         /* opcode */ XCB_GLX_GET_MINMAX_PARAMETERIV,
9453         /* isvoid */ 0
9454     };
9455 
9456     struct iovec xcb_parts[4];
9457     xcb_glx_get_minmax_parameteriv_cookie_t xcb_ret;
9458     xcb_glx_get_minmax_parameteriv_request_t xcb_out;
9459 
9460     xcb_out.context_tag = context_tag;
9461     xcb_out.target = target;
9462     xcb_out.pname = pname;
9463 
9464     xcb_parts[2].iov_base = (char *) &xcb_out;
9465     xcb_parts[2].iov_len = sizeof(xcb_out);
9466     xcb_parts[3].iov_base = 0;
9467     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9468 
9469     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9470     return xcb_ret;
9471 }
9472 
9473 int32_t *
xcb_glx_get_minmax_parameteriv_data(const xcb_glx_get_minmax_parameteriv_reply_t * R)9474 xcb_glx_get_minmax_parameteriv_data (const xcb_glx_get_minmax_parameteriv_reply_t *R  /**< */)
9475 {
9476     return (int32_t *) (R + 1);
9477 }
9478 
9479 int
xcb_glx_get_minmax_parameteriv_data_length(const xcb_glx_get_minmax_parameteriv_reply_t * R)9480 xcb_glx_get_minmax_parameteriv_data_length (const xcb_glx_get_minmax_parameteriv_reply_t *R  /**< */)
9481 {
9482     return R->n;
9483 }
9484 
9485 xcb_generic_iterator_t
xcb_glx_get_minmax_parameteriv_data_end(const xcb_glx_get_minmax_parameteriv_reply_t * R)9486 xcb_glx_get_minmax_parameteriv_data_end (const xcb_glx_get_minmax_parameteriv_reply_t *R  /**< */)
9487 {
9488     xcb_generic_iterator_t i;
9489     i.data = ((int32_t *) (R + 1)) + (R->n);
9490     i.rem = 0;
9491     i.index = (char *) i.data - (char *) R;
9492     return i;
9493 }
9494 
9495 xcb_glx_get_minmax_parameteriv_reply_t *
xcb_glx_get_minmax_parameteriv_reply(xcb_connection_t * c,xcb_glx_get_minmax_parameteriv_cookie_t cookie,xcb_generic_error_t ** e)9496 xcb_glx_get_minmax_parameteriv_reply (xcb_connection_t                         *c  /**< */,
9497                                       xcb_glx_get_minmax_parameteriv_cookie_t   cookie  /**< */,
9498                                       xcb_generic_error_t                     **e  /**< */)
9499 {
9500     return (xcb_glx_get_minmax_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
9501 }
9502 
9503 int
xcb_glx_get_compressed_tex_image_arb_sizeof(const void * _buffer)9504 xcb_glx_get_compressed_tex_image_arb_sizeof (const void  *_buffer  /**< */)
9505 {
9506     char *xcb_tmp = (char *)_buffer;
9507     const xcb_glx_get_compressed_tex_image_arb_reply_t *_aux = (xcb_glx_get_compressed_tex_image_arb_reply_t *)_buffer;
9508     unsigned int xcb_buffer_len = 0;
9509     unsigned int xcb_block_len = 0;
9510     unsigned int xcb_pad = 0;
9511     unsigned int xcb_align_to = 0;
9512 
9513 
9514     xcb_block_len += sizeof(xcb_glx_get_compressed_tex_image_arb_reply_t);
9515     xcb_tmp += xcb_block_len;
9516     xcb_buffer_len += xcb_block_len;
9517     xcb_block_len = 0;
9518     /* data */
9519     xcb_block_len += (_aux->length * 4) * sizeof(uint8_t);
9520     xcb_tmp += xcb_block_len;
9521     xcb_align_to = ALIGNOF(uint8_t);
9522     /* insert padding */
9523     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9524     xcb_buffer_len += xcb_block_len + xcb_pad;
9525     if (0 != xcb_pad) {
9526         xcb_tmp += xcb_pad;
9527         xcb_pad = 0;
9528     }
9529     xcb_block_len = 0;
9530 
9531     return xcb_buffer_len;
9532 }
9533 
9534 xcb_glx_get_compressed_tex_image_arb_cookie_t
xcb_glx_get_compressed_tex_image_arb(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,int32_t level)9535 xcb_glx_get_compressed_tex_image_arb (xcb_connection_t      *c  /**< */,
9536                                       xcb_glx_context_tag_t  context_tag  /**< */,
9537                                       uint32_t               target  /**< */,
9538                                       int32_t                level  /**< */)
9539 {
9540     static const xcb_protocol_request_t xcb_req = {
9541         /* count */ 2,
9542         /* ext */ &xcb_glx_id,
9543         /* opcode */ XCB_GLX_GET_COMPRESSED_TEX_IMAGE_ARB,
9544         /* isvoid */ 0
9545     };
9546 
9547     struct iovec xcb_parts[4];
9548     xcb_glx_get_compressed_tex_image_arb_cookie_t xcb_ret;
9549     xcb_glx_get_compressed_tex_image_arb_request_t xcb_out;
9550 
9551     xcb_out.context_tag = context_tag;
9552     xcb_out.target = target;
9553     xcb_out.level = level;
9554 
9555     xcb_parts[2].iov_base = (char *) &xcb_out;
9556     xcb_parts[2].iov_len = sizeof(xcb_out);
9557     xcb_parts[3].iov_base = 0;
9558     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9559 
9560     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9561     return xcb_ret;
9562 }
9563 
9564 xcb_glx_get_compressed_tex_image_arb_cookie_t
xcb_glx_get_compressed_tex_image_arb_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,int32_t level)9565 xcb_glx_get_compressed_tex_image_arb_unchecked (xcb_connection_t      *c  /**< */,
9566                                                 xcb_glx_context_tag_t  context_tag  /**< */,
9567                                                 uint32_t               target  /**< */,
9568                                                 int32_t                level  /**< */)
9569 {
9570     static const xcb_protocol_request_t xcb_req = {
9571         /* count */ 2,
9572         /* ext */ &xcb_glx_id,
9573         /* opcode */ XCB_GLX_GET_COMPRESSED_TEX_IMAGE_ARB,
9574         /* isvoid */ 0
9575     };
9576 
9577     struct iovec xcb_parts[4];
9578     xcb_glx_get_compressed_tex_image_arb_cookie_t xcb_ret;
9579     xcb_glx_get_compressed_tex_image_arb_request_t xcb_out;
9580 
9581     xcb_out.context_tag = context_tag;
9582     xcb_out.target = target;
9583     xcb_out.level = level;
9584 
9585     xcb_parts[2].iov_base = (char *) &xcb_out;
9586     xcb_parts[2].iov_len = sizeof(xcb_out);
9587     xcb_parts[3].iov_base = 0;
9588     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9589 
9590     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9591     return xcb_ret;
9592 }
9593 
9594 uint8_t *
xcb_glx_get_compressed_tex_image_arb_data(const xcb_glx_get_compressed_tex_image_arb_reply_t * R)9595 xcb_glx_get_compressed_tex_image_arb_data (const xcb_glx_get_compressed_tex_image_arb_reply_t *R  /**< */)
9596 {
9597     return (uint8_t *) (R + 1);
9598 }
9599 
9600 int
xcb_glx_get_compressed_tex_image_arb_data_length(const xcb_glx_get_compressed_tex_image_arb_reply_t * R)9601 xcb_glx_get_compressed_tex_image_arb_data_length (const xcb_glx_get_compressed_tex_image_arb_reply_t *R  /**< */)
9602 {
9603     return (R->length * 4);
9604 }
9605 
9606 xcb_generic_iterator_t
xcb_glx_get_compressed_tex_image_arb_data_end(const xcb_glx_get_compressed_tex_image_arb_reply_t * R)9607 xcb_glx_get_compressed_tex_image_arb_data_end (const xcb_glx_get_compressed_tex_image_arb_reply_t *R  /**< */)
9608 {
9609     xcb_generic_iterator_t i;
9610     i.data = ((uint8_t *) (R + 1)) + ((R->length * 4));
9611     i.rem = 0;
9612     i.index = (char *) i.data - (char *) R;
9613     return i;
9614 }
9615 
9616 xcb_glx_get_compressed_tex_image_arb_reply_t *
xcb_glx_get_compressed_tex_image_arb_reply(xcb_connection_t * c,xcb_glx_get_compressed_tex_image_arb_cookie_t cookie,xcb_generic_error_t ** e)9617 xcb_glx_get_compressed_tex_image_arb_reply (xcb_connection_t                               *c  /**< */,
9618                                             xcb_glx_get_compressed_tex_image_arb_cookie_t   cookie  /**< */,
9619                                             xcb_generic_error_t                           **e  /**< */)
9620 {
9621     return (xcb_glx_get_compressed_tex_image_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
9622 }
9623 
9624 int
xcb_glx_delete_queries_arb_sizeof(const void * _buffer)9625 xcb_glx_delete_queries_arb_sizeof (const void  *_buffer  /**< */)
9626 {
9627     char *xcb_tmp = (char *)_buffer;
9628     const xcb_glx_delete_queries_arb_request_t *_aux = (xcb_glx_delete_queries_arb_request_t *)_buffer;
9629     unsigned int xcb_buffer_len = 0;
9630     unsigned int xcb_block_len = 0;
9631     unsigned int xcb_pad = 0;
9632     unsigned int xcb_align_to = 0;
9633 
9634 
9635     xcb_block_len += sizeof(xcb_glx_delete_queries_arb_request_t);
9636     xcb_tmp += xcb_block_len;
9637     xcb_buffer_len += xcb_block_len;
9638     xcb_block_len = 0;
9639     /* ids */
9640     xcb_block_len += _aux->n * sizeof(uint32_t);
9641     xcb_tmp += xcb_block_len;
9642     xcb_align_to = ALIGNOF(uint32_t);
9643     /* insert padding */
9644     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9645     xcb_buffer_len += xcb_block_len + xcb_pad;
9646     if (0 != xcb_pad) {
9647         xcb_tmp += xcb_pad;
9648         xcb_pad = 0;
9649     }
9650     xcb_block_len = 0;
9651 
9652     return xcb_buffer_len;
9653 }
9654 
9655 xcb_void_cookie_t
xcb_glx_delete_queries_arb_checked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n,const uint32_t * ids)9656 xcb_glx_delete_queries_arb_checked (xcb_connection_t      *c  /**< */,
9657                                     xcb_glx_context_tag_t  context_tag  /**< */,
9658                                     int32_t                n  /**< */,
9659                                     const uint32_t        *ids  /**< */)
9660 {
9661     static const xcb_protocol_request_t xcb_req = {
9662         /* count */ 4,
9663         /* ext */ &xcb_glx_id,
9664         /* opcode */ XCB_GLX_DELETE_QUERIES_ARB,
9665         /* isvoid */ 1
9666     };
9667 
9668     struct iovec xcb_parts[6];
9669     xcb_void_cookie_t xcb_ret;
9670     xcb_glx_delete_queries_arb_request_t xcb_out;
9671 
9672     xcb_out.context_tag = context_tag;
9673     xcb_out.n = n;
9674 
9675     xcb_parts[2].iov_base = (char *) &xcb_out;
9676     xcb_parts[2].iov_len = sizeof(xcb_out);
9677     xcb_parts[3].iov_base = 0;
9678     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9679     /* uint32_t ids */
9680     xcb_parts[4].iov_base = (char *) ids;
9681     xcb_parts[4].iov_len = n * sizeof(uint32_t);
9682     xcb_parts[5].iov_base = 0;
9683     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9684 
9685     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9686     return xcb_ret;
9687 }
9688 
9689 xcb_void_cookie_t
xcb_glx_delete_queries_arb(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n,const uint32_t * ids)9690 xcb_glx_delete_queries_arb (xcb_connection_t      *c  /**< */,
9691                             xcb_glx_context_tag_t  context_tag  /**< */,
9692                             int32_t                n  /**< */,
9693                             const uint32_t        *ids  /**< */)
9694 {
9695     static const xcb_protocol_request_t xcb_req = {
9696         /* count */ 4,
9697         /* ext */ &xcb_glx_id,
9698         /* opcode */ XCB_GLX_DELETE_QUERIES_ARB,
9699         /* isvoid */ 1
9700     };
9701 
9702     struct iovec xcb_parts[6];
9703     xcb_void_cookie_t xcb_ret;
9704     xcb_glx_delete_queries_arb_request_t xcb_out;
9705 
9706     xcb_out.context_tag = context_tag;
9707     xcb_out.n = n;
9708 
9709     xcb_parts[2].iov_base = (char *) &xcb_out;
9710     xcb_parts[2].iov_len = sizeof(xcb_out);
9711     xcb_parts[3].iov_base = 0;
9712     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9713     /* uint32_t ids */
9714     xcb_parts[4].iov_base = (char *) ids;
9715     xcb_parts[4].iov_len = n * sizeof(uint32_t);
9716     xcb_parts[5].iov_base = 0;
9717     xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
9718 
9719     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9720     return xcb_ret;
9721 }
9722 
9723 int
xcb_glx_gen_queries_arb_sizeof(const void * _buffer)9724 xcb_glx_gen_queries_arb_sizeof (const void  *_buffer  /**< */)
9725 {
9726     char *xcb_tmp = (char *)_buffer;
9727     const xcb_glx_gen_queries_arb_reply_t *_aux = (xcb_glx_gen_queries_arb_reply_t *)_buffer;
9728     unsigned int xcb_buffer_len = 0;
9729     unsigned int xcb_block_len = 0;
9730     unsigned int xcb_pad = 0;
9731     unsigned int xcb_align_to = 0;
9732 
9733 
9734     xcb_block_len += sizeof(xcb_glx_gen_queries_arb_reply_t);
9735     xcb_tmp += xcb_block_len;
9736     xcb_buffer_len += xcb_block_len;
9737     xcb_block_len = 0;
9738     /* data */
9739     xcb_block_len += _aux->length * sizeof(uint32_t);
9740     xcb_tmp += xcb_block_len;
9741     xcb_align_to = ALIGNOF(uint32_t);
9742     /* insert padding */
9743     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9744     xcb_buffer_len += xcb_block_len + xcb_pad;
9745     if (0 != xcb_pad) {
9746         xcb_tmp += xcb_pad;
9747         xcb_pad = 0;
9748     }
9749     xcb_block_len = 0;
9750 
9751     return xcb_buffer_len;
9752 }
9753 
9754 xcb_glx_gen_queries_arb_cookie_t
xcb_glx_gen_queries_arb(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n)9755 xcb_glx_gen_queries_arb (xcb_connection_t      *c  /**< */,
9756                          xcb_glx_context_tag_t  context_tag  /**< */,
9757                          int32_t                n  /**< */)
9758 {
9759     static const xcb_protocol_request_t xcb_req = {
9760         /* count */ 2,
9761         /* ext */ &xcb_glx_id,
9762         /* opcode */ XCB_GLX_GEN_QUERIES_ARB,
9763         /* isvoid */ 0
9764     };
9765 
9766     struct iovec xcb_parts[4];
9767     xcb_glx_gen_queries_arb_cookie_t xcb_ret;
9768     xcb_glx_gen_queries_arb_request_t xcb_out;
9769 
9770     xcb_out.context_tag = context_tag;
9771     xcb_out.n = n;
9772 
9773     xcb_parts[2].iov_base = (char *) &xcb_out;
9774     xcb_parts[2].iov_len = sizeof(xcb_out);
9775     xcb_parts[3].iov_base = 0;
9776     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9777 
9778     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9779     return xcb_ret;
9780 }
9781 
9782 xcb_glx_gen_queries_arb_cookie_t
xcb_glx_gen_queries_arb_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,int32_t n)9783 xcb_glx_gen_queries_arb_unchecked (xcb_connection_t      *c  /**< */,
9784                                    xcb_glx_context_tag_t  context_tag  /**< */,
9785                                    int32_t                n  /**< */)
9786 {
9787     static const xcb_protocol_request_t xcb_req = {
9788         /* count */ 2,
9789         /* ext */ &xcb_glx_id,
9790         /* opcode */ XCB_GLX_GEN_QUERIES_ARB,
9791         /* isvoid */ 0
9792     };
9793 
9794     struct iovec xcb_parts[4];
9795     xcb_glx_gen_queries_arb_cookie_t xcb_ret;
9796     xcb_glx_gen_queries_arb_request_t xcb_out;
9797 
9798     xcb_out.context_tag = context_tag;
9799     xcb_out.n = n;
9800 
9801     xcb_parts[2].iov_base = (char *) &xcb_out;
9802     xcb_parts[2].iov_len = sizeof(xcb_out);
9803     xcb_parts[3].iov_base = 0;
9804     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9805 
9806     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9807     return xcb_ret;
9808 }
9809 
9810 uint32_t *
xcb_glx_gen_queries_arb_data(const xcb_glx_gen_queries_arb_reply_t * R)9811 xcb_glx_gen_queries_arb_data (const xcb_glx_gen_queries_arb_reply_t *R  /**< */)
9812 {
9813     return (uint32_t *) (R + 1);
9814 }
9815 
9816 int
xcb_glx_gen_queries_arb_data_length(const xcb_glx_gen_queries_arb_reply_t * R)9817 xcb_glx_gen_queries_arb_data_length (const xcb_glx_gen_queries_arb_reply_t *R  /**< */)
9818 {
9819     return R->length;
9820 }
9821 
9822 xcb_generic_iterator_t
xcb_glx_gen_queries_arb_data_end(const xcb_glx_gen_queries_arb_reply_t * R)9823 xcb_glx_gen_queries_arb_data_end (const xcb_glx_gen_queries_arb_reply_t *R  /**< */)
9824 {
9825     xcb_generic_iterator_t i;
9826     i.data = ((uint32_t *) (R + 1)) + (R->length);
9827     i.rem = 0;
9828     i.index = (char *) i.data - (char *) R;
9829     return i;
9830 }
9831 
9832 xcb_glx_gen_queries_arb_reply_t *
xcb_glx_gen_queries_arb_reply(xcb_connection_t * c,xcb_glx_gen_queries_arb_cookie_t cookie,xcb_generic_error_t ** e)9833 xcb_glx_gen_queries_arb_reply (xcb_connection_t                  *c  /**< */,
9834                                xcb_glx_gen_queries_arb_cookie_t   cookie  /**< */,
9835                                xcb_generic_error_t              **e  /**< */)
9836 {
9837     return (xcb_glx_gen_queries_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
9838 }
9839 
9840 xcb_glx_is_query_arb_cookie_t
xcb_glx_is_query_arb(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t id)9841 xcb_glx_is_query_arb (xcb_connection_t      *c  /**< */,
9842                       xcb_glx_context_tag_t  context_tag  /**< */,
9843                       uint32_t               id  /**< */)
9844 {
9845     static const xcb_protocol_request_t xcb_req = {
9846         /* count */ 2,
9847         /* ext */ &xcb_glx_id,
9848         /* opcode */ XCB_GLX_IS_QUERY_ARB,
9849         /* isvoid */ 0
9850     };
9851 
9852     struct iovec xcb_parts[4];
9853     xcb_glx_is_query_arb_cookie_t xcb_ret;
9854     xcb_glx_is_query_arb_request_t xcb_out;
9855 
9856     xcb_out.context_tag = context_tag;
9857     xcb_out.id = id;
9858 
9859     xcb_parts[2].iov_base = (char *) &xcb_out;
9860     xcb_parts[2].iov_len = sizeof(xcb_out);
9861     xcb_parts[3].iov_base = 0;
9862     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9863 
9864     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9865     return xcb_ret;
9866 }
9867 
9868 xcb_glx_is_query_arb_cookie_t
xcb_glx_is_query_arb_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t id)9869 xcb_glx_is_query_arb_unchecked (xcb_connection_t      *c  /**< */,
9870                                 xcb_glx_context_tag_t  context_tag  /**< */,
9871                                 uint32_t               id  /**< */)
9872 {
9873     static const xcb_protocol_request_t xcb_req = {
9874         /* count */ 2,
9875         /* ext */ &xcb_glx_id,
9876         /* opcode */ XCB_GLX_IS_QUERY_ARB,
9877         /* isvoid */ 0
9878     };
9879 
9880     struct iovec xcb_parts[4];
9881     xcb_glx_is_query_arb_cookie_t xcb_ret;
9882     xcb_glx_is_query_arb_request_t xcb_out;
9883 
9884     xcb_out.context_tag = context_tag;
9885     xcb_out.id = id;
9886 
9887     xcb_parts[2].iov_base = (char *) &xcb_out;
9888     xcb_parts[2].iov_len = sizeof(xcb_out);
9889     xcb_parts[3].iov_base = 0;
9890     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9891 
9892     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9893     return xcb_ret;
9894 }
9895 
9896 xcb_glx_is_query_arb_reply_t *
xcb_glx_is_query_arb_reply(xcb_connection_t * c,xcb_glx_is_query_arb_cookie_t cookie,xcb_generic_error_t ** e)9897 xcb_glx_is_query_arb_reply (xcb_connection_t               *c  /**< */,
9898                             xcb_glx_is_query_arb_cookie_t   cookie  /**< */,
9899                             xcb_generic_error_t           **e  /**< */)
9900 {
9901     return (xcb_glx_is_query_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
9902 }
9903 
9904 int
xcb_glx_get_queryiv_arb_sizeof(const void * _buffer)9905 xcb_glx_get_queryiv_arb_sizeof (const void  *_buffer  /**< */)
9906 {
9907     char *xcb_tmp = (char *)_buffer;
9908     const xcb_glx_get_queryiv_arb_reply_t *_aux = (xcb_glx_get_queryiv_arb_reply_t *)_buffer;
9909     unsigned int xcb_buffer_len = 0;
9910     unsigned int xcb_block_len = 0;
9911     unsigned int xcb_pad = 0;
9912     unsigned int xcb_align_to = 0;
9913 
9914 
9915     xcb_block_len += sizeof(xcb_glx_get_queryiv_arb_reply_t);
9916     xcb_tmp += xcb_block_len;
9917     xcb_buffer_len += xcb_block_len;
9918     xcb_block_len = 0;
9919     /* data */
9920     xcb_block_len += _aux->n * sizeof(int32_t);
9921     xcb_tmp += xcb_block_len;
9922     xcb_align_to = ALIGNOF(int32_t);
9923     /* insert padding */
9924     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
9925     xcb_buffer_len += xcb_block_len + xcb_pad;
9926     if (0 != xcb_pad) {
9927         xcb_tmp += xcb_pad;
9928         xcb_pad = 0;
9929     }
9930     xcb_block_len = 0;
9931 
9932     return xcb_buffer_len;
9933 }
9934 
9935 xcb_glx_get_queryiv_arb_cookie_t
xcb_glx_get_queryiv_arb(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)9936 xcb_glx_get_queryiv_arb (xcb_connection_t      *c  /**< */,
9937                          xcb_glx_context_tag_t  context_tag  /**< */,
9938                          uint32_t               target  /**< */,
9939                          uint32_t               pname  /**< */)
9940 {
9941     static const xcb_protocol_request_t xcb_req = {
9942         /* count */ 2,
9943         /* ext */ &xcb_glx_id,
9944         /* opcode */ XCB_GLX_GET_QUERYIV_ARB,
9945         /* isvoid */ 0
9946     };
9947 
9948     struct iovec xcb_parts[4];
9949     xcb_glx_get_queryiv_arb_cookie_t xcb_ret;
9950     xcb_glx_get_queryiv_arb_request_t xcb_out;
9951 
9952     xcb_out.context_tag = context_tag;
9953     xcb_out.target = target;
9954     xcb_out.pname = pname;
9955 
9956     xcb_parts[2].iov_base = (char *) &xcb_out;
9957     xcb_parts[2].iov_len = sizeof(xcb_out);
9958     xcb_parts[3].iov_base = 0;
9959     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9960 
9961     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
9962     return xcb_ret;
9963 }
9964 
9965 xcb_glx_get_queryiv_arb_cookie_t
xcb_glx_get_queryiv_arb_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t target,uint32_t pname)9966 xcb_glx_get_queryiv_arb_unchecked (xcb_connection_t      *c  /**< */,
9967                                    xcb_glx_context_tag_t  context_tag  /**< */,
9968                                    uint32_t               target  /**< */,
9969                                    uint32_t               pname  /**< */)
9970 {
9971     static const xcb_protocol_request_t xcb_req = {
9972         /* count */ 2,
9973         /* ext */ &xcb_glx_id,
9974         /* opcode */ XCB_GLX_GET_QUERYIV_ARB,
9975         /* isvoid */ 0
9976     };
9977 
9978     struct iovec xcb_parts[4];
9979     xcb_glx_get_queryiv_arb_cookie_t xcb_ret;
9980     xcb_glx_get_queryiv_arb_request_t xcb_out;
9981 
9982     xcb_out.context_tag = context_tag;
9983     xcb_out.target = target;
9984     xcb_out.pname = pname;
9985 
9986     xcb_parts[2].iov_base = (char *) &xcb_out;
9987     xcb_parts[2].iov_len = sizeof(xcb_out);
9988     xcb_parts[3].iov_base = 0;
9989     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
9990 
9991     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
9992     return xcb_ret;
9993 }
9994 
9995 int32_t *
xcb_glx_get_queryiv_arb_data(const xcb_glx_get_queryiv_arb_reply_t * R)9996 xcb_glx_get_queryiv_arb_data (const xcb_glx_get_queryiv_arb_reply_t *R  /**< */)
9997 {
9998     return (int32_t *) (R + 1);
9999 }
10000 
10001 int
xcb_glx_get_queryiv_arb_data_length(const xcb_glx_get_queryiv_arb_reply_t * R)10002 xcb_glx_get_queryiv_arb_data_length (const xcb_glx_get_queryiv_arb_reply_t *R  /**< */)
10003 {
10004     return R->n;
10005 }
10006 
10007 xcb_generic_iterator_t
xcb_glx_get_queryiv_arb_data_end(const xcb_glx_get_queryiv_arb_reply_t * R)10008 xcb_glx_get_queryiv_arb_data_end (const xcb_glx_get_queryiv_arb_reply_t *R  /**< */)
10009 {
10010     xcb_generic_iterator_t i;
10011     i.data = ((int32_t *) (R + 1)) + (R->n);
10012     i.rem = 0;
10013     i.index = (char *) i.data - (char *) R;
10014     return i;
10015 }
10016 
10017 xcb_glx_get_queryiv_arb_reply_t *
xcb_glx_get_queryiv_arb_reply(xcb_connection_t * c,xcb_glx_get_queryiv_arb_cookie_t cookie,xcb_generic_error_t ** e)10018 xcb_glx_get_queryiv_arb_reply (xcb_connection_t                  *c  /**< */,
10019                                xcb_glx_get_queryiv_arb_cookie_t   cookie  /**< */,
10020                                xcb_generic_error_t              **e  /**< */)
10021 {
10022     return (xcb_glx_get_queryiv_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
10023 }
10024 
10025 int
xcb_glx_get_query_objectiv_arb_sizeof(const void * _buffer)10026 xcb_glx_get_query_objectiv_arb_sizeof (const void  *_buffer  /**< */)
10027 {
10028     char *xcb_tmp = (char *)_buffer;
10029     const xcb_glx_get_query_objectiv_arb_reply_t *_aux = (xcb_glx_get_query_objectiv_arb_reply_t *)_buffer;
10030     unsigned int xcb_buffer_len = 0;
10031     unsigned int xcb_block_len = 0;
10032     unsigned int xcb_pad = 0;
10033     unsigned int xcb_align_to = 0;
10034 
10035 
10036     xcb_block_len += sizeof(xcb_glx_get_query_objectiv_arb_reply_t);
10037     xcb_tmp += xcb_block_len;
10038     xcb_buffer_len += xcb_block_len;
10039     xcb_block_len = 0;
10040     /* data */
10041     xcb_block_len += _aux->n * sizeof(int32_t);
10042     xcb_tmp += xcb_block_len;
10043     xcb_align_to = ALIGNOF(int32_t);
10044     /* insert padding */
10045     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10046     xcb_buffer_len += xcb_block_len + xcb_pad;
10047     if (0 != xcb_pad) {
10048         xcb_tmp += xcb_pad;
10049         xcb_pad = 0;
10050     }
10051     xcb_block_len = 0;
10052 
10053     return xcb_buffer_len;
10054 }
10055 
10056 xcb_glx_get_query_objectiv_arb_cookie_t
xcb_glx_get_query_objectiv_arb(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t id,uint32_t pname)10057 xcb_glx_get_query_objectiv_arb (xcb_connection_t      *c  /**< */,
10058                                 xcb_glx_context_tag_t  context_tag  /**< */,
10059                                 uint32_t               id  /**< */,
10060                                 uint32_t               pname  /**< */)
10061 {
10062     static const xcb_protocol_request_t xcb_req = {
10063         /* count */ 2,
10064         /* ext */ &xcb_glx_id,
10065         /* opcode */ XCB_GLX_GET_QUERY_OBJECTIV_ARB,
10066         /* isvoid */ 0
10067     };
10068 
10069     struct iovec xcb_parts[4];
10070     xcb_glx_get_query_objectiv_arb_cookie_t xcb_ret;
10071     xcb_glx_get_query_objectiv_arb_request_t xcb_out;
10072 
10073     xcb_out.context_tag = context_tag;
10074     xcb_out.id = id;
10075     xcb_out.pname = pname;
10076 
10077     xcb_parts[2].iov_base = (char *) &xcb_out;
10078     xcb_parts[2].iov_len = sizeof(xcb_out);
10079     xcb_parts[3].iov_base = 0;
10080     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10081 
10082     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
10083     return xcb_ret;
10084 }
10085 
10086 xcb_glx_get_query_objectiv_arb_cookie_t
xcb_glx_get_query_objectiv_arb_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t id,uint32_t pname)10087 xcb_glx_get_query_objectiv_arb_unchecked (xcb_connection_t      *c  /**< */,
10088                                           xcb_glx_context_tag_t  context_tag  /**< */,
10089                                           uint32_t               id  /**< */,
10090                                           uint32_t               pname  /**< */)
10091 {
10092     static const xcb_protocol_request_t xcb_req = {
10093         /* count */ 2,
10094         /* ext */ &xcb_glx_id,
10095         /* opcode */ XCB_GLX_GET_QUERY_OBJECTIV_ARB,
10096         /* isvoid */ 0
10097     };
10098 
10099     struct iovec xcb_parts[4];
10100     xcb_glx_get_query_objectiv_arb_cookie_t xcb_ret;
10101     xcb_glx_get_query_objectiv_arb_request_t xcb_out;
10102 
10103     xcb_out.context_tag = context_tag;
10104     xcb_out.id = id;
10105     xcb_out.pname = pname;
10106 
10107     xcb_parts[2].iov_base = (char *) &xcb_out;
10108     xcb_parts[2].iov_len = sizeof(xcb_out);
10109     xcb_parts[3].iov_base = 0;
10110     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10111 
10112     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
10113     return xcb_ret;
10114 }
10115 
10116 int32_t *
xcb_glx_get_query_objectiv_arb_data(const xcb_glx_get_query_objectiv_arb_reply_t * R)10117 xcb_glx_get_query_objectiv_arb_data (const xcb_glx_get_query_objectiv_arb_reply_t *R  /**< */)
10118 {
10119     return (int32_t *) (R + 1);
10120 }
10121 
10122 int
xcb_glx_get_query_objectiv_arb_data_length(const xcb_glx_get_query_objectiv_arb_reply_t * R)10123 xcb_glx_get_query_objectiv_arb_data_length (const xcb_glx_get_query_objectiv_arb_reply_t *R  /**< */)
10124 {
10125     return R->n;
10126 }
10127 
10128 xcb_generic_iterator_t
xcb_glx_get_query_objectiv_arb_data_end(const xcb_glx_get_query_objectiv_arb_reply_t * R)10129 xcb_glx_get_query_objectiv_arb_data_end (const xcb_glx_get_query_objectiv_arb_reply_t *R  /**< */)
10130 {
10131     xcb_generic_iterator_t i;
10132     i.data = ((int32_t *) (R + 1)) + (R->n);
10133     i.rem = 0;
10134     i.index = (char *) i.data - (char *) R;
10135     return i;
10136 }
10137 
10138 xcb_glx_get_query_objectiv_arb_reply_t *
xcb_glx_get_query_objectiv_arb_reply(xcb_connection_t * c,xcb_glx_get_query_objectiv_arb_cookie_t cookie,xcb_generic_error_t ** e)10139 xcb_glx_get_query_objectiv_arb_reply (xcb_connection_t                         *c  /**< */,
10140                                       xcb_glx_get_query_objectiv_arb_cookie_t   cookie  /**< */,
10141                                       xcb_generic_error_t                     **e  /**< */)
10142 {
10143     return (xcb_glx_get_query_objectiv_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
10144 }
10145 
10146 int
xcb_glx_get_query_objectuiv_arb_sizeof(const void * _buffer)10147 xcb_glx_get_query_objectuiv_arb_sizeof (const void  *_buffer  /**< */)
10148 {
10149     char *xcb_tmp = (char *)_buffer;
10150     const xcb_glx_get_query_objectuiv_arb_reply_t *_aux = (xcb_glx_get_query_objectuiv_arb_reply_t *)_buffer;
10151     unsigned int xcb_buffer_len = 0;
10152     unsigned int xcb_block_len = 0;
10153     unsigned int xcb_pad = 0;
10154     unsigned int xcb_align_to = 0;
10155 
10156 
10157     xcb_block_len += sizeof(xcb_glx_get_query_objectuiv_arb_reply_t);
10158     xcb_tmp += xcb_block_len;
10159     xcb_buffer_len += xcb_block_len;
10160     xcb_block_len = 0;
10161     /* data */
10162     xcb_block_len += _aux->n * sizeof(uint32_t);
10163     xcb_tmp += xcb_block_len;
10164     xcb_align_to = ALIGNOF(uint32_t);
10165     /* insert padding */
10166     xcb_pad = -xcb_block_len & (xcb_align_to - 1);
10167     xcb_buffer_len += xcb_block_len + xcb_pad;
10168     if (0 != xcb_pad) {
10169         xcb_tmp += xcb_pad;
10170         xcb_pad = 0;
10171     }
10172     xcb_block_len = 0;
10173 
10174     return xcb_buffer_len;
10175 }
10176 
10177 xcb_glx_get_query_objectuiv_arb_cookie_t
xcb_glx_get_query_objectuiv_arb(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t id,uint32_t pname)10178 xcb_glx_get_query_objectuiv_arb (xcb_connection_t      *c  /**< */,
10179                                  xcb_glx_context_tag_t  context_tag  /**< */,
10180                                  uint32_t               id  /**< */,
10181                                  uint32_t               pname  /**< */)
10182 {
10183     static const xcb_protocol_request_t xcb_req = {
10184         /* count */ 2,
10185         /* ext */ &xcb_glx_id,
10186         /* opcode */ XCB_GLX_GET_QUERY_OBJECTUIV_ARB,
10187         /* isvoid */ 0
10188     };
10189 
10190     struct iovec xcb_parts[4];
10191     xcb_glx_get_query_objectuiv_arb_cookie_t xcb_ret;
10192     xcb_glx_get_query_objectuiv_arb_request_t xcb_out;
10193 
10194     xcb_out.context_tag = context_tag;
10195     xcb_out.id = id;
10196     xcb_out.pname = pname;
10197 
10198     xcb_parts[2].iov_base = (char *) &xcb_out;
10199     xcb_parts[2].iov_len = sizeof(xcb_out);
10200     xcb_parts[3].iov_base = 0;
10201     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10202 
10203     xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
10204     return xcb_ret;
10205 }
10206 
10207 xcb_glx_get_query_objectuiv_arb_cookie_t
xcb_glx_get_query_objectuiv_arb_unchecked(xcb_connection_t * c,xcb_glx_context_tag_t context_tag,uint32_t id,uint32_t pname)10208 xcb_glx_get_query_objectuiv_arb_unchecked (xcb_connection_t      *c  /**< */,
10209                                            xcb_glx_context_tag_t  context_tag  /**< */,
10210                                            uint32_t               id  /**< */,
10211                                            uint32_t               pname  /**< */)
10212 {
10213     static const xcb_protocol_request_t xcb_req = {
10214         /* count */ 2,
10215         /* ext */ &xcb_glx_id,
10216         /* opcode */ XCB_GLX_GET_QUERY_OBJECTUIV_ARB,
10217         /* isvoid */ 0
10218     };
10219 
10220     struct iovec xcb_parts[4];
10221     xcb_glx_get_query_objectuiv_arb_cookie_t xcb_ret;
10222     xcb_glx_get_query_objectuiv_arb_request_t xcb_out;
10223 
10224     xcb_out.context_tag = context_tag;
10225     xcb_out.id = id;
10226     xcb_out.pname = pname;
10227 
10228     xcb_parts[2].iov_base = (char *) &xcb_out;
10229     xcb_parts[2].iov_len = sizeof(xcb_out);
10230     xcb_parts[3].iov_base = 0;
10231     xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
10232 
10233     xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
10234     return xcb_ret;
10235 }
10236 
10237 uint32_t *
xcb_glx_get_query_objectuiv_arb_data(const xcb_glx_get_query_objectuiv_arb_reply_t * R)10238 xcb_glx_get_query_objectuiv_arb_data (const xcb_glx_get_query_objectuiv_arb_reply_t *R  /**< */)
10239 {
10240     return (uint32_t *) (R + 1);
10241 }
10242 
10243 int
xcb_glx_get_query_objectuiv_arb_data_length(const xcb_glx_get_query_objectuiv_arb_reply_t * R)10244 xcb_glx_get_query_objectuiv_arb_data_length (const xcb_glx_get_query_objectuiv_arb_reply_t *R  /**< */)
10245 {
10246     return R->n;
10247 }
10248 
10249 xcb_generic_iterator_t
xcb_glx_get_query_objectuiv_arb_data_end(const xcb_glx_get_query_objectuiv_arb_reply_t * R)10250 xcb_glx_get_query_objectuiv_arb_data_end (const xcb_glx_get_query_objectuiv_arb_reply_t *R  /**< */)
10251 {
10252     xcb_generic_iterator_t i;
10253     i.data = ((uint32_t *) (R + 1)) + (R->n);
10254     i.rem = 0;
10255     i.index = (char *) i.data - (char *) R;
10256     return i;
10257 }
10258 
10259 xcb_glx_get_query_objectuiv_arb_reply_t *
xcb_glx_get_query_objectuiv_arb_reply(xcb_connection_t * c,xcb_glx_get_query_objectuiv_arb_cookie_t cookie,xcb_generic_error_t ** e)10260 xcb_glx_get_query_objectuiv_arb_reply (xcb_connection_t                          *c  /**< */,
10261                                        xcb_glx_get_query_objectuiv_arb_cookie_t   cookie  /**< */,
10262                                        xcb_generic_error_t                      **e  /**< */)
10263 {
10264     return (xcb_glx_get_query_objectuiv_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
10265 }
10266 
10267