anv: Remove VkAllocationCallbacks parameter from reloc functions

Mismatch allocator could cause bad things, so better set the allocator
on anv_reloc_list_init() and use it in every reloc function.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24411>
This commit is contained in:
José Roberto de Souza
2023-07-31 11:13:04 -07:00
committed by Marge Bot
parent 0584bb450e
commit d9d284d050
8 changed files with 35 additions and 62 deletions

View File

@@ -76,8 +76,7 @@ blorp_emit_reloc(struct blorp_batch *batch,
.bo = address.buffer,
.offset = address.offset,
};
anv_reloc_list_add_bo(cmd_buffer->batch.relocs,
cmd_buffer->batch.alloc, anv_addr.bo);
anv_reloc_list_add_bo(cmd_buffer->batch.relocs, anv_addr.bo);
return anv_address_physical(anv_address_add(anv_addr, delta));
}
@@ -88,7 +87,6 @@ blorp_surface_reloc(struct blorp_batch *batch, uint32_t ss_offset,
struct anv_cmd_buffer *cmd_buffer = batch->driver_batch;
VkResult result = anv_reloc_list_add_bo(&cmd_buffer->surface_relocs,
&cmd_buffer->vk.pool->alloc,
address.buffer);
if (unlikely(result != VK_SUCCESS))
anv_batch_set_error(&cmd_buffer->batch, result);