1 /* 2 * This file generated automatically from dri3.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 "dri3.h" 15 16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) 17 #include "xproto.h" 18 19 xcb_extension_t xcb_dri3_id = { "DRI3", 0 }; 20 21 22 /***************************************************************************** 23 ** 24 ** xcb_dri3_query_version_cookie_t xcb_dri3_query_version 25 ** 26 ** @param xcb_connection_t *c 27 ** @param uint32_t major_version 28 ** @param uint32_t minor_version 29 ** @returns xcb_dri3_query_version_cookie_t 30 ** 31 *****************************************************************************/ 32 33 xcb_dri3_query_version_cookie_t 34 xcb_dri3_query_version (xcb_connection_t *c /**< */, 35 uint32_t major_version /**< */, 36 uint32_t minor_version /**< */) 37 { 38 static const xcb_protocol_request_t xcb_req = { 39 /* count */ 2, 40 /* ext */ &xcb_dri3_id, 41 /* opcode */ XCB_DRI3_QUERY_VERSION, 42 /* isvoid */ 0 43 }; 44 45 struct iovec xcb_parts[4]; 46 xcb_dri3_query_version_cookie_t xcb_ret; 47 xcb_dri3_query_version_request_t xcb_out; 48 49 xcb_out.major_version = major_version; 50 xcb_out.minor_version = minor_version; 51 52 xcb_parts[2].iov_base = (char *) &xcb_out; 53 xcb_parts[2].iov_len = sizeof(xcb_out); 54 xcb_parts[3].iov_base = 0; 55 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 56 57 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 58 return xcb_ret; 59 } 60 61 62 /***************************************************************************** 63 ** 64 ** xcb_dri3_query_version_cookie_t xcb_dri3_query_version_unchecked 65 ** 66 ** @param xcb_connection_t *c 67 ** @param uint32_t major_version 68 ** @param uint32_t minor_version 69 ** @returns xcb_dri3_query_version_cookie_t 70 ** 71 *****************************************************************************/ 72 73 xcb_dri3_query_version_cookie_t 74 xcb_dri3_query_version_unchecked (xcb_connection_t *c /**< */, 75 uint32_t major_version /**< */, 76 uint32_t minor_version /**< */) 77 { 78 static const xcb_protocol_request_t xcb_req = { 79 /* count */ 2, 80 /* ext */ &xcb_dri3_id, 81 /* opcode */ XCB_DRI3_QUERY_VERSION, 82 /* isvoid */ 0 83 }; 84 85 struct iovec xcb_parts[4]; 86 xcb_dri3_query_version_cookie_t xcb_ret; 87 xcb_dri3_query_version_request_t xcb_out; 88 89 xcb_out.major_version = major_version; 90 xcb_out.minor_version = minor_version; 91 92 xcb_parts[2].iov_base = (char *) &xcb_out; 93 xcb_parts[2].iov_len = sizeof(xcb_out); 94 xcb_parts[3].iov_base = 0; 95 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 96 97 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 98 return xcb_ret; 99 } 100 101 102 /***************************************************************************** 103 ** 104 ** xcb_dri3_query_version_reply_t * xcb_dri3_query_version_reply 105 ** 106 ** @param xcb_connection_t *c 107 ** @param xcb_dri3_query_version_cookie_t cookie 108 ** @param xcb_generic_error_t **e 109 ** @returns xcb_dri3_query_version_reply_t * 110 ** 111 *****************************************************************************/ 112 113 xcb_dri3_query_version_reply_t * 114 xcb_dri3_query_version_reply (xcb_connection_t *c /**< */, 115 xcb_dri3_query_version_cookie_t cookie /**< */, 116 xcb_generic_error_t **e /**< */) 117 { 118 return (xcb_dri3_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 119 } 120 121 122 /***************************************************************************** 123 ** 124 ** xcb_dri3_open_cookie_t xcb_dri3_open 125 ** 126 ** @param xcb_connection_t *c 127 ** @param xcb_drawable_t drawable 128 ** @param uint32_t provider 129 ** @returns xcb_dri3_open_cookie_t 130 ** 131 *****************************************************************************/ 132 133 xcb_dri3_open_cookie_t 134 xcb_dri3_open (xcb_connection_t *c /**< */, 135 xcb_drawable_t drawable /**< */, 136 uint32_t provider /**< */) 137 { 138 static const xcb_protocol_request_t xcb_req = { 139 /* count */ 2, 140 /* ext */ &xcb_dri3_id, 141 /* opcode */ XCB_DRI3_OPEN, 142 /* isvoid */ 0 143 }; 144 145 struct iovec xcb_parts[4]; 146 xcb_dri3_open_cookie_t xcb_ret; 147 xcb_dri3_open_request_t xcb_out; 148 149 xcb_out.drawable = drawable; 150 xcb_out.provider = provider; 151 152 xcb_parts[2].iov_base = (char *) &xcb_out; 153 xcb_parts[2].iov_len = sizeof(xcb_out); 154 xcb_parts[3].iov_base = 0; 155 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 156 157 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED|XCB_REQUEST_REPLY_FDS, xcb_parts + 2, &xcb_req); 158 return xcb_ret; 159 } 160 161 162 /***************************************************************************** 163 ** 164 ** xcb_dri3_open_cookie_t xcb_dri3_open_unchecked 165 ** 166 ** @param xcb_connection_t *c 167 ** @param xcb_drawable_t drawable 168 ** @param uint32_t provider 169 ** @returns xcb_dri3_open_cookie_t 170 ** 171 *****************************************************************************/ 172 173 xcb_dri3_open_cookie_t 174 xcb_dri3_open_unchecked (xcb_connection_t *c /**< */, 175 xcb_drawable_t drawable /**< */, 176 uint32_t provider /**< */) 177 { 178 static const xcb_protocol_request_t xcb_req = { 179 /* count */ 2, 180 /* ext */ &xcb_dri3_id, 181 /* opcode */ XCB_DRI3_OPEN, 182 /* isvoid */ 0 183 }; 184 185 struct iovec xcb_parts[4]; 186 xcb_dri3_open_cookie_t xcb_ret; 187 xcb_dri3_open_request_t xcb_out; 188 189 xcb_out.drawable = drawable; 190 xcb_out.provider = provider; 191 192 xcb_parts[2].iov_base = (char *) &xcb_out; 193 xcb_parts[2].iov_len = sizeof(xcb_out); 194 xcb_parts[3].iov_base = 0; 195 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 196 197 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_REPLY_FDS, xcb_parts + 2, &xcb_req); 198 return xcb_ret; 199 } 200 201 202 /***************************************************************************** 203 ** 204 ** xcb_dri3_open_reply_t * xcb_dri3_open_reply 205 ** 206 ** @param xcb_connection_t *c 207 ** @param xcb_dri3_open_cookie_t cookie 208 ** @param xcb_generic_error_t **e 209 ** @returns xcb_dri3_open_reply_t * 210 ** 211 *****************************************************************************/ 212 213 xcb_dri3_open_reply_t * 214 xcb_dri3_open_reply (xcb_connection_t *c /**< */, 215 xcb_dri3_open_cookie_t cookie /**< */, 216 xcb_generic_error_t **e /**< */) 217 { 218 return (xcb_dri3_open_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 219 } 220 221 222 /***************************************************************************** 223 ** 224 ** int * xcb_dri3_open_reply_fds 225 ** 226 ** @param xcb_connection_t *c 227 ** @param xcb_dri3_open_reply_t *reply 228 ** @returns int * 229 ** 230 *****************************************************************************/ 231 232 int * 233 xcb_dri3_open_reply_fds (xcb_connection_t *c /**< */, 234 xcb_dri3_open_reply_t *reply /**< */) 235 { 236 return xcb_get_reply_fds(c, reply, sizeof(xcb_dri3_open_reply_t) + 4 * reply->length); 237 } 238 239 240 /***************************************************************************** 241 ** 242 ** xcb_void_cookie_t xcb_dri3_pixmap_from_buffer_checked 243 ** 244 ** @param xcb_connection_t *c 245 ** @param xcb_pixmap_t pixmap 246 ** @param xcb_drawable_t drawable 247 ** @param uint32_t size 248 ** @param uint16_t width 249 ** @param uint16_t height 250 ** @param uint16_t stride 251 ** @param uint8_t depth 252 ** @param uint8_t bpp 253 ** @param int32_t pixmap_fd 254 ** @returns xcb_void_cookie_t 255 ** 256 *****************************************************************************/ 257 258 xcb_void_cookie_t 259 xcb_dri3_pixmap_from_buffer_checked (xcb_connection_t *c /**< */, 260 xcb_pixmap_t pixmap /**< */, 261 xcb_drawable_t drawable /**< */, 262 uint32_t size /**< */, 263 uint16_t width /**< */, 264 uint16_t height /**< */, 265 uint16_t stride /**< */, 266 uint8_t depth /**< */, 267 uint8_t bpp /**< */, 268 int32_t pixmap_fd /**< */) 269 { 270 static const xcb_protocol_request_t xcb_req = { 271 /* count */ 2, 272 /* ext */ &xcb_dri3_id, 273 /* opcode */ XCB_DRI3_PIXMAP_FROM_BUFFER, 274 /* isvoid */ 1 275 }; 276 277 struct iovec xcb_parts[4]; 278 xcb_void_cookie_t xcb_ret; 279 xcb_dri3_pixmap_from_buffer_request_t xcb_out; 280 281 xcb_out.pixmap = pixmap; 282 xcb_out.drawable = drawable; 283 xcb_out.size = size; 284 xcb_out.width = width; 285 xcb_out.height = height; 286 xcb_out.stride = stride; 287 xcb_out.depth = depth; 288 xcb_out.bpp = bpp; 289 290 xcb_parts[2].iov_base = (char *) &xcb_out; 291 xcb_parts[2].iov_len = sizeof(xcb_out); 292 xcb_parts[3].iov_base = 0; 293 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 294 295 xcb_send_fd(c, pixmap_fd); 296 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 297 return xcb_ret; 298 } 299 300 301 /***************************************************************************** 302 ** 303 ** xcb_void_cookie_t xcb_dri3_pixmap_from_buffer 304 ** 305 ** @param xcb_connection_t *c 306 ** @param xcb_pixmap_t pixmap 307 ** @param xcb_drawable_t drawable 308 ** @param uint32_t size 309 ** @param uint16_t width 310 ** @param uint16_t height 311 ** @param uint16_t stride 312 ** @param uint8_t depth 313 ** @param uint8_t bpp 314 ** @param int32_t pixmap_fd 315 ** @returns xcb_void_cookie_t 316 ** 317 *****************************************************************************/ 318 319 xcb_void_cookie_t 320 xcb_dri3_pixmap_from_buffer (xcb_connection_t *c /**< */, 321 xcb_pixmap_t pixmap /**< */, 322 xcb_drawable_t drawable /**< */, 323 uint32_t size /**< */, 324 uint16_t width /**< */, 325 uint16_t height /**< */, 326 uint16_t stride /**< */, 327 uint8_t depth /**< */, 328 uint8_t bpp /**< */, 329 int32_t pixmap_fd /**< */) 330 { 331 static const xcb_protocol_request_t xcb_req = { 332 /* count */ 2, 333 /* ext */ &xcb_dri3_id, 334 /* opcode */ XCB_DRI3_PIXMAP_FROM_BUFFER, 335 /* isvoid */ 1 336 }; 337 338 struct iovec xcb_parts[4]; 339 xcb_void_cookie_t xcb_ret; 340 xcb_dri3_pixmap_from_buffer_request_t xcb_out; 341 342 xcb_out.pixmap = pixmap; 343 xcb_out.drawable = drawable; 344 xcb_out.size = size; 345 xcb_out.width = width; 346 xcb_out.height = height; 347 xcb_out.stride = stride; 348 xcb_out.depth = depth; 349 xcb_out.bpp = bpp; 350 351 xcb_parts[2].iov_base = (char *) &xcb_out; 352 xcb_parts[2].iov_len = sizeof(xcb_out); 353 xcb_parts[3].iov_base = 0; 354 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 355 356 xcb_send_fd(c, pixmap_fd); 357 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 358 return xcb_ret; 359 } 360 361 362 /***************************************************************************** 363 ** 364 ** xcb_dri3_buffer_from_pixmap_cookie_t xcb_dri3_buffer_from_pixmap 365 ** 366 ** @param xcb_connection_t *c 367 ** @param xcb_pixmap_t pixmap 368 ** @returns xcb_dri3_buffer_from_pixmap_cookie_t 369 ** 370 *****************************************************************************/ 371 372 xcb_dri3_buffer_from_pixmap_cookie_t 373 xcb_dri3_buffer_from_pixmap (xcb_connection_t *c /**< */, 374 xcb_pixmap_t pixmap /**< */) 375 { 376 static const xcb_protocol_request_t xcb_req = { 377 /* count */ 2, 378 /* ext */ &xcb_dri3_id, 379 /* opcode */ XCB_DRI3_BUFFER_FROM_PIXMAP, 380 /* isvoid */ 0 381 }; 382 383 struct iovec xcb_parts[4]; 384 xcb_dri3_buffer_from_pixmap_cookie_t xcb_ret; 385 xcb_dri3_buffer_from_pixmap_request_t xcb_out; 386 387 xcb_out.pixmap = pixmap; 388 389 xcb_parts[2].iov_base = (char *) &xcb_out; 390 xcb_parts[2].iov_len = sizeof(xcb_out); 391 xcb_parts[3].iov_base = 0; 392 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 393 394 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED|XCB_REQUEST_REPLY_FDS, xcb_parts + 2, &xcb_req); 395 return xcb_ret; 396 } 397 398 399 /***************************************************************************** 400 ** 401 ** xcb_dri3_buffer_from_pixmap_cookie_t xcb_dri3_buffer_from_pixmap_unchecked 402 ** 403 ** @param xcb_connection_t *c 404 ** @param xcb_pixmap_t pixmap 405 ** @returns xcb_dri3_buffer_from_pixmap_cookie_t 406 ** 407 *****************************************************************************/ 408 409 xcb_dri3_buffer_from_pixmap_cookie_t 410 xcb_dri3_buffer_from_pixmap_unchecked (xcb_connection_t *c /**< */, 411 xcb_pixmap_t pixmap /**< */) 412 { 413 static const xcb_protocol_request_t xcb_req = { 414 /* count */ 2, 415 /* ext */ &xcb_dri3_id, 416 /* opcode */ XCB_DRI3_BUFFER_FROM_PIXMAP, 417 /* isvoid */ 0 418 }; 419 420 struct iovec xcb_parts[4]; 421 xcb_dri3_buffer_from_pixmap_cookie_t xcb_ret; 422 xcb_dri3_buffer_from_pixmap_request_t xcb_out; 423 424 xcb_out.pixmap = pixmap; 425 426 xcb_parts[2].iov_base = (char *) &xcb_out; 427 xcb_parts[2].iov_len = sizeof(xcb_out); 428 xcb_parts[3].iov_base = 0; 429 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 430 431 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_REPLY_FDS, xcb_parts + 2, &xcb_req); 432 return xcb_ret; 433 } 434 435 436 /***************************************************************************** 437 ** 438 ** xcb_dri3_buffer_from_pixmap_reply_t * xcb_dri3_buffer_from_pixmap_reply 439 ** 440 ** @param xcb_connection_t *c 441 ** @param xcb_dri3_buffer_from_pixmap_cookie_t cookie 442 ** @param xcb_generic_error_t **e 443 ** @returns xcb_dri3_buffer_from_pixmap_reply_t * 444 ** 445 *****************************************************************************/ 446 447 xcb_dri3_buffer_from_pixmap_reply_t * 448 xcb_dri3_buffer_from_pixmap_reply (xcb_connection_t *c /**< */, 449 xcb_dri3_buffer_from_pixmap_cookie_t cookie /**< */, 450 xcb_generic_error_t **e /**< */) 451 { 452 return (xcb_dri3_buffer_from_pixmap_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 453 } 454 455 456 /***************************************************************************** 457 ** 458 ** int * xcb_dri3_buffer_from_pixmap_reply_fds 459 ** 460 ** @param xcb_connection_t *c 461 ** @param xcb_dri3_buffer_from_pixmap_reply_t *reply 462 ** @returns int * 463 ** 464 *****************************************************************************/ 465 466 int * 467 xcb_dri3_buffer_from_pixmap_reply_fds (xcb_connection_t *c /**< */, 468 xcb_dri3_buffer_from_pixmap_reply_t *reply /**< */) 469 { 470 return xcb_get_reply_fds(c, reply, sizeof(xcb_dri3_buffer_from_pixmap_reply_t) + 4 * reply->length); 471 } 472 473 474 /***************************************************************************** 475 ** 476 ** xcb_void_cookie_t xcb_dri3_fence_from_fd_checked 477 ** 478 ** @param xcb_connection_t *c 479 ** @param xcb_drawable_t drawable 480 ** @param uint32_t fence 481 ** @param uint8_t initially_triggered 482 ** @param int32_t fence_fd 483 ** @returns xcb_void_cookie_t 484 ** 485 *****************************************************************************/ 486 487 xcb_void_cookie_t 488 xcb_dri3_fence_from_fd_checked (xcb_connection_t *c /**< */, 489 xcb_drawable_t drawable /**< */, 490 uint32_t fence /**< */, 491 uint8_t initially_triggered /**< */, 492 int32_t fence_fd /**< */) 493 { 494 static const xcb_protocol_request_t xcb_req = { 495 /* count */ 2, 496 /* ext */ &xcb_dri3_id, 497 /* opcode */ XCB_DRI3_FENCE_FROM_FD, 498 /* isvoid */ 1 499 }; 500 501 struct iovec xcb_parts[4]; 502 xcb_void_cookie_t xcb_ret; 503 xcb_dri3_fence_from_fd_request_t xcb_out; 504 505 xcb_out.drawable = drawable; 506 xcb_out.fence = fence; 507 xcb_out.initially_triggered = initially_triggered; 508 memset(xcb_out.pad0, 0, 3); 509 510 xcb_parts[2].iov_base = (char *) &xcb_out; 511 xcb_parts[2].iov_len = sizeof(xcb_out); 512 xcb_parts[3].iov_base = 0; 513 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 514 515 xcb_send_fd(c, fence_fd); 516 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); 517 return xcb_ret; 518 } 519 520 521 /***************************************************************************** 522 ** 523 ** xcb_void_cookie_t xcb_dri3_fence_from_fd 524 ** 525 ** @param xcb_connection_t *c 526 ** @param xcb_drawable_t drawable 527 ** @param uint32_t fence 528 ** @param uint8_t initially_triggered 529 ** @param int32_t fence_fd 530 ** @returns xcb_void_cookie_t 531 ** 532 *****************************************************************************/ 533 534 xcb_void_cookie_t 535 xcb_dri3_fence_from_fd (xcb_connection_t *c /**< */, 536 xcb_drawable_t drawable /**< */, 537 uint32_t fence /**< */, 538 uint8_t initially_triggered /**< */, 539 int32_t fence_fd /**< */) 540 { 541 static const xcb_protocol_request_t xcb_req = { 542 /* count */ 2, 543 /* ext */ &xcb_dri3_id, 544 /* opcode */ XCB_DRI3_FENCE_FROM_FD, 545 /* isvoid */ 1 546 }; 547 548 struct iovec xcb_parts[4]; 549 xcb_void_cookie_t xcb_ret; 550 xcb_dri3_fence_from_fd_request_t xcb_out; 551 552 xcb_out.drawable = drawable; 553 xcb_out.fence = fence; 554 xcb_out.initially_triggered = initially_triggered; 555 memset(xcb_out.pad0, 0, 3); 556 557 xcb_parts[2].iov_base = (char *) &xcb_out; 558 xcb_parts[2].iov_len = sizeof(xcb_out); 559 xcb_parts[3].iov_base = 0; 560 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 561 562 xcb_send_fd(c, fence_fd); 563 xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); 564 return xcb_ret; 565 } 566 567 568 /***************************************************************************** 569 ** 570 ** xcb_dri3_fd_from_fence_cookie_t xcb_dri3_fd_from_fence 571 ** 572 ** @param xcb_connection_t *c 573 ** @param xcb_drawable_t drawable 574 ** @param uint32_t fence 575 ** @returns xcb_dri3_fd_from_fence_cookie_t 576 ** 577 *****************************************************************************/ 578 579 xcb_dri3_fd_from_fence_cookie_t 580 xcb_dri3_fd_from_fence (xcb_connection_t *c /**< */, 581 xcb_drawable_t drawable /**< */, 582 uint32_t fence /**< */) 583 { 584 static const xcb_protocol_request_t xcb_req = { 585 /* count */ 2, 586 /* ext */ &xcb_dri3_id, 587 /* opcode */ XCB_DRI3_FD_FROM_FENCE, 588 /* isvoid */ 0 589 }; 590 591 struct iovec xcb_parts[4]; 592 xcb_dri3_fd_from_fence_cookie_t xcb_ret; 593 xcb_dri3_fd_from_fence_request_t xcb_out; 594 595 xcb_out.drawable = drawable; 596 xcb_out.fence = fence; 597 598 xcb_parts[2].iov_base = (char *) &xcb_out; 599 xcb_parts[2].iov_len = sizeof(xcb_out); 600 xcb_parts[3].iov_base = 0; 601 xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; 602 603 xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED|XCB_REQUEST_REPLY_FDS, xcb_parts + 2, &xcb_req); 604 return xcb_ret; 605 } 606 607 608 /***************************************************************************** 609 ** 610 ** xcb_dri3_fd_from_fence_cookie_t xcb_dri3_fd_from_fence_unchecked 611 ** 612 ** @param xcb_connection_t *c 613 ** @param xcb_drawable_t drawable 614 ** @param uint32_t fence 615 ** @returns xcb_dri3_fd_from_fence_cookie_t 616 ** 617 *****************************************************************************/ 618 619 xcb_dri3_fd_from_fence_cookie_t 620 xcb_dri3_fd_from_fence_unchecked (xcb_connection_t *c /**< */, 621 xcb_drawable_t drawable /**< */, 622 uint32_t fence /**< */) 623 { 624 static const xcb_protocol_request_t xcb_req = { 625 /* count */ 2, 626 /* ext */ &xcb_dri3_id, 627 /* opcode */ XCB_DRI3_FD_FROM_FENCE, 628 /* isvoid */ 0 629 }; 630 631 struct iovec xcb_parts[4]; 632 xcb_dri3_fd_from_fence_cookie_t xcb_ret; 633 xcb_dri3_fd_from_fence_request_t xcb_out; 634 635 xcb_out.drawable = drawable; 636 xcb_out.fence = fence; 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, XCB_REQUEST_REPLY_FDS, xcb_parts + 2, &xcb_req); 644 return xcb_ret; 645 } 646 647 648 /***************************************************************************** 649 ** 650 ** xcb_dri3_fd_from_fence_reply_t * xcb_dri3_fd_from_fence_reply 651 ** 652 ** @param xcb_connection_t *c 653 ** @param xcb_dri3_fd_from_fence_cookie_t cookie 654 ** @param xcb_generic_error_t **e 655 ** @returns xcb_dri3_fd_from_fence_reply_t * 656 ** 657 *****************************************************************************/ 658 659 xcb_dri3_fd_from_fence_reply_t * 660 xcb_dri3_fd_from_fence_reply (xcb_connection_t *c /**< */, 661 xcb_dri3_fd_from_fence_cookie_t cookie /**< */, 662 xcb_generic_error_t **e /**< */) 663 { 664 return (xcb_dri3_fd_from_fence_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); 665 } 666 667 668 /***************************************************************************** 669 ** 670 ** int * xcb_dri3_fd_from_fence_reply_fds 671 ** 672 ** @param xcb_connection_t *c 673 ** @param xcb_dri3_fd_from_fence_reply_t *reply 674 ** @returns int * 675 ** 676 *****************************************************************************/ 677 678 int * 679 xcb_dri3_fd_from_fence_reply_fds (xcb_connection_t *c /**< */, 680 xcb_dri3_fd_from_fence_reply_t *reply /**< */) 681 { 682 return xcb_get_reply_fds(c, reply, sizeof(xcb_dri3_fd_from_fence_reply_t) + 4 * reply->length); 683 } 684 685