Lines Matching refs:relocs
68 list->relocs = in anv_reloc_list_init_clone()
69 vk_alloc(alloc, list->array_length * sizeof(*list->relocs), 8, in anv_reloc_list_init_clone()
71 if (list->relocs == NULL) in anv_reloc_list_init_clone()
78 vk_free(alloc, list->relocs); in anv_reloc_list_init_clone()
82 memcpy(list->relocs, other_list->relocs, in anv_reloc_list_init_clone()
83 list->array_length * sizeof(*list->relocs)); in anv_reloc_list_init_clone()
87 list->relocs = NULL; in anv_reloc_list_init_clone()
110 vk_free(alloc, list->relocs); in anv_reloc_list_finish()
128 vk_realloc(alloc, list->relocs, in anv_reloc_list_grow()
129 new_length * sizeof(*list->relocs), 8, in anv_reloc_list_grow()
133 list->relocs = new_relocs; in anv_reloc_list_grow()
209 entry = &list->relocs[index]; in anv_reloc_list_add()
239 memcpy(&list->relocs[list->num_relocs], &other->relocs[0], in anv_reloc_list_append()
240 other->num_relocs * sizeof(other->relocs[0])); in anv_reloc_list_append()
245 list->relocs[i + list->num_relocs].offset += offset; in anv_reloc_list_append()
285 VkResult result = anv_reloc_list_add(batch->relocs, batch->alloc, in anv_batch_emit_reloc()
329 VkResult result = anv_reloc_list_append(batch->relocs, batch->alloc, in anv_batch_emit_batch()
330 other->relocs, offset); in anv_batch_emit_batch()
359 result = anv_reloc_list_init(&bbo->relocs, &cmd_buffer->pool->alloc); in anv_batch_bo_create()
392 result = anv_reloc_list_init_clone(&bbo->relocs, &cmd_buffer->pool->alloc, in anv_batch_bo_clone()
393 &other_bbo->relocs); in anv_batch_bo_clone()
417 batch->relocs = &bbo->relocs; in anv_batch_bo_start()
418 anv_reloc_list_clear(&bbo->relocs); in anv_batch_bo_start()
429 batch->relocs = &bbo->relocs; in anv_batch_bo_continue()
493 uint32_t reloc_idx = prev_bbo->relocs.num_relocs - 1; in anv_batch_bo_link()
494 assert(prev_bbo->relocs.relocs[reloc_idx].offset == bb_start_offset + 4); in anv_batch_bo_link()
496 prev_bbo->relocs.reloc_bos[reloc_idx] = next_bbo->bo; in anv_batch_bo_link()
497 prev_bbo->relocs.relocs[reloc_idx].delta = next_bbo_offset; in anv_batch_bo_link()
500 prev_bbo->relocs.relocs[reloc_idx].presumed_offset = -1; in anv_batch_bo_link()
508 anv_reloc_list_finish(&bbo->relocs, &cmd_buffer->pool->alloc); in anv_batch_bo_destroy()
1161 struct anv_reloc_list *relocs, in anv_execbuf_add_bo() argument
1226 if (relocs != NULL) { in anv_execbuf_add_bo()
1229 if (relocs->num_relocs > 0) { in anv_execbuf_add_bo()
1235 obj->relocation_count = relocs->num_relocs; in anv_execbuf_add_bo()
1236 obj->relocs_ptr = (uintptr_t) relocs->relocs; in anv_execbuf_add_bo()
1238 for (size_t i = 0; i < relocs->num_relocs; i++) { in anv_execbuf_add_bo()
1242 assert(relocs->relocs[i].offset < bo->size); in anv_execbuf_add_bo()
1243 result = anv_execbuf_add_bo(device, exec, relocs->reloc_bos[i], in anv_execbuf_add_bo()
1250 return anv_execbuf_add_bo_bitset(device, exec, relocs->dep_words, in anv_execbuf_add_bo()
1251 relocs->deps, extra_flags); in anv_execbuf_add_bo()
1287 list->relocs[i].target_handle = anv_bo_unwrap(list->reloc_bos[i])->index; in anv_cmd_buffer_process_relocs()
1292 struct anv_reloc_list *relocs, in adjust_relocations_from_state_pool() argument
1298 for (size_t i = 0; i < relocs->num_relocs; i++) { in adjust_relocations_from_state_pool()
1304 relocs->relocs[i].offset += delta; in adjust_relocations_from_state_pool()
1311 struct anv_reloc_list *relocs, in adjust_relocations_to_state_pool() argument
1324 for (size_t i = 0; i < relocs->num_relocs; i++) { in adjust_relocations_to_state_pool()
1325 if (relocs->reloc_bos[i] == pool->block_pool.bo) { in adjust_relocations_to_state_pool()
1331 relocs->relocs[i].delta += delta; in adjust_relocations_to_state_pool()
1338 assert(relocs->relocs[i].offset < from_bo->size); in adjust_relocations_to_state_pool()
1340 from_bo->map + relocs->relocs[i].offset, in adjust_relocations_to_state_pool()
1341 relocs->relocs[i].presumed_offset + in adjust_relocations_to_state_pool()
1342 relocs->relocs[i].delta, false); in adjust_relocations_to_state_pool()
1357 if (list->relocs[i].presumed_offset == target_bo->offset && in anv_reloc_list_apply()
1361 void *p = bo->map + list->relocs[i].offset; in anv_reloc_list_apply()
1362 write_reloc(device, p, target_bo->offset + list->relocs[i].delta, true); in anv_reloc_list_apply()
1363 list->relocs[i].presumed_offset = target_bo->offset; in anv_reloc_list_apply()
1448 &(*bbo)->relocs, (*bbo)->bo, false); in relocate_cmd_buffer()
1531 adjust_relocations_to_state_pool(ss_pool, (*bbo)->bo, &(*bbo)->relocs, in setup_execbuf_for_cmd_buffer()
1535 (*bbo)->bo, &(*bbo)->relocs, 0); in setup_execbuf_for_cmd_buffer()
1580 anv_cmd_buffer_process_relocs(cmd_buffer, &(*bbo)->relocs); in setup_execbuf_for_cmd_buffer()
1644 cmd_buffer->surface_relocs.relocs[i].presumed_offset = -1; in setup_execbuf_for_cmd_buffer()