Lines Matching refs:exec
1221 anv_execbuf_init(struct anv_execbuf *exec)
1223 memset(exec, 0, sizeof(*exec));
1227 anv_execbuf_finish(struct anv_execbuf *exec)
1229 vk_free(exec->alloc, exec->syncobjs);
1230 vk_free(exec->alloc, exec->syncobj_values);
1231 vk_free(exec->alloc, exec->surface_states_relocs);
1232 vk_free(exec->alloc, exec->objects);
1233 vk_free(exec->alloc, exec->bos);
1237 anv_execbuf_add_ext(struct anv_execbuf *exec,
1241 __u64 *iter = &exec->execbuf.cliprects_ptr;
1243 exec->execbuf.flags |= I915_EXEC_USE_EXTENSIONS;
1256 struct anv_execbuf *exec,
1263 struct anv_execbuf *exec,
1272 if (bo->exec_obj_index < exec->bo_count &&
1273 exec->bos[bo->exec_obj_index] == bo)
1274 obj = &exec->objects[bo->exec_obj_index];
1280 if (exec->bo_count >= exec->array_length) {
1281 uint32_t new_len = exec->objects ? exec->array_length * 2 : 64;
1284 vk_alloc(exec->alloc, new_len * sizeof(*new_objects), 8, exec->alloc_scope);
1289 vk_alloc(exec->alloc, new_len * sizeof(*new_bos), 8, exec->alloc_scope);
1291 vk_free(exec->alloc, new_objects);
1295 if (exec->objects) {
1296 memcpy(new_objects, exec->objects,
1297 exec->bo_count * sizeof(*new_objects));
1298 memcpy(new_bos, exec->bos,
1299 exec->bo_count * sizeof(*new_bos));
1302 vk_free(exec->alloc, exec->objects);
1303 vk_free(exec->alloc, exec->bos);
1305 exec->objects = new_objects;
1306 exec->bos = new_bos;
1307 exec->array_length = new_len;
1310 assert(exec->bo_count < exec->array_length);
1312 bo->exec_obj_index = exec->bo_count++;
1313 obj = &exec->objects[bo->exec_obj_index];
1314 exec->bos[bo->exec_obj_index] = bo;
1339 exec->has_relocs = true;
1348 result = anv_execbuf_add_bo(device, exec, relocs->reloc_bos[i],
1355 return anv_execbuf_add_bo_bitset(device, exec, relocs->dep_words,
1365 struct anv_execbuf *exec,
1378 anv_execbuf_add_bo(device, exec, bo, NULL, extra_flags);
1512 execbuf_can_skip_relocations(struct anv_execbuf *exec)
1514 if (!exec->has_relocs)
1530 for (uint32_t i = 0; i < exec->bo_count; i++) {
1531 assert(!exec->bos[i]->is_wrapper);
1532 if (exec->bos[i]->offset == (uint64_t)-1)
1541 struct anv_execbuf *exec)
1564 for (uint32_t i = 0; i < exec->bo_count; i++)
1565 exec->objects[i].offset = exec->bos[i]->offset;
1585 struct anv_execbuf *exec,
1590 if (exec->syncobj_count >= exec->syncobj_array_length) {
1591 uint32_t new_len = MAX2(exec->syncobj_array_length * 2, 16);
1594 vk_alloc(exec->alloc, new_len * sizeof(*new_syncobjs),
1595 8, exec->alloc_scope);
1599 if (exec->syncobjs)
1600 typed_memcpy(new_syncobjs, exec->syncobjs, exec->syncobj_count);
1602 exec->syncobjs = new_syncobjs;
1604 if (exec->syncobj_values) {
1606 vk_alloc(exec->alloc, new_len * sizeof(*new_syncobj_values),
1607 8, exec->alloc_scope);
1611 typed_memcpy(new_syncobj_values, exec->syncobj_values,
1612 exec->syncobj_count);
1614 exec->syncobj_values = new_syncobj_values;
1617 exec->syncobj_array_length = new_len;
1620 if (timeline_value && !exec->syncobj_values) {
1621 exec->syncobj_values =
1622 vk_zalloc(exec->alloc, exec->syncobj_array_length *
1623 sizeof(*exec->syncobj_values),
1624 8, exec->alloc_scope);
1625 if (!exec->syncobj_values)
1629 exec->syncobjs[exec->syncobj_count] = (struct drm_i915_gem_exec_fence) {
1634 exec->syncobj_values[exec->syncobj_count] = timeline_value;
1636 exec->syncobj_count++;