• Home
  • Raw
  • Download

Lines Matching refs:fence

110 wsbmFenceType(struct _WsbmFenceObject *fence)  in wsbmFenceType()  argument
112 return fence->fence_type; in wsbmFenceType()
163 struct _WsbmFenceObject *fence = *pFence; in wsbmFenceUnreference() local
167 if (fence == NULL) in wsbmFenceUnreference()
170 mgr = fence->mgr; in wsbmFenceUnreference()
171 if (wsbmAtomicDecZero(&fence->refCount)) { in wsbmFenceUnreference()
172 struct _WsbmFenceClass *fc = &mgr->classes[fence->fence_class]; in wsbmFenceUnreference()
175 WSBMLISTDELINIT(&fence->head); in wsbmFenceUnreference()
177 if (fence->private) in wsbmFenceUnreference()
178 mgr->info.unreference(mgr, &fence->private); in wsbmFenceUnreference()
179 fence->mgr = NULL; in wsbmFenceUnreference()
181 free(fence); in wsbmFenceUnreference()
223 wsbmFenceFinish(struct _WsbmFenceObject *fence, uint32_t fence_type, in wsbmFenceFinish() argument
226 struct _WsbmFenceMgr *mgr = fence->mgr; in wsbmFenceFinish()
229 if ((wsbmAtomicRead(&fence->signaled_types) & fence_type) == fence_type) in wsbmFenceFinish()
232 ret = mgr->info.finish(mgr, fence->private, fence_type, lazy_hint); in wsbmFenceFinish()
236 wsbmSignalPreviousFences(mgr, &fence->head, fence->fence_class, in wsbmFenceFinish()
243 wsbmFenceSignaledTypeCached(struct _WsbmFenceObject * fence) in wsbmFenceSignaledTypeCached() argument
245 return wsbmAtomicRead(&fence->signaled_types); in wsbmFenceSignaledTypeCached()
249 wsbmFenceSignaledType(struct _WsbmFenceObject *fence, uint32_t flush_type, in wsbmFenceSignaledType() argument
258 mgr = fence->mgr; in wsbmFenceSignaledType()
259 *signaled = wsbmAtomicRead(&fence->signaled_types); in wsbmFenceSignaledType()
263 ret = mgr->info.signaled(mgr, fence->private, flush_type, signaled); in wsbmFenceSignaledType()
265 *signaled = wsbmAtomicRead(&fence->signaled_types); in wsbmFenceSignaledType()
270 old_signaled_types = wsbmAtomicRead(&fence->signaled_types); in wsbmFenceSignaledType()
275 ret_st = wsbmAtomicCmpXchg(&fence->signaled_types, old_signaled_types, in wsbmFenceSignaledType()
278 wsbmSignalPreviousFences(mgr, &fence->head, fence->fence_class, in wsbmFenceSignaledType()
288 wsbmFenceReference(struct _WsbmFenceObject *fence) in wsbmFenceReference() argument
290 if (fence == NULL) in wsbmFenceReference()
292 wsbmAtomicInc(&fence->refCount); in wsbmFenceReference()
293 return fence; in wsbmFenceReference()
302 struct _WsbmFenceObject *fence; in wsbmFenceCreateSig() local
303 size_t fence_size = sizeof(*fence); in wsbmFenceCreateSig()
308 fence = calloc(1, fence_size + private_size); in wsbmFenceCreateSig()
310 if (!fence) in wsbmFenceCreateSig()
313 wsbmAtomicSet(&fence->refCount, 1); in wsbmFenceCreateSig()
314 fence->mgr = mgr; in wsbmFenceCreateSig()
315 fence->fence_class = fence_class; in wsbmFenceCreateSig()
316 fence->fence_type = fence_type; in wsbmFenceCreateSig()
317 wsbmAtomicSet(&fence->signaled_types, signaled_types); in wsbmFenceCreateSig()
318 fence->private = private; in wsbmFenceCreateSig()
320 fence->private = (void *)(((uint8_t *) fence) + fence_size); in wsbmFenceCreateSig()
321 memcpy(fence->private, private, private_size); in wsbmFenceCreateSig()
325 WSBMLISTADDTAIL(&fence->head, &fc->head); in wsbmFenceCreateSig()
328 return fence; in wsbmFenceCreateSig()
337 if (fence) in wsbmFenceCreateSig()
338 free(fence); in wsbmFenceCreateSig()