summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/syncobj.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-09-14 10:04:51 -0600
committerBrian Paul <[email protected]>2013-10-01 10:10:01 -0600
commit755602df12cab123b8927e8d71b199b73e48b71b (patch)
treed646023e2230dc28c6f34a578e0d41b9a561e446 /src/mesa/main/syncobj.c
parent79a03068cdde14c491894d44ee713ab5d08a9aca (diff)
mesa: minor fix-ups for _mesa_validate_sync()
Return bool instead of int. Const-qualify the syncObj. Add some comments. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/syncobj.c')
-rw-r--r--src/mesa/main/syncobj.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c
index 987d4f57cbd..27867a13775 100644
--- a/src/mesa/main/syncobj.c
+++ b/src/mesa/main/syncobj.c
@@ -161,8 +161,16 @@ _mesa_free_sync_data(struct gl_context *ctx)
}
-int
-_mesa_validate_sync(struct gl_context *ctx, struct gl_sync_object *syncObj)
+/**
+ * Check if the given sync object is:
+ * - non-null
+ * - not in sync objects hash table
+ * - type is GL_SYNC_FENCE
+ * - not marked as deleted
+ */
+bool
+_mesa_validate_sync(struct gl_context *ctx,
+ const struct gl_sync_object *syncObj)
{
return (syncObj != NULL)
&& _mesa_set_search(ctx->Shared->SyncObjects,