mirror of
https://gitlab.freedesktop.org/xorg/proto/xorgproto.git
synced 2025-12-25 08:20:12 +01:00
Initial Fence Sync support
Defines the protocol for creation and basic management of binary state sync objects. The following operations are defined: -Creation -Destruction -Trigger -Reset Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
9ba2065b63
commit
d079ee2107
2 changed files with 60 additions and 2 deletions
|
|
@ -54,7 +54,7 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||||
#define SYNC_NAME "SYNC"
|
#define SYNC_NAME "SYNC"
|
||||||
|
|
||||||
#define SYNC_MAJOR_VERSION 3
|
#define SYNC_MAJOR_VERSION 3
|
||||||
#define SYNC_MINOR_VERSION 0
|
#define SYNC_MINOR_VERSION 1
|
||||||
|
|
||||||
|
|
||||||
#define XSyncCounterNotify 0
|
#define XSyncCounterNotify 0
|
||||||
|
|
@ -65,7 +65,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
#define XSyncBadCounter 0L
|
#define XSyncBadCounter 0L
|
||||||
#define XSyncBadAlarm 1L
|
#define XSyncBadAlarm 1L
|
||||||
#define XSyncNumberErrors (XSyncBadAlarm + 1)
|
#define XSyncBadFence 2L
|
||||||
|
#define XSyncNumberErrors (XSyncBadFence + 1)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Flags for Alarm Attributes
|
* Flags for Alarm Attributes
|
||||||
|
|
@ -172,6 +173,7 @@ typedef enum {
|
||||||
|
|
||||||
typedef XID XSyncCounter;
|
typedef XID XSyncCounter;
|
||||||
typedef XID XSyncAlarm;
|
typedef XID XSyncAlarm;
|
||||||
|
typedef XID XSyncFence;
|
||||||
typedef struct _XSyncValue {
|
typedef struct _XSyncValue {
|
||||||
int hi;
|
int hi;
|
||||||
unsigned int lo;
|
unsigned int lo;
|
||||||
|
|
|
||||||
56
syncproto.h
56
syncproto.h
|
|
@ -67,6 +67,10 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||||
#define X_SyncDestroyAlarm 11
|
#define X_SyncDestroyAlarm 11
|
||||||
#define X_SyncSetPriority 12
|
#define X_SyncSetPriority 12
|
||||||
#define X_SyncGetPriority 13
|
#define X_SyncGetPriority 13
|
||||||
|
#define X_SyncCreateFence 14
|
||||||
|
#define X_SyncTriggerFence 15
|
||||||
|
#define X_SyncResetFence 16
|
||||||
|
#define X_SyncDestroyFence 17
|
||||||
|
|
||||||
/* cover up types from sync.h to make sure they're the right size for
|
/* cover up types from sync.h to make sure they're the right size for
|
||||||
* protocol packaging. These will be undef'ed after all the protocol
|
* protocol packaging. These will be undef'ed after all the protocol
|
||||||
|
|
@ -74,6 +78,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#define XSyncCounter CARD32
|
#define XSyncCounter CARD32
|
||||||
#define XSyncAlarm CARD32
|
#define XSyncAlarm CARD32
|
||||||
|
#define XSyncFence CARD32
|
||||||
|
#define Drawable CARD32
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize
|
* Initialize
|
||||||
|
|
@ -336,6 +342,54 @@ typedef struct {
|
||||||
} xSyncGetPriorityReply;
|
} xSyncGetPriorityReply;
|
||||||
#define sz_xSyncGetPriorityReply 32
|
#define sz_xSyncGetPriorityReply 32
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create Fence
|
||||||
|
*/
|
||||||
|
typedef struct _xSyncCreateFenceReq {
|
||||||
|
CARD8 reqType;
|
||||||
|
CARD8 syncReqType;
|
||||||
|
CARD16 length B16;
|
||||||
|
Drawable d B32;
|
||||||
|
XSyncFence fid B32;
|
||||||
|
BOOL initially_triggered;
|
||||||
|
CARD8 pad0;
|
||||||
|
CARD16 pad1;
|
||||||
|
} xSyncCreateFenceReq;
|
||||||
|
#define sz_xSyncCreateFenceReq 16
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Put a fence object in the "triggered" state.
|
||||||
|
*/
|
||||||
|
typedef struct _xSyncTriggerFenceReq {
|
||||||
|
CARD8 reqType;
|
||||||
|
CARD8 syncReqType;
|
||||||
|
CARD16 length B16;
|
||||||
|
XSyncFence fid B32;
|
||||||
|
} xSyncTriggerFenceReq;
|
||||||
|
#define sz_xSyncTriggerFenceReq 8
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Put a fence in the "untriggered" state.
|
||||||
|
*/
|
||||||
|
typedef struct _xSyncResetFenceReq {
|
||||||
|
CARD8 reqType;
|
||||||
|
CARD8 syncReqType;
|
||||||
|
CARD16 length B16;
|
||||||
|
XSyncFence fid B32;
|
||||||
|
} xSyncResetFenceReq;
|
||||||
|
#define sz_xSyncResetFenceReq 8
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Destroy a fence object
|
||||||
|
*/
|
||||||
|
typedef struct _xSyncDestroyFenceReq {
|
||||||
|
CARD8 reqType;
|
||||||
|
CARD8 syncReqType;
|
||||||
|
CARD16 length B16;
|
||||||
|
XSyncFence fid B32;
|
||||||
|
} xSyncDestroyFenceReq;
|
||||||
|
#define sz_xSyncDestroyFenceReq 8
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Events
|
* Events
|
||||||
*/
|
*/
|
||||||
|
|
@ -373,6 +427,8 @@ typedef struct _xSyncAlarmNotifyEvent {
|
||||||
|
|
||||||
#undef XSyncCounter
|
#undef XSyncCounter
|
||||||
#undef XSyncAlarm
|
#undef XSyncAlarm
|
||||||
|
#undef XSyncFence
|
||||||
|
#undef Drawable
|
||||||
|
|
||||||
|
|
||||||
#endif /* _SYNCPROTO_H_ */
|
#endif /* _SYNCPROTO_H_ */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue