- Add patch for DRI2 page flipping.

This commit is contained in:
Kristian Høgsberg 2009-07-29 19:58:38 +00:00
parent af19370b5c
commit 54cfd0f435
2 changed files with 111 additions and 0 deletions

100
dri2-page-flip.patch Normal file
View File

@ -0,0 +1,100 @@
diff --git a/dri2proto.h b/dri2proto.h
index 8d76079..37873c4 100644
--- a/dri2proto.h
+++ b/dri2proto.h
@@ -35,7 +35,7 @@
#define DRI2_NAME "DRI2"
#define DRI2_MAJOR 1
-#define DRI2_MINOR 1
+#define DRI2_MINOR 2
#define DRI2NumberErrors 0
#define DRI2NumberEvents 0
@@ -49,6 +49,7 @@
#define X_DRI2GetBuffers 5
#define X_DRI2CopyRegion 6
#define X_DRI2GetBuffersWithFormat 7
+#define X_DRI2SwapBuffers 8
typedef struct {
CARD32 attachment B32;
@@ -191,4 +192,12 @@ typedef struct {
} xDRI2CopyRegionReply;
#define sz_xDRI2CopyRegionReply 32
+typedef struct {
+ CARD8 reqType;
+ CARD8 dri2ReqType;
+ CARD16 length B16;
+ CARD32 drawable B32;
+} xDRI2SwapBuffersReq;
+#define sz_xDRI2SwapBuffersReq 8
+
#endif
diff --git a/dri2proto.txt b/dri2proto.txt
index e931bfb..1bad3b9 100644
--- a/dri2proto.txt
+++ b/dri2proto.txt
@@ -105,6 +105,11 @@ DRI2 implementation of direct rendering GLX, should use these enty
points to copy contents back and forth to as necessary to ensure
consistent rendering.
+The client may also use the DRI2SwapBuffers function to request a swap
+of the front and back buffers. If the display server supports it, this
+operation may be preferred, since it may be easier and/or more performant
+for the server to perform a simple buffer swap rather than a blit.
+
⚙ ⚙ ⚙ ⚙ ⚙ ⚙
@@ -288,6 +293,21 @@ The name of this extension is "DRI2".
the server has seen the request before proceeding with
rendering the next frame.
+┌───
+ DRI2SwapBuffers
+ drawable: DRAWABLE
+ ▶
+ buffers: LISTofDRI2BUFFER
+└───
+ Errors: Window
+
+ Schedule a swap of the front and back buffers with the display
+ server.
+
+ This request has no reply. The server is expected to either perform
+ a buffer exchange or queue one before returning. The client should
+ invalidate its render buffers after sending this request, causing
+ a subsequent GetBuffers request to get updated buffer info.
┌───
DRI2GetBuffersWithFormat
@@ -542,6 +562,27 @@ A.3 Protocol Events
The DRI2 extension specifies no events.
+┌───
+ DRI2SwapBuffers
+ 1 CARD8 major opcode
+ 1 7 DRI2 opcode
+ 2 8 length
+ 4 DRAWABLE drawable
+ ▶
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 4 CARD32 buffer count
+ 4 CARD32 unused
+ 4 CARD32 unused
+ 4 CARD32 unused
+ 4 CARD32 unused
+ 4 CARD32 unused
+ 4 CARD32 unused
+ 5n LISTofDRI2BUFFER buffers
+└───
+
A.4 Protocol Errors

View File

@ -42,6 +42,8 @@ Source28: http://www.x.org/pub/individual/proto/xineramaproto-1.1.2.tar.bz2
Source29: http://www.x.org/pub/individual/proto/xproto-7.0.15.tar.bz2 Source29: http://www.x.org/pub/individual/proto/xproto-7.0.15.tar.bz2
Source30: http://www.x.org/pub/individual/proto/xproxymanagementprotocol-1.0.2.tar.bz2 Source30: http://www.x.org/pub/individual/proto/xproxymanagementprotocol-1.0.2.tar.bz2
Patch1: dri2-page-flip.patch
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: xorg-x11-util-macros >= 1.0.2-1 BuildRequires: xorg-x11-util-macros >= 1.0.2-1
@ -57,8 +59,14 @@ X.Org X11 Protocol headers
%prep %prep
%setup -q -c %{name}-%{version} -a1 -a2 -a3 -a4 -a5 -a7 -a8 -a9 -a10 -a13 -a14 -a15 -a16 -a17 -a19 -a20 -a21 -a22 -a23 -a24 -a25 -a27 -a28 -a29 -a30 -a31 %setup -q -c %{name}-%{version} -a1 -a2 -a3 -a4 -a5 -a7 -a8 -a9 -a10 -a13 -a14 -a15 -a16 -a17 -a19 -a20 -a21 -a22 -a23 -a24 -a25 -a27 -a28 -a29 -a30 -a31
cd dri2proto-2.1
%patch1 -p1 -b .page-flip
cd ..
%build %build
# Proceed through each proto package directory, building them all # Proceed through each proto package directory, building them all
for dir in $(ls -1) ; do for dir in $(ls -1) ; do
pushd $dir pushd $dir
@ -250,6 +258,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/pkgconfig/xproxymngproto.pc %{_datadir}/pkgconfig/xproxymngproto.pc
%changelog %changelog
* Wed Jul 29 2009 Kristian Høgsberg <krh@redhat.com> - 7.4-26
- Add patch for DRI2 page flipping.
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.4-26 * Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 7.4-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild