mirror of
https://gitlab.freedesktop.org/xorg/proto/xorgproto.git
synced 2025-12-20 04:40:10 +01:00
Add SwapBuffers request
Add a SwapBuffers request for requesting a front<->back swap. Returns a whole new set of buffers to the client to allow for triple buffering etc.
This commit is contained in:
parent
66c56ab10d
commit
9b5ef83c0b
2 changed files with 65 additions and 1 deletions
25
dri2proto.h
25
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,26 @@ typedef struct {
|
|||
} xDRI2CopyRegionReply;
|
||||
#define sz_xDRI2CopyRegionReply 32
|
||||
|
||||
typedef struct {
|
||||
CARD8 reqType;
|
||||
CARD8 dri2ReqType;
|
||||
CARD16 length B16;
|
||||
CARD32 drawable B32;
|
||||
} xDRI2SwapBuffersReq;
|
||||
#define sz_xDRI2SwapBuffersReq 8
|
||||
|
||||
typedef struct {
|
||||
BYTE type; /* X_Reply */
|
||||
BYTE pad1;
|
||||
CARD16 sequenceNumber B16;
|
||||
CARD32 length B32;
|
||||
CARD32 count B32;
|
||||
CARD32 pad3 B32;
|
||||
CARD32 pad4 B32;
|
||||
CARD32 pad5 B32;
|
||||
CARD32 pad6 B32;
|
||||
CARD32 pad7 B32;
|
||||
} xDRI2SwapBuffersReply;
|
||||
#define sz_xDRI2SwapBuffersReply 32
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
In reply, the display server is expected to provide new front
|
||||
and back buffers to the client following this request. The
|
||||
display server should process this request asynchronously
|
||||
if possible, to prevent the client from blocking.
|
||||
|
||||
┌───
|
||||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue