File n_dri3proto-1.4-2024.1.patch of Package dri3proto

Index: dri3proto-1.0/dri3proto.h
===================================================================
--- dri3proto-1.0.orig/dri3proto.h
+++ dri3proto-1.0/dri3proto.h
@@ -25,7 +25,7 @@
 
 #define DRI3_NAME			"DRI3"
 #define DRI3_MAJOR			1
-#define DRI3_MINOR			2
+#define DRI3_MINOR			4
 
 #define DRI3NumberErrors		0
 #define DRI3NumberEvents		0
@@ -42,64 +42,73 @@
 #define xDRI3PixmapFromBuffers          7
 #define xDRI3BuffersFromPixmap          8
 
-#define DRI3NumberRequests		9
+/* v1.3 */
+#define xDRI3SetDRMDeviceInUse  9
+
+/* v1.4 */
+#define xDRI3ImportSyncobj		10
+#define xDRI3FreeSyncobj		11
+
+#define DRI3NumberRequests		12
+
+#define DRI3Syncobj CARD32
 
 typedef struct {
     CARD8   reqType;
     CARD8   dri3ReqType;
-    CARD16  length B16;
-    CARD32  majorVersion B32;
-    CARD32  minorVersion B32;
+    CARD16  length;
+    CARD32  majorVersion;
+    CARD32  minorVersion;
 } xDRI3QueryVersionReq;
 #define sz_xDRI3QueryVersionReq   12
 
 typedef struct {
     BYTE    type;   /* X_Reply */
     BYTE    pad1;
-    CARD16  sequenceNumber B16;
-    CARD32  length B32;
-    CARD32  majorVersion B32;
-    CARD32  minorVersion B32;
-    CARD32  pad2 B32;
-    CARD32  pad3 B32;
-    CARD32  pad4 B32;
-    CARD32  pad5 B32;
+    CARD16  sequenceNumber;
+    CARD32  length;
+    CARD32  majorVersion;
+    CARD32  minorVersion;
+    CARD32  pad2;
+    CARD32  pad3;
+    CARD32  pad4;
+    CARD32  pad5;
 } xDRI3QueryVersionReply;
 #define sz_xDRI3QueryVersionReply	32
 
 typedef struct {
     CARD8   reqType;
     CARD8   dri3ReqType;
-    CARD16  length B16;
-    CARD32  drawable B32;
-    CARD32  provider B32;
+    CARD16  length;
+    CARD32  drawable;
+    CARD32  provider;
 } xDRI3OpenReq;
 #define sz_xDRI3OpenReq	12
 
 typedef struct {
     BYTE    type;   /* X_Reply */
     CARD8   nfd;
-    CARD16  sequenceNumber B16;
-    CARD32  length B32;
-    CARD32  pad2 B32;
-    CARD32  pad3 B32;
-    CARD32  pad4 B32;
-    CARD32  pad5 B32;
-    CARD32  pad6 B32;
-    CARD32  pad7 B32;
+    CARD16  sequenceNumber;
+    CARD32  length;
+    CARD32  pad2;
+    CARD32  pad3;
+    CARD32  pad4;
+    CARD32  pad5;
+    CARD32  pad6;
+    CARD32  pad7;
 } xDRI3OpenReply;
 #define sz_xDRI3OpenReply	32
 
 typedef struct {
     CARD8   reqType;
     CARD8   dri3ReqType;
-    CARD16  length B16;
-    CARD32  pixmap B32;
-    CARD32  drawable B32;
-    CARD32  size B32;
-    CARD16  width B16;
-    CARD16  height B16;
-    CARD16  stride B16;
+    CARD16  length;
+    CARD32  pixmap;
+    CARD32  drawable;
+    CARD32  size;
+    CARD16  width;
+    CARD16  height;
+    CARD16  stride;
     CARD8   depth;
     CARD8   bpp;
 } xDRI3PixmapFromBufferReq;
