Lines Matching defs:execbuf

1183    struct drm_i915_gem_execbuffer2           execbuf;
1209 * might be that a previous execbuf has already placed things in the VMA
1241 __u64 *iter = &exec->execbuf.cliprects_ptr;
1243 exec->execbuf.flags |= I915_EXEC_USE_EXTENSIONS;
1362 /* Add BO dependencies to execbuf */
1643 struct anv_execbuf *execbuf,
1661 return anv_execbuf_add_bo(device, execbuf, bo_sync->bo, NULL,
1669 return anv_execbuf_add_syncobj(device, execbuf, syncobj->syncobj,
1679 setup_execbuf_for_cmd_buffer(struct anv_execbuf *execbuf,
1694 result = anv_execbuf_add_bo(cmd_buffer->device, execbuf,
1700 /* Add surface dependencies (BOs) to the execbuf */
1701 anv_execbuf_add_bo_bitset(cmd_buffer->device, execbuf,
1714 result = anv_execbuf_add_bo(cmd_buffer->device, execbuf,
1747 setup_execbuf_for_cmd_buffers(struct anv_execbuf *execbuf,
1763 result = setup_execbuf_for_cmd_buffer(execbuf, cmd_buffers[i]);
1771 result = anv_execbuf_add_bo(device, execbuf, bo, NULL, 0);
1779 result = anv_execbuf_add_bo(device, execbuf, bo, NULL, 0);
1786 result = anv_execbuf_add_bo(device, execbuf, bo, NULL, 0);
1793 result = anv_execbuf_add_bo(device, execbuf, bo, NULL, 0);
1800 result = anv_execbuf_add_bo(device, execbuf, bo, NULL, 0);
1810 result = anv_execbuf_add_bo(device, execbuf, mem->bo, NULL, 0);
1822 if (execbuf->has_relocs) {
1823 no_reloc = execbuf_can_skip_relocations(execbuf);
1851 relocate_cmd_buffer(cmd_buffers[i], execbuf);
1880 if (first_batch_bo->bo->exec_obj_index != execbuf->bo_count - 1) {
1882 uint32_t last_idx = execbuf->bo_count - 1;
1884 struct drm_i915_gem_exec_object2 tmp_obj = execbuf->objects[idx];
1885 assert(execbuf->bos[idx] == first_batch_bo->bo);
1887 execbuf->objects[idx] = execbuf->objects[last_idx];
1888 execbuf->bos[idx] = execbuf->bos[last_idx];
1889 execbuf->bos[idx]->exec_obj_index = idx;
1891 execbuf->objects[last_idx] = tmp_obj;
1892 execbuf->bos[last_idx] = first_batch_bo->bo;
1898 assert(!execbuf->has_relocs);
1906 if (execbuf->has_relocs) {
1925 execbuf->execbuf = (struct drm_i915_gem_execbuffer2) {
1926 .buffers_ptr = (uintptr_t) execbuf->objects,
1927 .buffer_count = execbuf->bo_count,
1947 setup_empty_execbuf(struct anv_execbuf *execbuf, struct anv_queue *queue)
1950 VkResult result = anv_execbuf_add_bo(device, execbuf,
1956 execbuf->execbuf = (struct drm_i915_gem_execbuffer2) {
1957 .buffers_ptr = (uintptr_t) execbuf->objects,
1958 .buffer_count = execbuf->bo_count,
1970 setup_utrace_execbuf(struct anv_execbuf *execbuf, struct anv_queue *queue,
1974 VkResult result = anv_execbuf_add_bo(device, execbuf,
1980 result = anv_execbuf_add_sync(device, execbuf, flush->sync,
1985 if (flush->batch_bo->exec_obj_index != execbuf->bo_count - 1) {
1987 uint32_t last_idx = execbuf->bo_count - 1;
1989 struct drm_i915_gem_exec_object2 tmp_obj = execbuf->objects[idx];
1990 assert(execbuf->bos[idx] == flush->batch_bo);
1992 execbuf->objects[idx] = execbuf->objects[last_idx];
1993 execbuf->bos[idx] = execbuf->bos[last_idx];
1994 execbuf->bos[idx]->exec_obj_index = idx;
1996 execbuf->objects[last_idx] = tmp_obj;
1997 execbuf->bos[last_idx] = flush->batch_bo;
2004 execbuf->execbuf = (struct drm_i915_gem_execbuffer2) {
2005 .buffers_ptr = (uintptr_t) execbuf->objects,
2006 .buffer_count = execbuf->bo_count,
2010 (execbuf->has_relocs ? 0 : I915_EXEC_NO_RELOC),
2013 .num_cliprects = execbuf->syncobj_count,
2014 .cliprects_ptr = (uintptr_t)execbuf->syncobjs,
2027 struct anv_execbuf execbuf;
2028 anv_execbuf_init(&execbuf);
2029 execbuf.alloc = &device->vk.alloc;
2030 execbuf.alloc_scope = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE;
2032 VkResult result = setup_utrace_execbuf(&execbuf, queue, flush);
2037 anv_gem_execbuffer(queue->device, &execbuf.execbuf);
2041 struct drm_i915_gem_exec_object2 *objects = execbuf.objects;
2042 for (uint32_t k = 0; k < execbuf.bo_count; k++) {
2043 if (anv_bo_is_pinned(execbuf.bos[k]))
2044 assert(execbuf.bos[k]->offset == objects[k].offset);
2045 execbuf.bos[k]->offset = objects[k].offset;
2049 anv_execbuf_finish(&execbuf);
2054 /* We lock around execbuf for three main reasons:
2059 * this happens in the middle of setting up an execbuf, we could end up
2091 struct anv_execbuf execbuf;
2092 anv_execbuf_init(&execbuf);
2093 execbuf.alloc = &queue->device->vk.alloc;
2094 execbuf.alloc_scope = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE;
2095 execbuf.perf_query_pass = perf_query_pass;
2107 result = anv_execbuf_add_sync(device, &execbuf,
2121 anv_execbuf_add_bo(device, &execbuf, device->workaround_bo, NULL, 0);
2126 result = anv_execbuf_add_sync(device, &execbuf,
2135 result = anv_execbuf_add_sync(device, &execbuf,
2144 result = anv_execbuf_add_sync(device, &execbuf,
2153 result = setup_execbuf_for_cmd_buffers(&execbuf, queue,
2157 result = setup_empty_execbuf(&execbuf, queue);
2168 execbuf.execbuf.batch_start_offset, execbuf.execbuf.batch_len);
2169 for (uint32_t i = 0; i < execbuf.bo_count; i++) {
2170 const struct anv_bo *bo = execbuf.bos[i];
2207 if (execbuf.syncobj_values) {
2208 execbuf.timeline_fences.fence_count = execbuf.syncobj_count;
2209 execbuf.timeline_fences.handles_ptr = (uintptr_t)execbuf.syncobjs;
2210 execbuf.timeline_fences.values_ptr = (uintptr_t)execbuf.syncobj_values;
2211 anv_execbuf_add_ext(&execbuf,
2213 &execbuf.timeline_fences.base);
2214 } else if (execbuf.syncobjs) {
2215 execbuf.execbuf.flags |= I915_EXEC_FENCE_ARRAY;
2216 execbuf.execbuf.num_cliprects = execbuf.syncobj_count;
2217 execbuf.execbuf.cliprects_ptr = (uintptr_t)execbuf.syncobjs;
2263 anv_gem_execbuffer(queue->device, &execbuf.execbuf);
2276 struct drm_i915_gem_exec_object2 *objects = execbuf.objects;
2277 for (uint32_t k = 0; k < execbuf.bo_count; k++) {
2278 if (anv_bo_is_pinned(execbuf.bos[k]))
2279 assert(execbuf.bos[k]->offset == objects[k].offset);
2280 execbuf.bos[k]->offset = objects[k].offset;
2284 anv_execbuf_finish(&execbuf);
2364 /* Once the execbuf has returned, we need to set the fence state to
2365 * SUBMITTED. We can't do this before calling execbuf because
2370 * execbuf succeeds because we need to ensure that vkWaitForFences() and
2372 * VK_SUCCESS) in a finite amount of time even if execbuf fails.
2441 struct anv_execbuf execbuf;
2442 anv_execbuf_init(&execbuf);
2443 execbuf.alloc = &queue->device->vk.alloc;
2444 execbuf.alloc_scope = VK_SYSTEM_ALLOCATION_SCOPE_DEVICE;
2446 result = anv_execbuf_add_bo(device, &execbuf, batch_bo, NULL, 0);
2457 execbuf.execbuf = (struct drm_i915_gem_execbuffer2) {
2458 .buffers_ptr = (uintptr_t) execbuf.objects,
2459 .buffer_count = execbuf.bo_count,
2467 err = anv_gem_execbuffer(device, &execbuf.execbuf);
2481 anv_execbuf_finish(&execbuf);