[PATCH xextproto (rev4) 3/5] Add XSyncQueryFence()

James Jones jajones at nvidia.com
Thu Dec 2 09:15:33 PST 2010


Allows callers to query whether a given fence sync
object is currently triggered or not.

Signed-off-by: James Jones <jajones at nvidia.com>
Reviewed-by: Aaron Plattner <aplattner at nvidia.com>
---
 syncproto.h |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/syncproto.h b/syncproto.h
index c38ea84..7e0a568 100644
--- a/syncproto.h
+++ b/syncproto.h
@@ -71,6 +71,7 @@ PERFORMANCE OF THIS SOFTWARE.
 #define X_SyncTriggerFence	       15
 #define X_SyncResetFence	       16
 #define X_SyncDestroyFence	       17
+#define X_SyncQueryFence	       18
 
 /* 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
@@ -391,6 +392,33 @@ typedef struct _xSyncDestroyFenceReq {
 #define sz_xSyncDestroyFenceReq		8
 
 /*
+ * Query a fence object
+ */
+typedef struct _xSyncQueryFenceReq {
+    CARD8	reqType;
+    CARD8	syncReqType;
+    CARD16	length B16;
+    XSyncFence	fid B32;
+} xSyncQueryFenceReq;
+#define sz_xSyncQueryFenceReq		8
+
+typedef struct {
+    BYTE	type;
+    CARD8	unused;
+    CARD16	sequenceNumber B16;
+    CARD32	length B32;
+    BOOL	triggered;
+    BYTE	pad0;
+    CARD16	pad1 B16;
+    CARD32	pad2 B32;
+    CARD32	pad3 B32;
+    CARD32	pad4 B32;
+    CARD32	pad5 B32;
+    CARD32	pad6 B32;
+} xSyncQueryFenceReply;
+#define sz_xSyncQueryFenceReply		32
+
+/*
  * Events
  */
 
-- 
1.7.1



More information about the xorg-devel mailing list