From 5a3d5d624e08cd8fcbe7f4da594dd458f45127d0 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Tue, 30 Aug 2022 12:22:35 +0200 Subject: present: add PresentOptionAsyncMayTear --- presentproto.txt | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) (limited to 'presentproto.txt') 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 └─── ┌─── -- cgit v1.2.3