@@ -109,37 +118,37 @@ typedef struct {
 typedef struct {
     CARD8   reqType;
     CARD8   dri3ReqType;
-    CARD16  length B16;
-    CARD32  pixmap B32;
+    CARD16  length;
+    CARD32  pixmap;
 } xDRI3BufferFromPixmapReq;
 #define sz_xDRI3BufferFromPixmapReq     8
 
 typedef struct {
     BYTE    type;   /* X_Reply */
     CARD8   nfd;    /* Number of file descriptors returned (1) */
-    CARD16  sequenceNumber B16;
-    CARD32  length B32;
-    CARD32  size B32;
-    CARD16  width B16;
-    CARD16  height B16;
-    CARD16  stride B16;
+    CARD16  sequenceNumber;
+    CARD32  length;
+    CARD32  size;
+    CARD16  width;
+    CARD16  height;
+    CARD16  stride;
     CARD8   depth;
     CARD8   bpp;
-    CARD32  pad20 B32;
-    CARD32  pad24 B32;
-    CARD32  pad28 B32;
+    CARD32  pad20;
+    CARD32  pad24;
+    CARD32  pad28;
 } xDRI3BufferFromPixmapReply;
 #define sz_xDRI3BufferFromPixmapReply   32
 
 typedef struct {
     CARD8   reqType;
     CARD8   dri3ReqType;
-    CARD16  length B16;
-    CARD32  drawable B32;
-    CARD32  fence B32;
+    CARD16  length;
+    CARD32  drawable;
+    CARD32  fence;
     BOOL    initially_triggered;
     CARD8   pad13;
-    CARD16  pad14 B16;
+    CARD16  pad14;
 } xDRI3FenceFromFDReq;
 
 #define sz_xDRI3FenceFromFDReq  16
@@ -147,9 +156,9 @@ typedef struct {
 typedef struct {
     CARD8   reqType;
     CARD8   dri3ReqType;
-    CARD16  length B16;
-    CARD32  drawable B32;
-    CARD32  fence B32;
+    CARD16  length;
+    CARD32  drawable;
+    CARD32  fence;
 } xDRI3FDFromFenceReq;
 
 #define sz_xDRI3FDFromFenceReq  12
@@ -157,14 +166,14 @@ typedef struct {
 typedef struct {
     BYTE    type;   /* X_Reply */
     CARD8   nfd;    /* Number of file descriptors returned (1) */
-    CARD16  sequenceNumber B16;
-    CARD32  length B32;
-    CARD32  pad08 B32;
-    CARD32  pad12 B32;
-    CARD32  pad16 B32;
-    CARD32  pad20 B32;
-    CARD32  pad24 B32;
-    CARD32  pad28 B32;
+    CARD16  sequenceNumber;
+    CARD32  length;
+    CARD32  pad08;
+    CARD32  pad12;
+    CARD32  pad16;
+    CARD32  pad20;
+    CARD32  pad24;
+    CARD32  pad28;
 } xDRI3FDFromFenceReply;
 
 #define sz_xDRI3FDFromFenceReply   32
@@ -174,50 +183,50 @@ typedef struct {
 typedef struct {
     CARD8   reqType;
     CARD8   dri3ReqType;
-    CARD16  length B16;
-    CARD32  window B32;
+    CARD16  length;
+    CARD32  window;
     CARD8   depth;
     CARD8   bpp;
-    CARD16  pad10 B16;
+    CARD16  pad10;
 } xDRI3GetSupportedModifiersReq;
 #define sz_xDRI3GetSupportedModifiersReq     12
 
 typedef struct {
     BYTE    type;   /* X_Reply */
     CARD8   pad1;
-    CARD16  sequenceNumber B16;
-    CARD32  length B32;
-    CARD32  numWindowModifiers B32;
-    CARD32  numScreenModifiers B32;
-    CARD32  pad16 B32;
-    CARD32  pad20 B32;
-    CARD32  pad24 B32;
-    CARD32  pad28 B32;
+    CARD16  sequenceNumber;
+    CARD32  length;
+    CARD32  numWindowModifiers;
+    CARD32  numScreenModifiers;
+    CARD32  pad16;
+    CARD32  pad20;
+    CARD32  pad24;
+    CARD32  pad28;
 } xDRI3GetSupportedModifiersReply;
 #define sz_xDRI3GetSupportedModifiersReply   32
 
 typedef struct {
     CARD8   reqType;
     CARD8   dri3ReqType;
-    CARD16  length B16;
-    CARD32  pixmap B32;
-    CARD32  window B32;
+    CARD16  length;
+    CARD32  pixmap;
+    CARD32  window;
     CARD8   num_buffers; /* Number of file descriptors passed */
     CARD8   pad13;
-    CARD16  pad14 B16;
-    CARD16  width B16;
-    CARD16  height B16;
-    CARD32  stride0 B32;
-    CARD32  offset0 B32;
-    CARD32  stride1 B32;
-    CARD32  offset1 B32;
-    CARD32  stride2 B32;
-    CARD32  offset2 B32;
-    CARD32  stride3 B32;
-    CARD32  offset3 B32;
+    CARD16  pad14;
+    CARD16  width;
+    CARD16  height;
+    CARD32  stride0;
+    CARD32  offset0;
+    CARD32  stride1;
+    CARD32  offset1;
+    CARD32  stride2;
+    CARD32  offset2;
+    CARD32  stride3;
+    CARD32  offset3;
     CARD8   depth;
     CARD8   bpp;
-    CARD16  pad54 B16;
+    CARD16  pad54;
     CARD64  modifier;
 } xDRI3PixmapFromBuffersReq;
 #define sz_xDRI3PixmapFromBuffersReq 64
@@ -225,25 +234,55 @@ typedef struct {
 typedef struct {
     CARD8   reqType;
     CARD8   dri3ReqType;
-    CARD16  length B16;
-    CARD32  pixmap B32;
+    CARD16  length;
+    CARD32  pixmap;
 } xDRI3BuffersFromPixmapReq;
 #define sz_xDRI3BuffersFromPixmapReq     8
 
 typedef struct {
     BYTE    type;   /* X_Reply */
     CARD8   nfd;    /* Number of file descriptors returned */
-    CARD16  sequenceNumber B16;
-    CARD32  length B32;
-    CARD16  width B16;
-    CARD16  height B16;
-    CARD32  pad12 B32;
+    CARD16  sequenceNumber;
+    CARD32  length;
+    CARD16  width;
+    CARD16  height;
+    CARD32  pad12;
     CARD64  modifier;
     CARD8   depth;
     CARD8   bpp;
-    CARD16  pad26 B16;
-    CARD32  pad28 B32;
+    CARD16  pad26;
+    CARD32  pad28;
 } 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
+
+/* 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
Index: dri3proto-1.0/dri3proto.pc.in
===================================================================
--- dri3proto-1.0.orig/dri3proto.pc.in
+++ dri3proto-1.0/dri3proto.pc.in
@@ -1,9 +1,7 @@
 prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
 includedir=@includedir@
  
 Name: DRI3Proto
 Description: DRI3 extension headers
-Version: 1.2
+Version: 1.4
 Cflags: -I${includedir}
Index: dri3proto-1.0/dri3proto.txt
===================================================================
--- dri3proto-1.0.orig/dri3proto.txt
+++ dri3proto-1.0/dri3proto.txt
@@ -1,6 +1,6 @@
 			  The DRI3 Extension
-			     Version 1.2
-			      2018-02-28
+			     Version 1.4
+			      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>
 
 			     ❄ ❄ ❄  ❄  ❄ ❄ ❄ 
 
@@ -59,7 +60,7 @@ DRI3 defines no events.
 
 6. Protocol Types
 
-DRI3 defines no new protocol types.
+SYNCOBJ { XID }
 
 			     ❄ ❄ ❄  ❄  ❄ ❄ ❄ 
 
@@ -371,6 +372,58 @@ 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.
+
+
+┌───
+    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.
 
 			     ❄ ❄ ❄  ❄  ❄ ❄ ❄
 
@@ -391,6 +444,8 @@ The DRI3 extension is adapted from the D
 	1.2: Add GetSupportedModifiers,
 	     PixmapFromBuffers, and BuffersFromPixmap requests.
 
+	1.3: Add SetDRMDeviceInUse
+
 			     ❄ ❄ ❄  ❄  ❄ ❄ ❄
 
 
@@ -598,7 +653,7 @@ A.2 Protocol Requests
 ┌───
     DRI3GetSupportedModifiers
 	1	CARD8			major opcode
-	1	7			DRI3 opcode
+	1	6			DRI3 opcode
 	2	3			length
 	4	Window			window
 	1	CARD8			depth
@@ -620,7 +675,7 @@ A.2 Protocol Requests
 ┌───
     DRI3PixmapFromBuffers
 	1	CARD8			major opcode
-	1	8			DRI3 opcode
+	1	7			DRI3 opcode
 	2	8			length
 	4	Pixmap			pixmap
 	4	Window			window
@@ -647,7 +702,7 @@ A.2 Protocol Requests
 ┌───
     DRI3BuffersFromPixmap
 	1	CARD8			major opcode
-	1	9			DRI3 opcode
+	1	8			DRI3 opcode
 	2	2			length
 	4	Pixmap			pixmap
       ▶
@@ -668,6 +723,34 @@ A.2 Protocol Requests
 	4	ListOfCARD32		offsets[nfd]
 └───
 
+┌───
+    DRI3SetDRMDeviceInUse
+	1	CARD8			major opcode
+	1	9			DRI3 opcode
+	2	4			length
+	4	Window			window
+	4	CARD32			drmMajor
+	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.
openSUSE Build Service is sponsored by