summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-10-31 17:38:27 -0700
committerKeith Packard <keithp@keithp.com>2013-10-31 17:40:15 -0700
commit584d8b87e245e900a3a7ee448d51ba6f3c74ce2b (patch)
tree7fba98564076b205270d5e73f972fc3ebfc593e1
parent32f17e1d4411f784a9b76bad8288f7e657134732 (diff)
Update to version 1.0
Add presentproto.h updates for current protocol. Finish encoding specification. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--presentproto.h42
-rw-r--r--presentproto.txt175
-rw-r--r--presenttokens.h25
3 files changed, 231 insertions, 11 deletions
diff --git a/presentproto.h b/presentproto.h
index a8391f5..8303a94 100644
--- a/presentproto.h
+++ b/presentproto.h
@@ -27,6 +27,7 @@
#define Region CARD32
#define XSyncFence CARD32
+#define EventID CARD32
typedef struct {
Window window B32;
@@ -109,7 +110,29 @@ typedef struct {
CARD32 window B32;
CARD32 eventMask B32;
} xPresentSelectInputReq;
-#define sz_xPresentSelectInputReq 12
+#define sz_xPresentSelectInputReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 presentReqType;
+ CARD16 length B16;
+ CARD32 target B32;
+} xPresentQueryCapabilitiesReq;
+#define sz_xPresentQueryCapabilitiesReq 8
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 capabilities B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xPresentQueryCapabilitiesReply;
+#define sz_xPresentQueryCapabilitiesReply 32
/*
* Events
@@ -162,11 +185,25 @@ typedef struct {
CARD16 sequenceNumber B16;
CARD32 length;
CARD16 evtype B16;
+ CARD16 pad2 B16;
+ CARD32 eid B32;
+ Window window B32;
+ CARD32 serial B32;
+ Pixmap pixmap B32;
+ CARD32 idle_fence B32;
+} xPresentIdleNotify;
+#define sz_xPresentIdleNotify 32
+
+typedef struct {
+ CARD8 type;
+ CARD8 extension;
+ CARD16 sequenceNumber B16;
+ CARD32 length;
+ CARD16 evtype B16;
CARD8 update_window;
CARD8 pad1;
CARD32 eid B32;
Window event_window B32;
-
Window window B32;
Pixmap pixmap B32;
CARD32 serial B32;
@@ -200,5 +237,6 @@ typedef struct {
#undef Region
#undef XSyncFence
+#undef EventID
#endif
diff --git a/presentproto.txt b/presentproto.txt
index cd19f79..2edcf81 100644
--- a/presentproto.txt
+++ b/presentproto.txt
@@ -46,6 +46,7 @@ PRESENTEVENTTYPE { PresentConfigureNotify,
PRESENTEVENTMASK { PresentConfigureNotifyMask,
PresentCompleteNotifyMask,
+ PresentIdleNotifyMask,
PresentSubredirectNotifyMask }
PRESENTOPTION { PresentOptionAsync,
@@ -333,7 +334,6 @@ The name of this extension is "Present"
extension: CARD8 Present extension request number
sequence-number: CARD16
length: CARD32 2
- length: CARD16 2
evtype: CARD16 Present_ConfigureNotify
eventID: PRESENTEVENTID
window: WINDOW
@@ -431,9 +431,9 @@ The name of this extension is "Present"
type: CARD8 XGE event type (35)
extension: CARD8 Present extension request number
sequence-number: CARD16
- length: CARD32 16
+ length: CARD32 17 + 2 n
evtype: CARD16 Present_RedirectNotify
- update-window: CARD8
+ update-window: BOOL
eventID: PRESENTEVENTID
event-window: WINDOW
@@ -450,9 +450,10 @@ The name of this extension is "Present"
wait-fence: FENCE
idle-fence: FENCE
options: SETofPRESENTOPTION
- target_msc: CARD64
+ target-msc: CARD64
divisor: CARD64
remainder: CARD64
+ notifies: LISTofPRESENTNOTIFY
└───
RedirectNotify events are delivered when the client has
@@ -462,6 +463,13 @@ The name of this extension is "Present"
parameters back to the X server, the effect will be as if the
original client executed the request.
+ If 'update-window' is TRUE, then there are clients who have
+ requested composite automatic redirect on the window and who
+ presumably expect the window buffer to eventually contain
+ the application provided contents. The compositing manager
+ should at least occasionally update the window buffer with
+ suitable contents. The precise update interval is left to the
+ discretion of the client receiving this event.
❄ ❄ ❄ ❄ ❄ ❄ ❄
@@ -514,6 +522,54 @@ protocol encoding document.
A.1 Common Types
+┌───
+ PresentEventType
+ 0 PresentConfigureNotify
+ 1 PresentCompleteNotify
+ 2 PresentIdleNotify
+ 3 PresentRedirectNotify
+└───
+
+┌───
+ PresentEventMask
+ 1 PresentConfigureNotifyMask
+ 2 PresentCompleteNotifyMask
+ 4 PresentIdleNotifyMask
+ 8 PresentRedirectNotifyMask
+└───
+
+┌───
+ PresentOption
+ 1 PresentOptionAsync
+ 2 PresentOptionCopy;
+ 4 PresentOptionUST
+└───
+
+┌───
+ PresentCapability
+ 1 PresentCapabilityAsync
+ 2 PresentCapabilityFence
+ 4 PresentCapabilityUST
+└───
+
+┌───
+ PresentCompleteKind
+ 0 PresentCompleteKindPixmap
+ 1 PresentCompleteKindMSCNotify
+└───
+
+┌───
+ PresentCompleteMode
+ 0 PresentCompleteModeCopy
+ 1 PresentCompleteModeFlip
+ 2 PresentCompleteModeSkip
+└───
+
+┌───
+ PresentNotify
+ 4 Window window
+ 4 CARD32 serial
+└───
A.2 Protocol Requests
@@ -534,6 +590,65 @@ A.2 Protocol Requests
16 unused
└───
+┌───
+ PresentPixmap
+ 1 CARD8 major opcode
+ 1 1 Present opcode
+ 2 18+2n length
+ 4 Window window
+ 4 Pixmap pixmap
+ 4 CARD32 serial
+ 4 Region valid-area
+ 4 Region update-area
+ 2 INT16 x-off
+ 2 INT16 y-off
+ 4 CRTC target-crtc
+ 4 SyncFence wait-fence
+ 4 SyncFence idle-fence
+ 4 CARD32 options
+ 4 unused
+ 8 CARD64 target-msc
+ 8 CARD64 divisor
+ 8 CARD64 remainder
+ 8n LISTofPresentNotify notifies
+└───
+
+┌───
+ PresentNotifyMSC
+ 1 CARD8 major opcode
+ 1 2 Present opcode
+ 2 10 length
+ 4 Window window
+ 4 CARD32 serial
+ 4 unused
+ 8 CARD64 target-msc
+ 8 CARD64 divisor
+ 8 CARD64 remainder
+└───
+
+┌───
+ PresentSelectInput
+ 1 CARD8 major opcode
+ 1 3 Present opcode
+ 2 4 length
+ 4 EventID event-id
+ 4 Window window
+ 4 SETofPRESENTEVENTMASK event-mask
+└───
+
+┌───
+ PresentQueryCapabilities
+ 1 CARD8 major opcode
+ 1 4 Present opcode
+ 2 2 length
+ 4 CRTC or Window target
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 SETofPRESENTCAPABILITY capabilities
+└───
A.3 Protocol Events
@@ -553,6 +668,7 @@ A.3 Protocol Events
2 CARD16 height
2 INT16 off x
2 INT16 off y
+
2 CARD16 pixmap width
2 CARD16 pixmap height
4 CARD32 pixmap flags
@@ -565,14 +681,63 @@ A.3 Protocol Events
2 CARD16 sequence number
4 2 length
2 1 PresentCompleteNotify
- 2 CARD16 kind
+ 1 CARD8 kind
+ 1 CARD8 mode
4 CARD32 event id
4 Window window
4 CARD32 serial
8 CARD64 ust
+
8 CARD64 msc
└───
+┌───
+ PresentIdleNotify
+ 1 35 XGE
+ 1 CARD8 Present extension opcode
+ 2 CARD16 sequence number
+ 4 0 length
+ 2 2 PresentIdleNotify
+ 2 unused
+ 4 CARD32 event id
+ 4 Window window
+ 4 CARD32 serial
+ 4 Pixmap pixmap
+ 4 SyncFence idle-fence
+└───
+
+┌───
+ PresentRedirectNotify
+ 1 35 XGE
+ 1 CARD8 Present extension opcode
+ 2 CARD16 sequence number
+ 4 18+2n length
+ 2 3 PresentRedirectNotify
+ 1 BOOL update-window
+ 1 unused
+ 4 CARD32 event id
+ 4 Window event-window
+ 4 Window window
+ 4 Pixmap pixmap
+ 4 CARD32 serial
+
+ 4 Region valid-area
+ 4 Region update-area
+ 8 Rectangle valid-rect
+ 8 Rectangle update-rect
+ 2 INT16 x-off
+ 2 INT16 y-off
+ 4 CRTC target-crtc
+ 4 SyncFence wait-fence
+ 4 SyncFence idle-fence
+ 4 CARD32 options
+ 4 unused
+ 8 CARD64 target-msc
+ 8 CARD64 divisor
+ 8 CARD64 remainder
+ 8n LISTofPRESENTNOTIFY notifies
+└───
+
A.4 Protocol Errors
The DRI3 extension defines no errors.
diff --git a/presenttokens.h b/presenttokens.h
index 4eb4a9b..807dbcf 100644
--- a/presenttokens.h
+++ b/presenttokens.h
@@ -35,29 +35,46 @@
#define X_PresentPixmap 1
#define X_PresentNotifyMSC 2
#define X_PresentSelectInput 3
+#define X_PresentQueryCapabilities 4
-#define PresentNumberRequests 4
+#define PresentNumberRequests 5
/* Present operation options */
#define PresentOptionNone 0
#define PresentOptionAsync (1 << 0)
#define PresentOptionCopy (1 << 1)
+#define PresentOptionUST (1 << 2)
#define PresentAllOptions (PresentOptionAsync | \
- PresentOptionCopy)
+ PresentOptionCopy | \
+ PresentOptionUST)
+
+/* Present capabilities */
+
+#define PresentCapabilityNone 0
+#define PresentCapabilityAsync 1
+#define PresentCapabilityFence 2
+#define PresentCapabilityUST 4
+
+#define PresentAllCapabilities (PresentCapabilityAsync | \
+ PresentCapabilityFence | \
+ PresentCapabilityUST)
/* Events */
#define PresentConfigureNotify 0
#define PresentCompleteNotify 1
-#define PresentRedirectNotify 2
+#define PresentIdleNotify 2
+#define PresentRedirectNotify 3
/* Event Masks */
#define PresentConfigureNotifyMask 1
#define PresentCompleteNotifyMask 2
-#define PresentRedirectNotifyMask 4
+#define PresentIdleNotifyMask 4
+#define PresentRedirectNotifyMask 8
#define PresentAllEvents (PresentConfigureNotifyMask | \
PresentCompleteNotifyMask | \
+ PresentIdleNotifyMask | \
PresentRedirectNotifyMask)
/* Complete Kinds */