• Home
  • Raw
  • Download

Lines Matching refs:submit

89                       struct anv_queue_submit *submit)  in anv_queue_submit_free()  argument
91 const VkAllocationCallbacks *alloc = submit->alloc; in anv_queue_submit_free()
93 for (uint32_t i = 0; i < submit->temporary_semaphore_count; i++) in anv_queue_submit_free()
94 anv_semaphore_impl_cleanup(device, &submit->temporary_semaphores[i]); in anv_queue_submit_free()
95 for (uint32_t i = 0; i < submit->sync_fd_semaphore_count; i++) in anv_queue_submit_free()
96 anv_semaphore_unref(device, submit->sync_fd_semaphores[i]); in anv_queue_submit_free()
98 if (submit->in_fence != -1) { in anv_queue_submit_free()
100 close(submit->in_fence); in anv_queue_submit_free()
102 if (submit->out_fence != -1) { in anv_queue_submit_free()
104 close(submit->out_fence); in anv_queue_submit_free()
106 vk_free(alloc, submit->fences); in anv_queue_submit_free()
107 vk_free(alloc, submit->fence_values); in anv_queue_submit_free()
108 vk_free(alloc, submit->temporary_semaphores); in anv_queue_submit_free()
109 vk_free(alloc, submit->wait_timelines); in anv_queue_submit_free()
110 vk_free(alloc, submit->wait_timeline_values); in anv_queue_submit_free()
111 vk_free(alloc, submit->signal_timelines); in anv_queue_submit_free()
112 vk_free(alloc, submit->signal_timeline_values); in anv_queue_submit_free()
113 vk_free(alloc, submit->fence_bos); in anv_queue_submit_free()
114 vk_free(alloc, submit); in anv_queue_submit_free()
118 anv_queue_submit_ready_locked(struct anv_queue_submit *submit) in anv_queue_submit_ready_locked() argument
120 for (uint32_t i = 0; i < submit->wait_timeline_count; i++) { in anv_queue_submit_ready_locked()
121 if (submit->wait_timeline_values[i] > submit->wait_timelines[i]->highest_pending) in anv_queue_submit_ready_locked()
242 static VkResult anv_queue_submit_add_fence_bo(struct anv_queue_submit *submit,
248 struct anv_queue_submit *submit) in anv_queue_submit_timeline_locked() argument
252 for (uint32_t i = 0; i < submit->wait_timeline_count; i++) { in anv_queue_submit_timeline_locked()
253 struct anv_timeline *timeline = submit->wait_timelines[i]; in anv_queue_submit_timeline_locked()
254 uint64_t wait_value = submit->wait_timeline_values[i]; in anv_queue_submit_timeline_locked()
262 result = anv_queue_submit_add_fence_bo(submit, point->bo, false); in anv_queue_submit_timeline_locked()
268 for (uint32_t i = 0; i < submit->signal_timeline_count; i++) { in anv_queue_submit_timeline_locked()
269 struct anv_timeline *timeline = submit->signal_timelines[i]; in anv_queue_submit_timeline_locked()
270 uint64_t signal_value = submit->signal_timeline_values[i]; in anv_queue_submit_timeline_locked()
278 result = anv_queue_submit_add_fence_bo(submit, point->bo, true); in anv_queue_submit_timeline_locked()
283 result = anv_queue_execbuf_locked(queue, submit); in anv_queue_submit_timeline_locked()
287 for (uint32_t i = 0; i < submit->signal_timeline_count; i++) { in anv_queue_submit_timeline_locked()
288 struct anv_timeline *timeline = submit->signal_timelines[i]; in anv_queue_submit_timeline_locked()
289 uint64_t signal_value = submit->signal_timeline_values[i]; in anv_queue_submit_timeline_locked()
296 for (uint32_t i = 0; i < submit->sync_fd_semaphore_count; i++) { in anv_queue_submit_timeline_locked()
297 struct anv_semaphore *semaphore = submit->sync_fd_semaphores[i]; in anv_queue_submit_timeline_locked()
305 impl->fd = os_dupfd_cloexec(submit->out_fence); in anv_queue_submit_timeline_locked()
311 for (uint32_t i = 0; i < submit->signal_timeline_count; i++) { in anv_queue_submit_timeline_locked()
312 struct anv_timeline *timeline = submit->signal_timelines[i]; in anv_queue_submit_timeline_locked()
313 uint64_t signal_value = submit->signal_timeline_values[i]; in anv_queue_submit_timeline_locked()
331 list_for_each_entry_safe(struct anv_queue_submit, submit, in anv_queue_submit_deferred_locked()
333 if (!anv_queue_submit_ready_locked(submit)) in anv_queue_submit_deferred_locked()
337 list_del(&submit->link); in anv_queue_submit_deferred_locked()
339 result = anv_queue_submit_timeline_locked(queue, submit); in anv_queue_submit_deferred_locked()
341 anv_queue_submit_free(queue->device, submit); in anv_queue_submit_deferred_locked()
359 struct anv_queue_submit *submit) in anv_queue_submit_signal_fences() argument
361 for (uint32_t i = 0; i < submit->fence_count; i++) { in anv_queue_submit_signal_fences()
362 if (submit->fences[i].flags & I915_EXEC_FENCE_SIGNAL) { in anv_queue_submit_signal_fences()
363 anv_gem_syncobj_timeline_signal(device, &submit->fences[i].handle, in anv_queue_submit_signal_fences()
364 &submit->fence_values[i], 1); in anv_queue_submit_signal_fences()
378 struct anv_queue_submit *submit = in anv_queue_task() local
380 list_del(&submit->link); in anv_queue_task()
394 if (!queue->lost && submit->wait_timeline_count > 0) { in anv_queue_task()
397 queue->device, submit->wait_timeline_syncobjs, in anv_queue_task()
398 submit->wait_timeline_values, submit->wait_timeline_count, in anv_queue_task()
410 result = anv_queue_execbuf_locked(queue, submit); in anv_queue_task()
414 for (uint32_t i = 0; i < submit->sync_fd_semaphore_count; i++) { in anv_queue_task()
415 struct anv_semaphore *semaphore = submit->sync_fd_semaphores[i]; in anv_queue_task()
423 impl->fd = dup(submit->out_fence); in anv_queue_task()
432 anv_queue_submit_signal_fences(queue->device, submit); in anv_queue_task()
435 anv_queue_submit_free(queue->device, submit); in anv_queue_task()
453 struct anv_queue_submit *submit = *_submit; in _anv_queue_submit() local
463 list_addtail(&submit->link, &queue->queued_submits); in _anv_queue_submit()
468 list_addtail(&submit->link, &queue->queued_submits); in _anv_queue_submit()
549 anv_queue_submit_add_fence_bo(struct anv_queue_submit *submit, in anv_queue_submit_add_fence_bo() argument
553 if (submit->fence_bo_count >= submit->fence_bo_array_length) { in anv_queue_submit_add_fence_bo()
554 uint32_t new_len = MAX2(submit->fence_bo_array_length * 2, 64); in anv_queue_submit_add_fence_bo()
556 vk_realloc(submit->alloc, in anv_queue_submit_add_fence_bo()
557 submit->fence_bos, new_len * sizeof(*submit->fence_bos), in anv_queue_submit_add_fence_bo()
558 8, submit->alloc_scope); in anv_queue_submit_add_fence_bo()
562 submit->fence_bos = new_fence_bos; in anv_queue_submit_add_fence_bo()
563 submit->fence_bo_array_length = new_len; in anv_queue_submit_add_fence_bo()
569 submit->fence_bos[submit->fence_bo_count++] = anv_pack_ptr(bo, 1, signal); in anv_queue_submit_add_fence_bo()
575 anv_queue_submit_add_syncobj(struct anv_queue_submit* submit, in anv_queue_submit_add_syncobj() argument
583 if (submit->wait_timeline_count >= submit->wait_timeline_array_length) { in anv_queue_submit_add_syncobj()
584 uint32_t new_len = MAX2(submit->wait_timeline_array_length * 2, 64); in anv_queue_submit_add_syncobj()
587 vk_realloc(submit->alloc, in anv_queue_submit_add_syncobj()
588 submit->wait_timeline_syncobjs, in anv_queue_submit_add_syncobj()
589 new_len * sizeof(*submit->wait_timeline_syncobjs), in anv_queue_submit_add_syncobj()
590 8, submit->alloc_scope); in anv_queue_submit_add_syncobj()
594 submit->wait_timeline_syncobjs = new_wait_timeline_syncobjs; in anv_queue_submit_add_syncobj()
597 vk_realloc(submit->alloc, in anv_queue_submit_add_syncobj()
598submit->wait_timeline_values, new_len * sizeof(*submit->wait_timeline_values), in anv_queue_submit_add_syncobj()
599 8, submit->alloc_scope); in anv_queue_submit_add_syncobj()
603 submit->wait_timeline_values = new_wait_timeline_values; in anv_queue_submit_add_syncobj()
604 submit->wait_timeline_array_length = new_len; in anv_queue_submit_add_syncobj()
607 submit->wait_timeline_syncobjs[submit->wait_timeline_count] = handle; in anv_queue_submit_add_syncobj()
608 submit->wait_timeline_values[submit->wait_timeline_count] = value; in anv_queue_submit_add_syncobj()
610 submit->wait_timeline_count++; in anv_queue_submit_add_syncobj()
613 if (submit->fence_count >= submit->fence_array_length) { in anv_queue_submit_add_syncobj()
614 uint32_t new_len = MAX2(submit->fence_array_length * 2, 64); in anv_queue_submit_add_syncobj()
616 vk_realloc(submit->alloc, in anv_queue_submit_add_syncobj()
617 submit->fences, new_len * sizeof(*submit->fences), in anv_queue_submit_add_syncobj()
618 8, submit->alloc_scope); in anv_queue_submit_add_syncobj()
622 submit->fences = new_fences; in anv_queue_submit_add_syncobj()
625 vk_realloc(submit->alloc, in anv_queue_submit_add_syncobj()
626 submit->fence_values, new_len * sizeof(*submit->fence_values), in anv_queue_submit_add_syncobj()
627 8, submit->alloc_scope); in anv_queue_submit_add_syncobj()
631 submit->fence_values = new_fence_values; in anv_queue_submit_add_syncobj()
632 submit->fence_array_length = new_len; in anv_queue_submit_add_syncobj()
635 submit->fences[submit->fence_count] = (struct drm_i915_gem_exec_fence) { in anv_queue_submit_add_syncobj()
639 submit->fence_values[submit->fence_count] = value; in anv_queue_submit_add_syncobj()
640 submit->fence_count++; in anv_queue_submit_add_syncobj()
646 anv_queue_submit_add_sync_fd_fence(struct anv_queue_submit *submit, in anv_queue_submit_add_sync_fd_fence() argument
649 if (submit->sync_fd_semaphore_count >= submit->sync_fd_semaphore_array_length) { in anv_queue_submit_add_sync_fd_fence()
650 uint32_t new_len = MAX2(submit->sync_fd_semaphore_array_length * 2, 64); in anv_queue_submit_add_sync_fd_fence()
652 vk_realloc(submit->alloc, submit->sync_fd_semaphores, in anv_queue_submit_add_sync_fd_fence()
653 new_len * sizeof(*submit->sync_fd_semaphores), 8, in anv_queue_submit_add_sync_fd_fence()
654 submit->alloc_scope); in anv_queue_submit_add_sync_fd_fence()
658 submit->sync_fd_semaphores = new_semaphores; in anv_queue_submit_add_sync_fd_fence()
661 submit->sync_fd_semaphores[submit->sync_fd_semaphore_count++] = in anv_queue_submit_add_sync_fd_fence()
663 submit->need_out_fence = true; in anv_queue_submit_add_sync_fd_fence()
669 anv_queue_submit_add_timeline_wait(struct anv_queue_submit* submit, in anv_queue_submit_add_timeline_wait() argument
674 if (submit->wait_timeline_count >= submit->wait_timeline_array_length) { in anv_queue_submit_add_timeline_wait()
675 uint32_t new_len = MAX2(submit->wait_timeline_array_length * 2, 64); in anv_queue_submit_add_timeline_wait()
677 vk_realloc(submit->alloc, in anv_queue_submit_add_timeline_wait()
678 submit->wait_timelines, new_len * sizeof(*submit->wait_timelines), in anv_queue_submit_add_timeline_wait()
679 8, submit->alloc_scope); in anv_queue_submit_add_timeline_wait()
683 submit->wait_timelines = new_wait_timelines; in anv_queue_submit_add_timeline_wait()
686 vk_realloc(submit->alloc, in anv_queue_submit_add_timeline_wait()
687 submit->wait_timeline_values, new_len * sizeof(*submit->wait_timeline_values), in anv_queue_submit_add_timeline_wait()
688 8, submit->alloc_scope); in anv_queue_submit_add_timeline_wait()
692 submit->wait_timeline_values = new_wait_timeline_values; in anv_queue_submit_add_timeline_wait()
694 submit->wait_timeline_array_length = new_len; in anv_queue_submit_add_timeline_wait()
697 submit->wait_timelines[submit->wait_timeline_count] = timeline; in anv_queue_submit_add_timeline_wait()
698 submit->wait_timeline_values[submit->wait_timeline_count] = value; in anv_queue_submit_add_timeline_wait()
700 submit->wait_timeline_count++; in anv_queue_submit_add_timeline_wait()
706 anv_queue_submit_add_timeline_signal(struct anv_queue_submit* submit, in anv_queue_submit_add_timeline_signal() argument
713 if (submit->signal_timeline_count >= submit->signal_timeline_array_length) { in anv_queue_submit_add_timeline_signal()
714 uint32_t new_len = MAX2(submit->signal_timeline_array_length * 2, 64); in anv_queue_submit_add_timeline_signal()
716 vk_realloc(submit->alloc, in anv_queue_submit_add_timeline_signal()
717 submit->signal_timelines, new_len * sizeof(*submit->signal_timelines), in anv_queue_submit_add_timeline_signal()
718 8, submit->alloc_scope); in anv_queue_submit_add_timeline_signal()
722 submit->signal_timelines = new_signal_timelines; in anv_queue_submit_add_timeline_signal()
725 vk_realloc(submit->alloc, in anv_queue_submit_add_timeline_signal()
726submit->signal_timeline_values, new_len * sizeof(*submit->signal_timeline_values), in anv_queue_submit_add_timeline_signal()
727 8, submit->alloc_scope); in anv_queue_submit_add_timeline_signal()
731 submit->signal_timeline_values = new_signal_timeline_values; in anv_queue_submit_add_timeline_signal()
733 submit->signal_timeline_array_length = new_len; in anv_queue_submit_add_timeline_signal()
736 submit->signal_timelines[submit->signal_timeline_count] = timeline; in anv_queue_submit_add_timeline_signal()
737 submit->signal_timeline_values[submit->signal_timeline_count] = value; in anv_queue_submit_add_timeline_signal()
739 submit->signal_timeline_count++; in anv_queue_submit_add_timeline_signal()
750 struct anv_queue_submit *submit = vk_zalloc(alloc, sizeof(*submit), 8, alloc_scope); in anv_queue_submit_alloc() local
751 if (!submit) in anv_queue_submit_alloc()
754 submit->alloc = alloc; in anv_queue_submit_alloc()
755 submit->alloc_scope = alloc_scope; in anv_queue_submit_alloc()
756 submit->in_fence = -1; in anv_queue_submit_alloc()
757 submit->out_fence = -1; in anv_queue_submit_alloc()
758 submit->perf_query_pass = perf_query_pass; in anv_queue_submit_alloc()
760 return submit; in anv_queue_submit_alloc()
771 struct anv_queue_submit *submit = anv_queue_submit_alloc(device, -1); in anv_queue_submit_simple_batch() local
772 if (!submit) in anv_queue_submit_simple_batch()
787 result = anv_queue_submit_add_syncobj(submit, device, syncobj, in anv_queue_submit_simple_batch()
798 result = anv_queue_submit_add_fence_bo(submit, sync_bo, true /* signal */); in anv_queue_submit_simple_batch()
814 submit->simple_bo = batch_bo; in anv_queue_submit_simple_batch()
815 submit->simple_bo_size = size; in anv_queue_submit_simple_batch()
818 result = _anv_queue_submit(queue, &submit, true); in anv_queue_submit_simple_batch()
836 if (submit) in anv_queue_submit_simple_batch()
837 anv_queue_submit_free(device, submit); in anv_queue_submit_simple_batch()
847 if (submit) in anv_queue_submit_simple_batch()
848 anv_queue_submit_free(device, submit); in anv_queue_submit_simple_batch()
858 maybe_transfer_temporary_semaphore(struct anv_queue_submit *submit, in maybe_transfer_temporary_semaphore() argument
885 if (submit->temporary_semaphore_count >= submit->temporary_semaphore_array_length) { in maybe_transfer_temporary_semaphore()
886 uint32_t new_len = MAX2(submit->temporary_semaphore_array_length * 2, 8); in maybe_transfer_temporary_semaphore()
891 vk_realloc(submit->alloc, in maybe_transfer_temporary_semaphore()
892 submit->temporary_semaphores, in maybe_transfer_temporary_semaphore()
893 new_len * sizeof(*submit->temporary_semaphores), in maybe_transfer_temporary_semaphore()
894 8, submit->alloc_scope); in maybe_transfer_temporary_semaphore()
898 submit->temporary_semaphores = new_array; in maybe_transfer_temporary_semaphore()
899 submit->temporary_semaphore_array_length = new_len; in maybe_transfer_temporary_semaphore()
903 submit->temporary_semaphores[submit->temporary_semaphore_count++] = *impl; in maybe_transfer_temporary_semaphore()
904 *out_impl = &submit->temporary_semaphores[submit->temporary_semaphore_count - 1]; in maybe_transfer_temporary_semaphore()
928 struct anv_queue_submit *submit = anv_queue_submit_alloc(device, perf_query_pass); in anv_queue_submit() local
929 if (!submit) in anv_queue_submit()
932 submit->cmd_buffer = cmd_buffer; in anv_queue_submit()
939 result = maybe_transfer_temporary_semaphore(submit, semaphore, &impl); in anv_queue_submit()
946 result = anv_queue_submit_add_fence_bo(submit, impl->bo, false /* signal */); in anv_queue_submit()
958 result = anv_queue_submit_add_fence_bo(submit, impl->bo, true /* signal */); in anv_queue_submit()
965 if (submit->in_fence == -1) { in anv_queue_submit()
966 submit->in_fence = impl->fd; in anv_queue_submit()
967 if (submit->in_fence == -1) { in anv_queue_submit()
973 int merge = anv_gem_sync_file_merge(device, submit->in_fence, impl->fd); in anv_queue_submit()
979 close(submit->in_fence); in anv_queue_submit()
981 submit->in_fence = merge; in anv_queue_submit()
986 result = anv_queue_submit_add_syncobj(submit, device, in anv_queue_submit()
996 result = anv_queue_submit_add_timeline_wait(submit, device, in anv_queue_submit()
1004 result = anv_queue_submit_add_syncobj(submit, device, in anv_queue_submit()
1038 result = anv_queue_submit_add_fence_bo(submit, impl->bo, true /* signal */); in anv_queue_submit()
1045 result = anv_queue_submit_add_sync_fd_fence(submit, semaphore); in anv_queue_submit()
1051 result = anv_queue_submit_add_syncobj(submit, device, impl->syncobj, in anv_queue_submit()
1060 result = anv_queue_submit_add_timeline_signal(submit, device, in anv_queue_submit()
1068 result = anv_queue_submit_add_syncobj(submit, device, impl->syncobj, in anv_queue_submit()
1081 result = anv_queue_submit_add_fence_bo(submit, wsi_signal_bo, true /* signal */); in anv_queue_submit()
1105 result = anv_queue_submit_add_fence_bo(submit, impl->bo.bo, true /* signal */); in anv_queue_submit()
1118 result = anv_queue_submit_add_syncobj(submit, device, impl->syncobj, in anv_queue_submit()
1131 result = _anv_queue_submit(queue, &submit, false); in anv_queue_submit()
1163 if (submit) in anv_queue_submit()
1164 anv_queue_submit_free(device, submit); in anv_queue_submit()