xorgproto: Branch 'master' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Mar 25 14:01:25 UTC 2024
dri3proto.pc.in | 2
dri3proto.txt | 52 +++++++++++++++
include/X11/extensions/dri3proto.h | 28 +++++++-
include/X11/extensions/presentproto.h | 32 +++++++++
include/X11/extensions/presenttokens.h | 9 +-
presentproto.pc.in | 2
presentproto.txt | 109 ++++++++++++++++++++++++++++++++-
7 files changed, 223 insertions(+), 11 deletions(-)
New commits:
commit 62323c75c8876d302b85c8d90c72e8ae3b23d068
Author: Erik Kurzinger <ekurzinger at nvidia.com>
Date: Tue Aug 16 11:55:43 2022 -0700
Present: add PresentPixmapSynced
Adds an augmented version of PresentPixmap supporting explicit
synchronization with a direct rendering device. This takes the form of
timeline DRM synchronization objects, along with acquire and release
points on those timelines. Implementations advertising
PresentCapabilitySyncobj will wait for the acquire point to be signaled
before executing the PresentPixmap request, and signal the release point
after any GPU operations on the pixmap have completed.
Signed-off-by: Erik Kurzinger <ekurzinger at nvidia.com>
diff --git a/include/X11/extensions/presentproto.h b/include/X11/extensions/presentproto.h
index d8dc6d2..ea80863 100644
--- a/include/X11/extensions/presentproto.h
+++ b/include/X11/extensions/presentproto.h
@@ -24,6 +24,7 @@
#define _PRESENT_PROTO_H_
#include <X11/extensions/presenttokens.h>
+#include <X11/extensions/dri3proto.h>
#define Window CARD32
#define Pixmap CARD32
@@ -136,6 +137,37 @@ typedef struct {
} xPresentQueryCapabilitiesReply;
#define sz_xPresentQueryCapabilitiesReply 32
+typedef struct {
+ CARD8 reqType;
+ CARD8 presentReqType;
+ CARD16 length;
+ Window window;
+
+ Pixmap pixmap;
+ CARD32 serial;
+
+ Region valid;
+ Region update;
+
+ INT16 x_off;
+ INT16 y_off;
+ CARD32 target_crtc;
+
+ DRI3Syncobj acquire_syncobj;
+ DRI3Syncobj release_syncobj;
+ CARD64 acquire_point;
+ CARD64 release_point;
+
+ CARD32 options;
+ CARD32 pad1;
+
+ CARD64 target_msc;
+ CARD64 divisor;
+ CARD64 remainder;
+ /* followed by a LISTofPRESENTNOTIFY */
+} xPresentPixmapSyncedReq;
+#define sz_xPresentPixmapSyncedReq 88
+
/*
* Events
*
diff --git a/include/X11/extensions/presenttokens.h b/include/X11/extensions/presenttokens.h
index 400e84d..8004625 100644
--- a/include/X11/extensions/presenttokens.h
+++ b/include/X11/extensions/presenttokens.h
@@ -25,7 +25,7 @@
#define PRESENT_NAME "Present"
#define PRESENT_MAJOR 1
-#define PRESENT_MINOR 3
+#define PRESENT_MINOR 4
#define PresentNumberErrors 0
#define PresentNumberEvents 0
@@ -36,8 +36,9 @@
#define X_PresentNotifyMSC 2
#define X_PresentSelectInput 3
#define X_PresentQueryCapabilities 4
+#define X_PresentPixmapSynced 5
-#define PresentNumberRequests 5
+#define PresentNumberRequests 6
/* Present operation options */
#define PresentOptionNone 0
@@ -62,11 +63,13 @@
#define PresentCapabilityFence 2
#define PresentCapabilityUST 4
#define PresentCapabilityAsyncMayTear 8
+#define PresentCapabilitySyncobj 16
#define PresentAllCapabilities (PresentCapabilityAsync | \
PresentCapabilityFence | \
PresentCapabilityUST | \
- PresentCapabilityAsyncMayTear)
+ PresentCapabilityAsyncMayTear | \
+ PresentCapabilitySyncobj)
#define PresentAllAsyncCapabilities (PresentCapabilityAsync | PresentCapabilityAsyncMayTear)
diff --git a/presentproto.pc.in b/presentproto.pc.in
index 829d608..f5d5b8b 100644
--- a/presentproto.pc.in
+++ b/presentproto.pc.in
@@ -3,5 +3,5 @@ includedir=@includedir@
Name: PresentProto
Description: Present extension headers
-Version: 1.3
+Version: 1.4
Cflags: -I${includedir}
diff --git a/presentproto.txt b/presentproto.txt
index b474093..56c20d4 100644
--- a/presentproto.txt
+++ b/presentproto.txt
@@ -1,5 +1,5 @@
The Present Extension
- Version 1.3
+ Version 1.4
2023-06-13
Keith Packard
@@ -63,7 +63,8 @@ PRESENTOPTION { PresentOptionAsync,
PRESENTCAPABILITY { PresentCapabilityAsync,
PresentCapabilityFence,
PresentCapabilityUST,
- PresentCapabilityAsyncMayTear }
+ PresentCapabilityAsyncMayTear,
+ PresentCapabilitySyncobj }
PRESENTCOMPLETEKIND { PresentCompleteKindPixmap,
PresentCompleteKindMSCNotify }
@@ -359,6 +360,85 @@ The name of this extension is "Present"
defined by the extension, but is expected to be on the order
of milliseconds or less.
+ PresentCapabilitySyncobj means that the target device supports
+ explicit synchronization using timeline DRM synchronization
+ objects. See the PresentPixmapSynced request for details.
+
+┌───
+ PresentPixmapSynced
+ window: WINDOW
+ pixmap: PIXMAP
+ serial: CARD32
+ valid-area: REGION or None
+ update-area: REGION or None
+ x-off, y-off: INT16
+ target-crtc: CRTC or None
+ acquire-syncobj: SYNCOBJ or None
+ release-syncobj: SYNCOBJ or None
+ acquire-point: CARD64
+ release-point: CARD64
+ options: SETofPRESENTOPTION
+ target-msc: CARD64
+ divisor: CARD64
+ remainder: CARD64
+ notifies: LISTofPRESENTNOTIFY
+└───
+ Errors: Window, Pixmap, Match, Value
+
+ Identical to the PresentPixmap request, except that instead of the
+ 'wait-fence' and 'idle-fence' arguments it accepts mandatory
+ 'acquire-syncobj' and 'release-syncobj' arguments, along with
+ corresponding acquire and release points, to be used for explicit
+ timeline-based GPU synchronization. The 'acquire-point' and
+ 'release-point' are assumed to correspond to timeline points on the
+ respective DRM syncobjs.
+
+ The contents of the Pixmap will not be accessed by the server until the
+ 'acquire-point' on the acquire timeline has been signaled by the
+ client. The fence need not be submitted at the time the
+ PresentPixmapSynced request is issued.
+
+ Once the 'release-point' on the release timeline has been signaled, the
+ client may assume that no further GPU or CPU access to the Pixmap by
+ the server will occur as part of the originating PresentPixmapSynced
+ request. Note that this is a stronger guarantee than what is provided
+ by the 'idle-fence' argument of the PresentPixmap request or the
+ delivery of a PresentIdleNotify event, as those do not necessarily
+ imply that the Pixmap is idle on the GPU.
+
+ The server may wait for the acquire point and signal the release point
+ itself, as will typically happen if the request is executed by copying
+ the Pixmap's contents. Alternatively, it may forward the timelines,
+ acquire, and release points to an output sink directly, provided that
+ sink also supports explicit synchronization using DRM syncobjs.
+
+ The server may signal the release point without waiting for the acquire
+ point if the Pixmap's contents are never accessed while servicing the
+ request. This may happen, for example, if a request is discarded due to
+ it being fully occluded by a later request.
+
+ Beware that, if multiple Pixmaps are presented using the same release
+ timeline, the server makes no guarantees on the order in which the
+ release points will be signaled. Of particular concern is that, if the
+ later of the two release points is signaled before the earlier one, it
+ may appear to the client as though the Pixmap with the earlier release
+ point has been released before the server has finished its access to
+ it. Therefore, in general, clients are strongly advised to avoid using
+ the same release timeline with different Pixmaps.
+
+ If the server does not support PresentCapabilitySyncobj, a Value error
+ is generated.
+
+ If either 'acquire-syncobj' or 'release-syncobj' are None or do not
+ refer to previously imported syncobjs, a Value error is generated.
+
+ If 'acquire-point' or 'release-point' is zero, a Value error is
+ generated.
+
+ If 'acquire-syncobj' is equal to 'release-syncobj' and 'acquire-point'
+ is greater than or equal to 'release-point', a Value error is
+ generated.
+
7.1 Requests proposed for a later Present extension version
@@ -729,6 +809,31 @@ A.2 Protocol Requests
4 SETofPRESENTCAPABILITY capabilities
└───
+┌───
+ PresentPixmapSynced
+ 1 CARD8 major opcode
+ 1 5 Present opcode
+ 2 22+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 SYNCOBJ acquire-syncobj
+ 4 SYNCOBJ release-syncobj
+ 8 CARD64 acquire-point
+ 8 CARD64 release-point
+ 4 CARD32 options
+ 4 unused
+ 8 CARD64 target-msc
+ 8 CARD64 divisor
+ 8 CARD64 remainder
+ 8n LISTofPresentNotify notifies
+└───
+
A.3 Protocol Events
┌───
commit bf661c1c34afb32d8c73b471c17c5bc5912fb346
Author: Erik Kurzinger <ekurzinger at nvidia.com>
Date: Tue Aug 16 11:54:48 2022 -0700
DRI3: add DRI3ImportSyncobj and DRI3FreeSyncobj
Adds new protocol to the DRI3 extension for importing DRM
synchronization objects provided by clients. These can be used to enable
explicit synchronization between the client, the direct rendering
device, and the server.
Signed-off-by: Erik Kurzinger <ekurzinger at nvidia.com>
diff --git a/dri3proto.pc.in b/dri3proto.pc.in
index 7725bc5..be6ccb9 100644
--- a/dri3proto.pc.in
+++ b/dri3proto.pc.in
@@ -3,5 +3,5 @@ includedir=@includedir@
Name: DRI3Proto
Description: DRI3 extension headers
-Version: 1.3
+Version: 1.4
Cflags: -I${includedir}
diff --git a/dri3proto.txt b/dri3proto.txt
index 3f92756..f1f74c4 100644
--- a/dri3proto.txt
+++ b/dri3proto.txt
@@ -1,5 +1,5 @@
The DRI3 Extension
- Version 1.3
+ Version 1.4
2021-11-30
Keith Packard
@@ -60,7 +60,7 @@ DRI3 defines no events.
6. Protocol Types
-DRI3 defines no new protocol types.
+SYNCOBJ { XID }
❄ ❄ ❄ ❄ ❄ ❄ ❄
@@ -395,6 +395,36 @@ The name of this extension is "DRI3"
If the window specified was not found, a Window error will
be returned.
+
+┌───
+ DRI3ImportSyncobj
+ syncobj: SYNCOBJ
+ drawable: DRAWABLE
+ fd: FD
+└───
+ Errors: IDchoice, Drawable
+
+ Imports the DRM synchronization object bound to the given 'fd'. This
+ may then be used to enable explicit synchronization with the
+ server-side direct rendering device associated with 'drawable'.
+
+ The provided syncobj must be a timeline syncobj.
+
+ If 'drawable' is not found, a Drawable error will be returned.
+
+
+┌───
+ DRI3FreeSyncobj
+ syncobj: SYNCOBJ
+└───
+ Errors: Value
+
+ Indicates that any resources associated with the given 'syncobj' should
+ be released by the server. The actual release may be deferred until any
+ pending operations that depend on the object have completed.
+
+ If 'syncobj' is not found, a Value error will be returned.
+
❄ ❄ ❄ ❄ ❄ ❄ ❄
9. Extension Events
@@ -703,6 +733,24 @@ A.2 Protocol Requests
4 CARD32 drmMinor
└───
+┌───
+ DRI3ImportSyncobj
+ 1 CARD8 major opcode
+ 1 11 DRI3 opcode
+ 2 3 length
+ 4 SYNCOBJ syncobj
+ 4 Drawable drawable
+ 0 FD syncobj fd
+└───
+
+┌───
+ DRI3FreeSyncobj
+ 1 CARD8 major opcode
+ 1 12 DRI3 opcode
+ 2 2 length
+ 4 SYNCOBJ syncobj
+└───
+
A.3 Protocol Events
The DRI3 extension defines no events.
diff --git a/include/X11/extensions/dri3proto.h b/include/X11/extensions/dri3proto.h
index 9cba105..a1fbed5 100644
--- a/include/X11/extensions/dri3proto.h
+++ b/include/X11/extensions/dri3proto.h
@@ -25,7 +25,7 @@
#define DRI3_NAME "DRI3"
#define DRI3_MAJOR 1
-#define DRI3_MINOR 3
+#define DRI3_MINOR 4
#define DRI3NumberErrors 0
#define DRI3NumberEvents 0
@@ -45,7 +45,13 @@
/* v1.3 */
#define xDRI3SetDRMDeviceInUse 9
-#define DRI3NumberRequests 10
+/* v1.4 */
+#define xDRI3ImportSyncobj 10
+#define xDRI3FreeSyncobj 11
+
+#define DRI3NumberRequests 12
+
+#define DRI3Syncobj CARD32
typedef struct {
CARD8 reqType;
@@ -261,4 +267,22 @@ typedef struct {
} xDRI3SetDRMDeviceInUseReq;
#define sz_xDRI3SetDRMDeviceInUseReq 16
+/* v1.4 */
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri3ReqType;
+ CARD16 length;
+ DRI3Syncobj syncobj;
+ CARD32 drawable;
+} xDRI3ImportSyncobjReq;
+#define sz_xDRI3ImportSyncobjReq 12
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri3ReqType;
+ CARD16 length;
+ DRI3Syncobj syncobj;
+} xDRI3FreeSyncobjReq;
+#define sz_xDRI3FreeSyncobjReq 8
+
#endif
More information about the xorg-commit
mailing list