diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-10-01 22:13:34 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-10-01 22:13:34 -0700 |
commit | 29c7fcbf10508ec822ad528928b72702e4c9af01 (patch) | |
tree | 975eb9c0c87010ad4a34865706d6365c46cc7de9 /dri2proto.h | |
parent | 00c15f92c1f294d762f2052f1d775c393ebd2432 (diff) | |
download | xorg-proto-dri2proto-29c7fcbf10508ec822ad528928b72702e4c9af01.tar.gz |
Add swap interval and synchronization support
Based on SGI_video_sync, SGI_swap_control and OML_sync_control, add swap
interval and synchronization support to DRI2. Useful for throttling rendering
and basic performance metrics.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'dri2proto.h')
-rw-r--r-- | dri2proto.h | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/dri2proto.h b/dri2proto.h index 37873c4..cee8a3c 100644 --- a/dri2proto.h +++ b/dri2proto.h @@ -50,6 +50,9 @@ #define X_DRI2CopyRegion 6 #define X_DRI2GetBuffersWithFormat 7 #define X_DRI2SwapBuffers 8 +#define X_DRI2GetMSC 9 +#define X_DRI2WaitMSC 10 +#define X_DRI2WaitSBC 11 typedef struct { CARD32 attachment B32; @@ -197,7 +200,69 @@ typedef struct { CARD8 dri2ReqType; CARD16 length B16; CARD32 drawable B32; + CARD32 target_msc_hi B32; + CARD32 target_msc_lo B32; + CARD32 divisor_hi B32; + CARD32 divisor_lo B32; + CARD32 remainder_hi B32; + CARD32 remainder_lo B32; } xDRI2SwapBuffersReq; -#define sz_xDRI2SwapBuffersReq 8 +#define sz_xDRI2SwapBuffersReq 32 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD16 length B32; + CARD32 swap_hi B32; + CARD32 swap_lo B32; +} xDRI2SwapBuffersReply; +#define sz_xDRI2SwapBuffersReply 16 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; +} xDRI2GetMSCReq; +#define sz_xDRI2GetMSCReq 8 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 target_msc_hi B32; + CARD32 target_msc_lo B32; + CARD32 divisor_hi B32; + CARD32 divisor_lo B32; + CARD32 remainder_hi B32; + CARD32 remainder_lo B32; +} xDRI2WaitMSCReq; +#define sz_xDRI2WaitMSCReq 32 + +typedef struct { + CARD8 reqType; + CARD8 dri2ReqType; + CARD16 length B16; + CARD32 drawable B32; + CARD32 target_sbc_hi B32; + CARD32 target_sbc_lo B32; +} xDRI2WaitSBCReq; +#define sz_xDRI2WaitSBCReq 16 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 ust_hi B32; + CARD32 ust_lo B32; + CARD32 msc_hi B32; + CARD32 msc_lo B32; + CARD32 sbc_hi B32; + CARD32 sbc_lo B32; +} xDRI2MSCReply; +#define sz_xDRI2MSCReply 32 #endif |