xorgproto: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 24 12:11:10 UTC 2023


 include/X11/extensions/presenttokens.h |   12 ++++++++--
 presentproto.txt                       |   37 ++++++++++++++++++++++++++-------
 2 files changed, 40 insertions(+), 9 deletions(-)

New commits:
commit 5a3d5d624e08cd8fcbe7f4da594dd458f45127d0
Author: Xaver Hugl <xaver.hugl at gmail.com>
Date:   Tue Aug 30 12:22:35 2022 +0200

    present: add PresentOptionAsyncMayTear

diff --git a/include/X11/extensions/presenttokens.h b/include/X11/extensions/presenttokens.h
index 9211207..806cbe5 100644
--- a/include/X11/extensions/presenttokens.h
+++ b/include/X11/extensions/presenttokens.h
@@ -45,11 +45,15 @@
 #define PresentOptionCopy               (1 << 1)
 #define PresentOptionUST                (1 << 2)
 #define PresentOptionSuboptimal         (1 << 3)
+#define PresentOptionAsyncMayTear       (1 << 4)
 
 #define PresentAllOptions       (PresentOptionAsync | \
                                  PresentOptionCopy | \
                                  PresentOptionUST | \
-                                 PresentOptionSuboptimal)
+                                 PresentOptionSuboptimal | \
+                                 PresentOptionAsyncMayTear)
+
+#define PresentAllAsyncOptions (PresentOptionAsync | PresentOptionAsyncMayTear)
 
 /* Present capabilities */
 
@@ -57,10 +61,14 @@
 #define PresentCapabilityAsync          1
 #define PresentCapabilityFence          2
 #define PresentCapabilityUST            4
+#define PresentCapabilityAsyncMayTear   8
 
 #define PresentAllCapabilities  (PresentCapabilityAsync | \
                                  PresentCapabilityFence | \
-                                 PresentCapabilityUST)
+                                 PresentCapabilityUST | \
+                                 PresentCapabilityAsyncMayTear)
+
+#define PresentAllAsyncCapabilities (PresentCapabilityAsync | PresentCapabilityAsyncMayTear)
 
 /* Events */
 #define PresentConfigureNotify	0
diff --git a/presentproto.txt b/presentproto.txt
index fe12f41..18b7a98 100644
--- a/presentproto.txt
+++ b/presentproto.txt
@@ -57,11 +57,13 @@ PRESENTEVENTMASK { PresentConfigureNotifyMask,
 PRESENTOPTION { PresentOptionAsync,
                 PresentOptionCopy,
 		PresentOptionUST,
-		PresentOptionSuboptimal }
+		PresentOptionSuboptimal,
+		PresentOptionAsyncMayTear }
 
 PRESENTCAPABILITY { PresentCapabilityAsync,
 		    PresentCapabilityFence,
-		    PresentCapabilityUST }
+		    PresentCapabilityUST,
+		    PresentCapabilityAsyncMayTear }
 
 PRESENTCOMPLETEKIND { PresentCompleteKindPixmap,
 		      PresentCompleteKindMSCNotify }
@@ -215,7 +217,16 @@ The name of this extension is "Present"
 	If 'options' contains PresentOptionAsync, and the 'target-msc'
 	is less than or equal to the current msc for 'window', then
 	the operation will be performed as soon as possible, not
-	necessarily waiting for the next vertical blank interval.
+	necessarily waiting for the next vertical blank interval. If
+	the target-crtc does not support PresentCapabilityAsyncMayTear,
+	this may result in tearing.
+
+	If the target-crtc supports PresentCapabilityAsyncMayTear,
+	'options' contains PresentOptionAsyncMayTear, and the 'target-msc'
+	is less than or equal to the current msc for 'window', then
+	the operation will be performed as soon as possible, not
+	necessarily waiting for the next vertical blank interval, and
+	possibly resulting in tearing.
 
 	If 'options' contains PresentOptionCopy, then 'pixmap' will be
 	idle, and 'idle-fence' triggered as soon as the operation occurs.
@@ -315,13 +326,23 @@ The name of this extension is "Present"
 	'target' is a WINDOW, then the target CRTC is selected by the
 	X server from among the CRTCs on the screen specified by the window.
 
-	PresentCapabilityAsync means that the target device can flip
-	the scanout buffer mid-frame instead of waiting for a vertical
-	blank interval. The precise latency between the flip request
-	and the actual scanout transition is not defined by this
+	PresentCapabilityAsyncMayTear means that the target device may be
+	able to flip the scanout buffer mid-frame instead of waiting for
+	a vertical blank interval. The precise latency between the flip
+	request and the actual scanout transition is not defined by this
 	specification, but is intended to be no more than a few
 	scanlines.
 
+	If PresentCapabilityAsyncMayTear is not supported,
+	PresentCapabilityAsync means the same as
+	PresentCapabilityAsyncMayTear described above.
+
+	If PresentCapabilityAsyncMayTear is supported,
+	PresentCapabilityAsync means that even if there is already a flip
+	pending in the target device, it may be possible to replace that
+	flip before the next vertical blank interval. The scanout buffer
+	does not change mid-frame though, i.e. there is no tearing.
+
 	PresentCapabilityFence means that the target device can take
 	advantage of SyncFences in the Present operations to improve
 	GPU throughput. The driver must operate correctly in the
@@ -584,6 +605,7 @@ A.1 Common Types
 	2	PresentOptionCopy;
 	4	PresentOptionUST
 	8	PresentOptionSuboptimal
+	16	PresentOptionAsyncMayTear
 └───
 
 ┌───
@@ -591,6 +613,7 @@ A.1 Common Types
 	1	PresentCapabilityAsync
 	2	PresentCapabilityFence
 	4	PresentCapabilityUST
+	8	PresentCapabilityAsyncMayTear
 └───
 
 ┌───


More information about the xorg-commit mailing list