1 The Present Extension 2 Version 1.4 3 2023-06-13 4 5 Keith Packard 6 keithp@keithp.com 7 Intel Corporation 8 91. Introduction 10 11The Present extension provides a way for applications to update their 12window contents from a pixmap in a well defined fashion, synchronizing 13with the display refresh and potentially using a more efficient 14mechanism than copying the contents of the source pixmap. 15 161.1. Future Present extension versions 17 18This document includes speculation about future 'redirect' support 19within the Present extension. All such information is subject to 20change and is provided only as an aid to further Present development. 21 221.2. Acknowledgments 23 24Eric Anholt <eric@anholt.net> 25Owen Taylor <otaylor@redhat.com> 26James Jones <jajones@nvidia.com> 27Louis-Francis Ratté-Boulianne <lfrb@collabora.com> 28 29 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 30 312. Data Types 32 33PRESENTEVENTID { XID } 34 35 Defines a unique event delivery target for Present 36 events. Multiple event IDs can be allocated to provide 37 multiple distinct event delivery contexts. 38 39PRESENTNOTIFY { 40 window: WINDOW 41 serial: CARD32 42 } 43 44 A list of these is passed to PresentPixmap; when the indicated 45 PresentPixmap completes, PresentCompletNotify events will be 46 delivered both to the PresentPixmap window/serial parameter as 47 well as each of the entries in the list of PRESENTNOTIFY parameter. 48 49PRESENTEVENTTYPE { PresentConfigureNotify, 50 PresentCompleteNotify, 51 PresentIdleNotify } 52 53PRESENTEVENTMASK { PresentConfigureNotifyMask, 54 PresentCompleteNotifyMask, 55 PresentIdleNotifyMask } 56 57PRESENTOPTION { PresentOptionAsync, 58 PresentOptionCopy, 59 PresentOptionUST, 60 PresentOptionSuboptimal, 61 PresentOptionAsyncMayTear } 62 63PRESENTCAPABILITY { PresentCapabilityAsync, 64 PresentCapabilityFence, 65 PresentCapabilityUST, 66 PresentCapabilityAsyncMayTear, 67 PresentCapabilitySyncobj } 68 69PRESENTCOMPLETEKIND { PresentCompleteKindPixmap, 70 PresentCompleteKindMSCNotify } 71 72PRESENTCOMPLETEMODE { PresentCompleteModeCopy, 73 PresentCompleteModeFlip, 74 PresentCompleteModeSkip, 75 PresentCompleteModeSuboptimalCopy } 76 77The Present extension also uses the Sync extension Fence data type to 78provide synchronization for pixmaps. 79 802.1. Data Types proposed for a later Present extension version 81 82PRESENTEVENTTYPE { ... 83 PresentRedirectNotify } 84 85PRESENTEVENTMASK { ... 86 PresentSubredirectNotifyMask } 87 88 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 89 903. Errors 91 92EventID 93 A value for an EventID argument does not name a defined EventID 94 95 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 96 975. Events 98 99ConfigureNotify events inform clients about window configuration 100changes which can affect the allocation of window-related buffers. 101 102CompleteNotify events inform clients about the completion of a pending 103PresentPixmap request. 104 105IdleNotify events inform clients when pixmaps are available for re-use. 106 1075.1. Events proposed for a later Present extension version 108 109RedirectNotify events inform clients about other clients PresentPixmap 110requests. 111 112 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 113 1146. Extension Initialization 115 116The name of this extension is "Present" 117 118┌─── 119 PresentQueryVersion 120 client-major-version: CARD32 121 client-minor-version: CARD32 122 ▶ 123 major-version: CARD32 124 minor-version: CARD32 125└─── 126 127 The client sends the highest supported version to the server 128 and the server sends the highest version it supports, but no 129 higher than the requested version. Major versions changes can 130 introduce incompatibilities in existing functionality, minor 131 version changes introduce only backward compatible changes. 132 It is the clients responsibility to ensure that the server 133 supports a version which is compatible with its expectations. 134 135 Backwards compatible changes include addition of new 136 requests. 137 138 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 139 1407. Extension Requests 141 142┌─── 143 PresentPixmap 144 window: WINDOW 145 pixmap: PIXMAP 146 serial: CARD32 147 valid-area: REGION or None 148 update-area: REGION or None 149 x-off, y-off: INT16 150 target-crtc: CRTC or None 151 wait-fence: FENCE 152 idle-fence: FENCE 153 options: SETofPRESENTOPTION 154 target-msc: CARD64 155 divisor: CARD64 156 remainder: CARD64 157 notifies: LISTofPRESENTNOTIFY 158└─── 159 Errors: Window, Pixmap, Match 160 161 Provides new content for the specified window, to be made 162 visible at the specified time (defined by 'target-msc', 'divisor' 163 and 'remainder'). If the depth of 'pixmap' and 'window' do not 164 match, a Match error will be generated. 165 166 'serial' is an arbitrary client-specified value which will 167 be returned in the associated PresentCompleteNotify event so 168 that the client can associate the event and request. 169 170 'valid-area' defines the portion of 'pixmap' which contains 171 valid window contents, or None if the pixmap contains valid 172 contents for the whole window. 173 174 'update-area' defines the subset of the window to be updated, 175 or None if the whole window is to be updated. 176 177 PresentPixmap may use any region of 'pixmap' which contains 178 'update-area' and which is contained by 'valid-area'. In other 179 words, areas inside 'update-area' will be presented from 180 'pixmap', areas outside 'valid-area' will not be presented 181 from 'pixmap' and areas inside 'valid-area' but outside 182 'update-area' may or may not be presented at the discretion of 183 the X server. 184 185 'x-off' and 'y-off' define the location in the window where 186 the 0,0 location of the pixmap will be presented. valid-area 187 and update-area are relative to the pixmap. 188 189 PresentPixmap will block until 'wait-fence' is triggered. 190 191 When the X server has finished using 'pixmap' for this 192 operation, it will send a PresentIdleNotify event and arrange 193 for any 'idle-fence' to be triggered. This may be at any time 194 following the PresentPixmap request -- the contents may be 195 immediately copied to another buffer, copied just in time for 196 the vblank interrupt or the pixmap may be used directly for 197 display (in which case it will be busy until some future 198 PresentPixmap operation). 199 200 If 'idle-fence' is not None, then the client guarantees to the 201 X server that it will wait for that fence to be signalled 202 before it uses the pixmap again. If 'idle-fence' is None, then 203 the X server must arrange for the pixmap to be re-usable by 204 the client as soon as the PresentIdleNotify event has been 205 received. Note that if PresentCapabilityFence is set for the 206 associated CRTC, then clients should use fences to improve 207 overall system performance. If PresentCapabilityFence is not 208 set, then using fences offers no benefit, but also no cost. 209 210 If 'target-msc' is greater than the current msc for 'window', 211 the presentation will occur at (or after) the 'target-msc' 212 field. Otherwise, the presentation will occur after the next 213 field where msc % 'divisor' == 'remainder'. 214 215 If 'target-crtc' is None, then the X server will choose a 216 suitable CRTC for synchronization. 217 218 If 'options' contains PresentOptionAsync, and the 'target-msc' 219 is less than or equal to the current msc for 'window', then 220 the operation will be performed as soon as possible, not 221 necessarily waiting for the next vertical blank interval. If 222 the target-crtc does not support PresentCapabilityAsyncMayTear, 223 this may result in tearing. 224 225 If the target-crtc supports PresentCapabilityAsyncMayTear, 226 'options' contains PresentOptionAsyncMayTear, and the 'target-msc' 227 is less than or equal to the current msc for 'window', then 228 the operation will be performed as soon as possible, not 229 necessarily waiting for the next vertical blank interval, and 230 possibly resulting in tearing. 231 232 If 'options' contains PresentOptionCopy, then 'pixmap' will be 233 idle, and 'idle-fence' triggered as soon as the operation occurs. 234 235 If 'options' contains PresentOptionUST, then target-msc, 236 divisor and remainder will all be interpreted as UST values 237 instead of MSC values and the frame update will be scheduled 238 for the specified UST time, If the target-crtc supports 239 PresentCapabilityUST, then the swap time will be as close to 240 the target time as the driver can manage. Otherwise, the 241 server will take the target UST time and convert it to a 242 suitable target MSC value. 243 244 If 'options' contains PresentOptionSuboptimal, then the 245 PresentCompleteNotify event can have mode 246 PresentCompleteModeSuboptimalCopy as the client supports it. 247 248 After the presentation occurs, a PresentCompleteNotify event 249 with kind PresentCompleteKindPixmap will be generated, both to 250 'window' as well as all members of 'notifies'. 251 252 If 'window' is destroyed before the presentation occurs, then 253 the presentation action will not be completed. 254 255 PresentPixmap holds a reference to 'pixmap' until the 256 presentation occurs, so 'pixmap' may be immediately freed 257 after the request executes, even if that is before the 258 presentation occurs. 259 260 If 'idle-fence' is destroyed before the presentation occurs, 261 then idle-fence will not be signaled but the presentation will 262 occur normally. 263 264 If 'wait-fence' is destroyed before it becomes triggered, then 265 the presentation operation will no longer wait for it and will 266 occur when the other conditions are satisfied. 267 268┌─── 269 PresentNotifyMSC 270 window: WINDOW 271 serial: CARD32 272 target-msc: CARD64 273 divisor: CARD64 274 remainder: CARD64 275└─── 276 Errors: Window 277 278 Delivers a PresentCompleteNotifyEvent with kind 279 PresentCompleteKindNotifyMSC after the time specified by 280 'target-msc', 'divisor' and 'remainder'. 281 282 'serial' is an arbitrary client-specified value which will be 283 returned in the event so that the client can associate the 284 event and request. 285 286 If 'target-msc' is greater than the current msc for 'window', 287 the event will be delivered at (or after) the 'target-msc' 288 field. Otherwise, the event delivery will occur after the next 289 field where msc % 'divisor' == 'remainder'. 290 291 If 'window' is destroyed before the event is delivered, then 292 the event delivery will not be completed. 293 294┌─── 295 PresentSelectInput 296 event-id: PRESENTEVENTID 297 window: WINDOW 298 eventMask: SETofPRESENTEVENT 299└─── 300 Errors: Window, Value, Match, IDchoice, Access 301 302 Selects the set of Present events to be delivered for the 303 specified window and event context. PresentSelectInput can 304 create, modify, or delete event contexts. An event context is 305 associated with a specific window; using an existing event 306 context with a different window generates a Match error. 307 308 If eventContext specifies an existing event context, then if 309 eventMask is empty, PresentSelectInput deletes the specified 310 context, otherwise the specified event context is changed to 311 select a different set of events. 312 313 If eventContext is an unused XID, then if eventMask is empty 314 no operation is performed. Otherwise, a new event context is 315 created selecting the specified events. 316 317┌─── 318 PresentQueryCapabilities 319 target: CRTC or WINDOW 320 ▶ 321 capabilities: SETofPRESENTCAPABILITY 322└─── 323 Errors: Window, CRTC 324 325 Returns the supported capabilities for the target CRTC. If 326 'target' is a CRTC, then it is used as the target CRTC. If 327 'target' is a WINDOW, then the target CRTC is selected by the 328 X server from among the CRTCs on the screen specified by the window. 329 330 PresentCapabilityAsyncMayTear means that the target device may be 331 able to flip the scanout buffer mid-frame instead of waiting for 332 a vertical blank interval. The precise latency between the flip 333 request and the actual scanout transition is not defined by this 334 specification, but is intended to be no more than a few 335 scanlines. 336 337 If PresentCapabilityAsyncMayTear is not supported, 338 PresentCapabilityAsync means the same as 339 PresentCapabilityAsyncMayTear described above. 340 341 If PresentCapabilityAsyncMayTear is supported, 342 PresentCapabilityAsync means that even if there is already a flip 343 pending in the target device, it may be possible to replace that 344 flip before the next vertical blank interval. The scanout buffer 345 does not change mid-frame though, i.e. there is no tearing. 346 347 PresentCapabilityFence means that the target device can take 348 advantage of SyncFences in the Present operations to improve 349 GPU throughput. The driver must operate correctly in the 350 absence of fences, but may have reduced performance. Using 351 fences for drivers not advertising this capability should have 352 no performance impact. 353 354 PresentCapabilityUST means that the target device can scanout 355 the image at an arbitrary UST time value, and is not driven by 356 a periodic scanout timer. Applications specifying UST times 357 for PresentPixmap can expect that their image will appear to 358 the user within a short amount of time from that specified in 359 the request. The precise accuracy of the scanout time is not 360 defined by the extension, but is expected to be on the order 361 of milliseconds or less. 362 363 PresentCapabilitySyncobj means that the target device supports 364 explicit synchronization using timeline DRM synchronization 365 objects. See the PresentPixmapSynced request for details. 366 367┌─── 368 PresentPixmapSynced 369 window: WINDOW 370 pixmap: PIXMAP 371 serial: CARD32 372 valid-area: REGION or None 373 update-area: REGION or None 374 x-off, y-off: INT16 375 target-crtc: CRTC or None 376 acquire-syncobj: SYNCOBJ or None 377 release-syncobj: SYNCOBJ or None 378 acquire-point: CARD64 379 release-point: CARD64 380 options: SETofPRESENTOPTION 381 target-msc: CARD64 382 divisor: CARD64 383 remainder: CARD64 384 notifies: LISTofPRESENTNOTIFY 385└─── 386 Errors: Window, Pixmap, Match, Value 387 388 Identical to the PresentPixmap request, except that instead of the 389 'wait-fence' and 'idle-fence' arguments it accepts mandatory 390 'acquire-syncobj' and 'release-syncobj' arguments, along with 391 corresponding acquire and release points, to be used for explicit 392 timeline-based GPU synchronization. The 'acquire-point' and 393 'release-point' are assumed to correspond to timeline points on the 394 respective DRM syncobjs. 395 396 The contents of the Pixmap will not be accessed by the server until the 397 'acquire-point' on the acquire timeline has been signaled by the 398 client. The fence need not be submitted at the time the 399 PresentPixmapSynced request is issued. 400 401 Once the 'release-point' on the release timeline has been signaled, the 402 client may assume that no further GPU or CPU access to the Pixmap by 403 the server will occur as part of the originating PresentPixmapSynced 404 request. Note that this is a stronger guarantee than what is provided 405 by the 'idle-fence' argument of the PresentPixmap request or the 406 delivery of a PresentIdleNotify event, as those do not necessarily 407 imply that the Pixmap is idle on the GPU. 408 409 The server may wait for the acquire point and signal the release point 410 itself, as will typically happen if the request is executed by copying 411 the Pixmap's contents. Alternatively, it may forward the timelines, 412 acquire, and release points to an output sink directly, provided that 413 sink also supports explicit synchronization using DRM syncobjs. 414 415 The server may signal the release point without waiting for the acquire 416 point if the Pixmap's contents are never accessed while servicing the 417 request. This may happen, for example, if a request is discarded due to 418 it being fully occluded by a later request. 419 420 Beware that, if multiple Pixmaps are presented using the same release 421 timeline, the server makes no guarantees on the order in which the 422 release points will be signaled. Of particular concern is that, if the 423 later of the two release points is signaled before the earlier one, it 424 may appear to the client as though the Pixmap with the earlier release 425 point has been released before the server has finished its access to 426 it. Therefore, in general, clients are strongly advised to avoid using 427 the same release timeline with different Pixmaps. 428 429 If the server does not support PresentCapabilitySyncobj, a Value error 430 is generated. 431 432 If either 'acquire-syncobj' or 'release-syncobj' are None or do not 433 refer to previously imported syncobjs, a Value error is generated. 434 435 If 'acquire-point' or 'release-point' is zero, a Value error is 436 generated. 437 438 If 'acquire-syncobj' is equal to 'release-syncobj' and 'acquire-point' 439 is greater than or equal to 'release-point', a Value error is 440 generated. 441 442 4437.1 Requests proposed for a later Present extension version 444 445 These are not part of the standard and represent future plans 446 for the Present extension. 447 448┌─── 449 PresentSelectInput 450 ... 451└─── 452 ... 453 454 Specifying PresentSubredirectNotify Mask causes PresentPixmap 455 requests on any child of 'window' from other clients to 456 generate PresentRedirectNotify events to 'window' instead of 457 actually performing the operation. However, only one client at 458 a time can select for PresentRedirect on a window. An attempt 459 to violate this restriction results in an Access error. 460 461 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 462 4638. Extension Events 464 465┌─── 466 PresentConfigureNotify 467 type: CARD8 XGE event type (35) 468 extension: CARD8 Present extension request number 469 sequence-number: CARD16 470 length: CARD32 2 471 evtype: CARD16 Present_ConfigureNotify 472 eventID: PRESENTEVENTID 473 window: WINDOW 474 x: INT16 475 y: INT16 476 width: CARD16 477 height: CARD16 478 off_x: INT16 479 off_y: INT16 480 pixmap_width: CARD16 481 pixmap_height: CARD16 482 pixmap_flags: CARD32 483└─── 484 485 PresentConfigureNotify events are sent when the window 486 configuration changes if PresentSelectInput has requested 487 it. PresentConfigureNotify events are XGE events and so do not 488 have a unique event type. 489 490 'x' and 'y' are the parent-relative location of 'window'. 491 492┌─── 493 PresentCompleteNotify 494 type: CARD8 XGE event type (35) 495 extension: CARD8 Present extension request number 496 sequence-number: CARD16 497 length: CARD32 2 498 evtype: PRESENTEVENTTYPE PresentCompleteNotify 499 eventID: PRESENTEVENTID 500 window: WINDOW 501 kind: PRESENTCOMPLETEKIND 502 mode: PRESENTCOMPLETEMODE 503 serial: CARD32 504 ust: CARD64 505 msc: CARD64 506└─── 507 508 CompleteNotify events are delivered when a PresentPixmap or 509 PresentNotifyMSC operation has completed. 510 511 'kind' is PresentCompleteKindPixmap when generated by a 512 PresentPixmap operation completion or 513 PresentCompleteKindNotifyMsc when generated by a 514 PresentNotifyMSC operation completion. 515 516 'mode' is PresentCompleteModeCopy when the source pixmap 517 contents are taken from the pixmap and the pixmap is idle 518 immediately after the presentation completes. 'mode' is 519 PresentCompleteModeSuboptimalCopy when the source pixmap 520 contents are copied but it would be possible to flip the 521 pixmap if the buffer format/modifier was different (options 522 given to PresentPixmap must contain PresentOptionSuboptimal). 523 'mode' is PresentCompleteModeFlip when the pixmap remains in-use 524 even after the presentation completes. It will become idle no 525 later than when the next PresentPixmap operation targeting the 526 same window by any client completes. If the presentation 527 operation was skipped because some later operation made it 528 irrelevant, then 'mode' will be PresentCompleteModeSkip. 529 530 'serial' is the value provided in the generating PresentPixmap 531 request. 532 533 'msc' and 'ust' indicate the frame count and system time when 534 the presentation actually occurred. 535 536┌─── 537 PresentIdleNotify 538 type: CARD8 XGE event type (35) 539 extension: CARD8 Present extension request number 540 sequence-number: CARD16 541 length: CARD32 0 542 evtype: PRESENTEVENTTYPE PresentIdleNotify 543 eventID: PRESENTEVENTID 544 window: WINDOW 545 serial: CARD32 546 pixmap: PIXMAP 547 idle-fence: FENCE 548└─── 549 550 IdleNotify events are delivered when a pixmap used in a 551 PresentPixmap operation may be re-used by the client. 552 553 'window' is the window from the PresentPixmap to which this 554 event is delivered. 555 556 'serial' is the value provided in the associated PresentPixmap 557 request. 558 559 'pixmap' is the pixmap which is ready for re-use. 560 561 'idle-fence' is the fence which was provided in the 562 originating PresentPixmap request and is used to synchronize 563 rendering between the client and the X server's use of the 564 buffer. If not None, then the client must wait for the fence 565 to be signaled before using the pixmap. 566 5678.1. Extension Events proposed for a later Present extension version 568 569┌─── 570 PresentRedirectNotify 571 type: CARD8 XGE event type (35) 572 extension: CARD8 Present extension request number 573 sequence-number: CARD16 574 length: CARD32 17 + 2 n 575 evtype: CARD16 Present_RedirectNotify 576 update-window: BOOL 577 578 eventID: PRESENTEVENTID 579 event-window: WINDOW 580 window: WINDOW 581 pixmap: PIXMAP 582 serial: CARD32 583 584 valid-area: REGION 585 update-area: REGION 586 valid-rect: RECTANGLE 587 update-rect: RECTANGLE 588 x-off, y-off: INT16 589 target-crtc: CRTC 590 wait-fence: FENCE 591 idle-fence: FENCE 592 options: SETofPRESENTOPTION 593 target-msc: CARD64 594 divisor: CARD64 595 remainder: CARD64 596 notifies: LISTofPRESENTNOTIFY 597└─── 598 599 RedirectNotify events are delivered when the client has 600 selected for SubredirectNotify the parent of the target 601 window. All of the values provided to the PresentPixmap 602 request are provided. If the client simply passes these 603 parameters back to the X server, the effect will be as if the 604 original client executed the request. 605 606 If 'update-window' is TRUE, then there are clients who have 607 requested composite automatic redirect on the window and who 608 presumably expect the window buffer to eventually contain 609 the application provided contents. The compositing manager 610 should at least occasionally update the window buffer with 611 suitable contents. The precise update interval is left to the 612 discretion of the client receiving this event. 613 614 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 615 6169. Extension Versioning 617 618 1.0: First published version 619 620 1.2: Added PresentCompleteModeSuboptimalCopy flag and 621 PresentOptionSuboptimal option 622 623 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 624 625 62610. Relationship with other extensions 627 628As an extension designed to support other extensions, there is 629naturally some interactions with other extensions. 630 63110.1 GLX 632 633GLX is both an application interface and an X extension. OpenGL 634applications using the GLX API will use the GLX extension and may use 635the Present extension to display application contents. 636 63710.2 DRI3 638 639The DRI3 extension provides a way to share direct rendered pixel data 640with the X server as X pixmaps. When used in conjunction with Present, 641they provide a complete direct rendering solution for OpenGL or other 642APIs. 643 64410.3 DRI2 645 646Present provides similar functionality to the DRI2SwapBuffers and 647requests, however Present uses X pixmaps to refer to the new window 648contents instead of the DRI2 buffer attachments. 649 650Present and DRI3 are designed in conjunction to replace DRI2. 651 65210.4 XvMC / Xv 653 654It might be nice to be able to use YUV formatted objects as Present 655sources. 656 657 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 658 659Appendix A. Protocol Encoding 660 661Syntactic Conventions 662 663This document uses the same syntactic conventions as the core X 664protocol encoding document. 665 666 667A.1 Common Types 668┌─── 669 PresentEventType 670 0 PresentConfigureNotify 671 1 PresentCompleteNotify 672 2 PresentIdleNotify 673└─── 674 675┌─── 676 PresentEventMask 677 1 PresentConfigureNotifyMask 678 2 PresentCompleteNotifyMask 679 4 PresentIdleNotifyMask 680└─── 681 682┌─── 683 PresentOption 684 1 PresentOptionAsync 685 2 PresentOptionCopy; 686 4 PresentOptionUST 687 8 PresentOptionSuboptimal 688 16 PresentOptionAsyncMayTear 689└─── 690 691┌─── 692 PresentCapability 693 1 PresentCapabilityAsync 694 2 PresentCapabilityFence 695 4 PresentCapabilityUST 696 8 PresentCapabilityAsyncMayTear 697└─── 698 699┌─── 700 PresentCompleteKind 701 0 PresentCompleteKindPixmap 702 1 PresentCompleteKindMSCNotify 703└─── 704 705┌─── 706 PresentCompleteMode 707 0 PresentCompleteModeCopy 708 1 PresentCompleteModeFlip 709 2 PresentCompleteModeSkip 710 3 PresentCompleteModeSuboptimalCopy 711└─── 712 713┌─── 714 PresentNotify 715 4 Window window 716 4 CARD32 serial 717└─── 718 719A.1.1 Common Types proposed for a later Present extension version 720 721┌─── 722 PresentEventType 723 ... 724 3 PresentRedirectNotify 725└─── 726 727┌─── 728 PresentEventMask 729 ... 730 8 PresentSubredirectNotifyMask 731└─── 732 733A.2 Protocol Requests 734 735┌─── 736 PresentQueryVersion 737 1 CARD8 major opcode 738 1 0 Present opcode 739 2 3 length 740 4 CARD32 major version 741 4 CARD32 minor version 742 ▶ 743 1 1 Reply 744 1 unused 745 2 CARD16 sequence number 746 4 0 reply length 747 4 CARD32 major version 748 4 CARD32 minor version 749 16 unused 750└─── 751 752┌─── 753 PresentPixmap 754 1 CARD8 major opcode 755 1 1 Present opcode 756 2 18+2n length 757 4 Window window 758 4 Pixmap pixmap 759 4 CARD32 serial 760 4 Region valid-area 761 4 Region update-area 762 2 INT16 x-off 763 2 INT16 y-off 764 4 CRTC target-crtc 765 4 SyncFence wait-fence 766 4 SyncFence idle-fence 767 4 CARD32 options 768 4 unused 769 8 CARD64 target-msc 770 8 CARD64 divisor 771 8 CARD64 remainder 772 8n LISTofPresentNotify notifies 773└─── 774 775┌─── 776 PresentNotifyMSC 777 1 CARD8 major opcode 778 1 2 Present opcode 779 2 10 length 780 4 Window window 781 4 CARD32 serial 782 4 unused 783 8 CARD64 target-msc 784 8 CARD64 divisor 785 8 CARD64 remainder 786└─── 787 788┌─── 789 PresentSelectInput 790 1 CARD8 major opcode 791 1 3 Present opcode 792 2 4 length 793 4 EventID event-id 794 4 Window window 795 4 SETofPRESENTEVENTMASK event-mask 796└─── 797 798┌─── 799 PresentQueryCapabilities 800 1 CARD8 major opcode 801 1 4 Present opcode 802 2 2 length 803 4 CRTC or Window target 804 ▶ 805 1 1 Reply 806 1 unused 807 2 CARD16 sequence number 808 4 0 reply length 809 4 SETofPRESENTCAPABILITY capabilities 810└─── 811 812┌─── 813 PresentPixmapSynced 814 1 CARD8 major opcode 815 1 5 Present opcode 816 2 22+2n length 817 4 Window window 818 4 Pixmap pixmap 819 4 CARD32 serial 820 4 Region valid-area 821 4 Region update-area 822 2 INT16 x-off 823 2 INT16 y-off 824 4 CRTC target-crtc 825 4 SYNCOBJ acquire-syncobj 826 4 SYNCOBJ release-syncobj 827 8 CARD64 acquire-point 828 8 CARD64 release-point 829 4 CARD32 options 830 4 unused 831 8 CARD64 target-msc 832 8 CARD64 divisor 833 8 CARD64 remainder 834 8n LISTofPresentNotify notifies 835└─── 836 837A.3 Protocol Events 838 839┌─── 840 PresentConfigureNotify 841 1 35 XGE 842 1 CARD8 Present extension opcode 843 2 CARD16 sequence number 844 4 2 length 845 2 0 PresentConfigureNotify 846 2 unused 847 4 CARD32 event id 848 4 Window window 849 2 INT16 x 850 2 INT16 y 851 2 CARD16 width 852 2 CARD16 height 853 2 INT16 off x 854 2 INT16 off y 855 856 2 CARD16 pixmap width 857 2 CARD16 pixmap height 858 4 CARD32 pixmap flags 859└─── 860 861┌─── 862 PresentCompleteNotify 863 1 35 XGE 864 1 CARD8 Present extension opcode 865 2 CARD16 sequence number 866 4 2 length 867 2 1 PresentCompleteNotify 868 1 CARD8 kind 869 1 CARD8 mode 870 4 CARD32 event id 871 4 Window window 872 4 CARD32 serial 873 8 CARD64 ust 874 875 8 CARD64 msc 876└─── 877 878┌─── 879 PresentIdleNotify 880 1 35 XGE 881 1 CARD8 Present extension opcode 882 2 CARD16 sequence number 883 4 0 length 884 2 2 PresentIdleNotify 885 2 unused 886 4 CARD32 event id 887 4 Window window 888 4 CARD32 serial 889 4 Pixmap pixmap 890 4 SyncFence idle-fence 891└─── 892 893A.3.1 Protocol Events proposed for later Present extension version 894 895┌─── 896 PresentRedirectNotify 897 1 35 XGE 898 1 CARD8 Present extension opcode 899 2 CARD16 sequence number 900 4 18+2n length 901 2 3 PresentRedirectNotify 902 1 BOOL update-window 903 1 unused 904 4 CARD32 event id 905 4 Window event-window 906 4 Window window 907 4 Pixmap pixmap 908 4 CARD32 serial 909 910 4 Region valid-area 911 4 Region update-area 912 8 Rectangle valid-rect 913 8 Rectangle update-rect 914 2 INT16 x-off 915 2 INT16 y-off 916 4 CRTC target-crtc 917 4 SyncFence wait-fence 918 4 SyncFence idle-fence 919 4 CARD32 options 920 4 unused 921 8 CARD64 target-msc 922 8 CARD64 divisor 923 8 CARD64 remainder 924 8n LISTofPRESENTNOTIFY notifies 925└─── 926 927A.4 Protocol Errors 928 929The Present extension defines no errors. 930 931 ❄ ❄ ❄ ❄ ❄ ❄ ❄ 932