Lines Matching defs:timeline
61 struct vk_sync_timeline *timeline = to_vk_sync_timeline(sync);
65 container_of(timeline->sync.type, struct vk_sync_timeline_type, sync);
68 ret = mtx_init(&timeline->mutex, mtx_plain);
72 ret = cnd_init(&timeline->cond);
74 mtx_destroy(&timeline->mutex);
78 timeline->highest_past =
79 timeline->highest_pending = initial_value;
80 list_inithead(&timeline->pending_points);
81 list_inithead(&timeline->free_points);
90 struct vk_sync_timeline *timeline = to_vk_sync_timeline(sync);
93 &timeline->free_points, link) {
99 &timeline->pending_points, link) {
105 cnd_destroy(&timeline->cond);
106 mtx_destroy(&timeline->mutex);
110 vk_sync_timeline_first_point(struct vk_sync_timeline *timeline)
113 list_first_entry(&timeline->pending_points,
116 assert(point->value <= timeline->highest_pending);
117 assert(point->value > timeline->highest_past);
124 struct vk_sync_timeline *timeline,
129 struct vk_sync_timeline *timeline,
136 result = vk_sync_timeline_gc_locked(device, timeline, false);
140 if (list_is_empty(&timeline->free_points)) {
142 container_of(timeline->sync.type, struct vk_sync_timeline_type, sync);
153 point->timeline = timeline;
162 point = list_first_entry(&timeline->free_points,
182 struct vk_sync_timeline *timeline,
188 mtx_lock(&timeline->mutex);
189 result = vk_sync_timeline_alloc_point_locked(device, timeline, value, point_out);
190 mtx_unlock(&timeline->mutex);
196 vk_sync_timeline_point_free_locked(struct vk_sync_timeline *timeline,
200 list_add(&point->link, &timeline->free_points);
207 struct vk_sync_timeline *timeline = point->timeline;
209 mtx_lock(&timeline->mutex);
210 vk_sync_timeline_point_free_locked(timeline, point);
211 mtx_unlock(&timeline->mutex);
221 vk_sync_timeline_point_unref(struct vk_sync_timeline *timeline,
227 vk_sync_timeline_point_free_locked(timeline, point);
231 vk_sync_timeline_point_complete(struct vk_sync_timeline *timeline,
237 assert(timeline->highest_past < point->value);
238 timeline->highest_past = point->value;
244 vk_sync_timeline_point_free_locked(timeline, point);
249 struct vk_sync_timeline *timeline,
253 &timeline->pending_points, link) {
254 /* timeline->higest_pending is only incremented once submission has
258 if (point->value > timeline->highest_pending)
286 vk_sync_timeline_point_complete(timeline, point);
296 struct vk_sync_timeline *timeline = point->timeline;
298 mtx_lock(&timeline->mutex);
300 assert(point->value > timeline->highest_pending);
301 timeline->highest_pending = point->value;
305 list_addtail(&point->link, &timeline->pending_points);
307 int ret = cnd_broadcast(&timeline->cond);
309 mtx_unlock(&timeline->mutex);
319 struct vk_sync_timeline *timeline,
323 if (timeline->highest_past >= wait_value) {
330 &timeline->pending_points, link) {
343 struct vk_sync_timeline *timeline,
347 mtx_lock(&timeline->mutex);
348 VkResult result = vk_sync_timeline_get_point_locked(device, timeline,
350 mtx_unlock(&timeline->mutex);
359 struct vk_sync_timeline *timeline = point->timeline;
361 mtx_lock(&timeline->mutex);
362 vk_sync_timeline_point_unref(timeline, point);
363 mtx_unlock(&timeline->mutex);
368 struct vk_sync_timeline *timeline,
371 VkResult result = vk_sync_timeline_gc_locked(device, timeline, true);
375 if (unlikely(value <= timeline->highest_past)) {
380 assert(list_is_empty(&timeline->pending_points));
381 assert(timeline->highest_pending == timeline->highest_past);
382 timeline->highest_pending = timeline->highest_past = value;
384 int ret = cnd_broadcast(&timeline->cond);
396 struct vk_sync_timeline *timeline = to_vk_sync_timeline(sync);
398 mtx_lock(&timeline->mutex);
399 VkResult result = vk_sync_timeline_signal_locked(device, timeline, value);
400 mtx_unlock(&timeline->mutex);
410 struct vk_sync_timeline *timeline = to_vk_sync_timeline(sync);
412 mtx_lock(&timeline->mutex);
413 VkResult result = vk_sync_timeline_gc_locked(device, timeline, true);
414 mtx_unlock(&timeline->mutex);
419 *value = timeline->highest_past;
426 struct vk_sync_timeline *timeline,
431 /* Wait on the queue_submit condition variable until the timeline has a
435 while (timeline->highest_pending < wait_value) {
442 ret = cnd_wait(&timeline->cond, &timeline->mutex);
455 ret = cnd_wait(&timeline->cond, &timeline->mutex);
457 ret = cnd_timedwait(&timeline->cond, &timeline->mutex,
474 VkResult result = vk_sync_timeline_gc_locked(device, timeline, false);
478 while (timeline->highest_past < wait_value) {
479 struct vk_sync_timeline_point *point = vk_sync_timeline_first_point(timeline);
483 mtx_unlock(&timeline->mutex);
490 mtx_lock(&timeline->mutex);
491 vk_sync_timeline_point_unref(timeline, point);
497 vk_sync_timeline_point_complete(timeline, point);
510 struct vk_sync_timeline *timeline = to_vk_sync_timeline(sync);
512 mtx_lock(&timeline->mutex);
513 VkResult result = vk_sync_timeline_wait_locked(device, timeline,
516 mtx_unlock(&timeline->mutex);