summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Shafer <ashafer@badland.io>2021-11-30 15:00:29 -0500
committerOlivier Fourdan <fourdan@gmail.com>2022-05-25 06:31:56 +0000
commit74255ccfd895e70156c45a2c51174c852b64bc71 (patch)
tree1512795bcee1d113b7884b3e19322b69d1d98543
parent8c8bbb903410e39140727867a26bbe501f77de8f (diff)
DRI3: Add DRI3SetDRMDeviceInUse
DRI3SetDRMDeviceInUse is a hint that lets a client tell the server what DRM device it is currently using. This lets the server make more informed decisions for what modifiers to return to the client. This is needed for proper linux dmabuf feedback with Xwayland
-rw-r--r--dri3proto.pc.in2
-rw-r--r--dri3proto.txt39
-rw-r--r--include/X11/extensions/dri3proto.h19
3 files changed, 55 insertions, 5 deletions
diff --git a/dri3proto.pc.in b/dri3proto.pc.in
index 209c2be..7725bc5 100644
--- a/dri3proto.pc.in
+++ b/dri3proto.pc.in
@@ -3,5 +3,5 @@ includedir=@includedir@
Name: DRI3Proto
Description: DRI3 extension headers
-Version: 1.2
+Version: 1.3
Cflags: -I${includedir}
diff --git a/dri3proto.txt b/dri3proto.txt
index 94322e7..c267574 100644
--- a/dri3proto.txt
+++ b/dri3proto.txt
@@ -1,6 +1,6 @@
The DRI3 Extension
- Version 1.2
- 2018-02-28
+ Version 1.3
+ 2021-11-30
Keith Packard
keithp@keithp.com
@@ -34,6 +34,7 @@ Kristian Høgsberg <krh@bitplanet.net>
James Jones <jajones@nvidia.com>
Arthur Huillet <arthur.huillet@free.fr>
Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
+Austin Shafer <ashafer@nvidia.com>
❄ ❄ ❄ ❄ ❄ ❄ ❄
@@ -371,6 +372,28 @@ The name of this extension is "DRI3"
For information on synchronization of buffer access between
the client and the X server, please see section 12.
+┌───
+ DRI3SetDRMDeviceInUse
+ window: WINDOW
+ drmMajor: CARD32
+ drmMinor: CARD32
+└───
+ Errors: Window
+
+ This request provides a hint to the server about the device
+ in use by this window. This is used to provide
+ DRI3GetSupportedModifiers with a hint of what device to
+ return modifiers for in the window_modifiers return value.
+ Using this hint allows for device-specific modifiers to
+ be returned by DRI3GetSupportedModifiers, for example
+ when an application is renderoffloaded and eligible for
+ direct scanout.
+
+ This is only a hint, and may or may not be reflected in
+ the modifier list returned.
+
+ If the window specified was not found, a Window error will
+ be returned.
❄ ❄ ❄ ❄ ❄ ❄ ❄
@@ -391,6 +414,8 @@ The DRI3 extension is adapted from the DRI2 extension.
1.2: Add GetSupportedModifiers,
PixmapFromBuffers, and BuffersFromPixmap requests.
+ 1.3: Add SetDRMDeviceInUse
+
❄ ❄ ❄ ❄ ❄ ❄ ❄
@@ -668,6 +693,16 @@ A.2 Protocol Requests
4 ListOfCARD32 offsets[nfd]
└───
+┌───
+ DRI3SetDRMDeviceInUse
+ 1 CARD8 major opcode
+ 1 10 DRI3 opcode
+ 2 4 length
+ 4 Window window
+ 4 CARD32 drmMajor
+ 4 CARD32 drmMinor
+└───
+
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 d1f909b..9cba105 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 2
+#define DRI3_MINOR 3
#define DRI3NumberErrors 0
#define DRI3NumberEvents 0
@@ -42,7 +42,10 @@
#define xDRI3PixmapFromBuffers 7
#define xDRI3BuffersFromPixmap 8
-#define DRI3NumberRequests 9
+/* v1.3 */
+#define xDRI3SetDRMDeviceInUse 9
+
+#define DRI3NumberRequests 10
typedef struct {
CARD8 reqType;
@@ -246,4 +249,16 @@ typedef struct {
} xDRI3BuffersFromPixmapReply;
#define sz_xDRI3BuffersFromPixmapReply 32
+/* v1.3 */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri3ReqType;
+ CARD16 length;
+ CARD32 window;
+ CARD32 drmMajor;
+ CARD32 drmMinor;
+} xDRI3SetDRMDeviceInUseReq;
+#define sz_xDRI3SetDRMDeviceInUseReq 16
+
#endif