Lines Matching refs:syncObj
82 _mesa_delete_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) in _mesa_delete_sync_object() argument
85 free(syncObj); in _mesa_delete_sync_object()
90 _mesa_fence_sync(struct gl_context *ctx, struct gl_sync_object *syncObj, in _mesa_fence_sync() argument
97 syncObj->StatusFlag = 1; in _mesa_fence_sync()
102 _mesa_check_sync(struct gl_context *ctx, struct gl_sync_object *syncObj) in _mesa_check_sync() argument
105 (void) syncObj; in _mesa_check_sync()
114 _mesa_wait_sync(struct gl_context *ctx, struct gl_sync_object *syncObj, in _mesa_wait_sync() argument
118 (void) syncObj; in _mesa_wait_sync()
177 _mesa_validate_sync(struct gl_sync_object *syncObj) in _mesa_validate_sync() argument
179 return (syncObj != NULL) in _mesa_validate_sync()
180 && (syncObj->Type == GL_SYNC_FENCE) in _mesa_validate_sync()
181 && !syncObj->DeletePending; in _mesa_validate_sync()
186 _mesa_ref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) in _mesa_ref_sync_object() argument
189 syncObj->RefCount++; in _mesa_ref_sync_object()
195 _mesa_unref_sync_object(struct gl_context *ctx, struct gl_sync_object *syncObj) in _mesa_unref_sync_object() argument
198 syncObj->RefCount--; in _mesa_unref_sync_object()
199 if (syncObj->RefCount == 0) { in _mesa_unref_sync_object()
200 remove_from_list(& syncObj->link); in _mesa_unref_sync_object()
203 ctx->Driver.DeleteSyncObject(ctx, syncObj); in _mesa_unref_sync_object()
214 struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync; in _mesa_IsSync() local
217 return _mesa_validate_sync(syncObj) ? GL_TRUE : GL_FALSE; in _mesa_IsSync()
225 struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync; in _mesa_DeleteSync() local
238 if (!_mesa_validate_sync(syncObj)) { in _mesa_DeleteSync()
246 syncObj->DeletePending = GL_TRUE; in _mesa_DeleteSync()
247 _mesa_unref_sync_object(ctx, syncObj); in _mesa_DeleteSync()
255 struct gl_sync_object *syncObj; in _mesa_FenceSync() local
270 syncObj = ctx->Driver.NewSyncObject(ctx, GL_SYNC_FENCE); in _mesa_FenceSync()
271 if (syncObj != NULL) { in _mesa_FenceSync()
272 syncObj->Type = GL_SYNC_FENCE; in _mesa_FenceSync()
278 syncObj->Name = 1; in _mesa_FenceSync()
279 syncObj->RefCount = 1; in _mesa_FenceSync()
280 syncObj->DeletePending = GL_FALSE; in _mesa_FenceSync()
281 syncObj->SyncCondition = condition; in _mesa_FenceSync()
282 syncObj->Flags = flags; in _mesa_FenceSync()
283 syncObj->StatusFlag = 0; in _mesa_FenceSync()
285 ctx->Driver.FenceSync(ctx, syncObj, condition, flags); in _mesa_FenceSync()
288 insert_at_tail(& ctx->Shared->SyncObjects, & syncObj->link); in _mesa_FenceSync()
291 return (GLsync) syncObj; in _mesa_FenceSync()
302 struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync; in _mesa_ClientWaitSync() local
306 if (!_mesa_validate_sync(syncObj)) { in _mesa_ClientWaitSync()
316 _mesa_ref_sync_object(ctx, syncObj); in _mesa_ClientWaitSync()
325 ctx->Driver.CheckSync(ctx, syncObj); in _mesa_ClientWaitSync()
326 if (syncObj->StatusFlag) { in _mesa_ClientWaitSync()
332 ctx->Driver.ClientWaitSync(ctx, syncObj, flags, timeout); in _mesa_ClientWaitSync()
334 ret = syncObj->StatusFlag ? GL_CONDITION_SATISFIED : GL_TIMEOUT_EXPIRED; in _mesa_ClientWaitSync()
338 _mesa_unref_sync_object(ctx, syncObj); in _mesa_ClientWaitSync()
347 struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync; in _mesa_WaitSync() local
350 if (!_mesa_validate_sync(syncObj)) { in _mesa_WaitSync()
368 ctx->Driver.ServerWaitSync(ctx, syncObj, flags, timeout); in _mesa_WaitSync()
377 struct gl_sync_object *const syncObj = (struct gl_sync_object *) sync; in _mesa_GetSynciv() local
382 if (!_mesa_validate_sync(syncObj)) { in _mesa_GetSynciv()
389 v[0] = syncObj->Type; in _mesa_GetSynciv()
394 v[0] = syncObj->SyncCondition; in _mesa_GetSynciv()
403 ctx->Driver.CheckSync(ctx, syncObj); in _mesa_GetSynciv()
405 v[0] = (syncObj->StatusFlag) ? GL_SIGNALED : GL_UNSIGNALED; in _mesa_GetSynciv()
410 v[0] = syncObj->Flags; in _mesa_GetSynciv()