anv: Delete anv_reloc_list_add()
We don't need the offset to write a relocation at any longer, so all it does is call anv_reloc_list_add_bo() at this point. Just use that. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18208>
This commit is contained in:

committed by
Marge Bot

parent
4b5c29bad0
commit
7b7381e8d7
@@ -196,23 +196,6 @@ anv_reloc_list_add_bo(struct anv_reloc_list *list,
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
||||
VkResult
|
||||
anv_reloc_list_add(struct anv_reloc_list *list,
|
||||
const VkAllocationCallbacks *alloc,
|
||||
uint32_t offset, struct anv_bo *target_bo, uint32_t delta,
|
||||
uint64_t *address_u64_out)
|
||||
{
|
||||
struct anv_bo *unwrapped_target_bo = anv_bo_unwrap(target_bo);
|
||||
uint64_t target_bo_offset = READ_ONCE(unwrapped_target_bo->offset);
|
||||
if (address_u64_out)
|
||||
*address_u64_out = target_bo_offset + delta;
|
||||
|
||||
assert(unwrapped_target_bo->gem_handle > 0);
|
||||
assert(unwrapped_target_bo->refcount > 0);
|
||||
|
||||
return anv_reloc_list_add_bo(list, alloc, unwrapped_target_bo);
|
||||
}
|
||||
|
||||
static void
|
||||
anv_reloc_list_clear(struct anv_reloc_list *list)
|
||||
{
|
||||
|
@@ -1384,11 +1384,6 @@ VkResult anv_reloc_list_init(struct anv_reloc_list *list,
|
||||
void anv_reloc_list_finish(struct anv_reloc_list *list,
|
||||
const VkAllocationCallbacks *alloc);
|
||||
|
||||
VkResult anv_reloc_list_add(struct anv_reloc_list *list,
|
||||
const VkAllocationCallbacks *alloc,
|
||||
uint32_t offset, struct anv_bo *target_bo,
|
||||
uint32_t delta, uint64_t *address_u64_out);
|
||||
|
||||
VkResult anv_reloc_list_add_bo(struct anv_reloc_list *list,
|
||||
const VkAllocationCallbacks *alloc,
|
||||
struct anv_bo *target_bo);
|
||||
|
@@ -280,32 +280,23 @@ static void
|
||||
add_surface_state_relocs(struct anv_cmd_buffer *cmd_buffer,
|
||||
struct anv_surface_state state)
|
||||
{
|
||||
const struct isl_device *isl_dev = &cmd_buffer->device->isl_dev;
|
||||
|
||||
assert(!anv_address_is_null(state.address));
|
||||
add_surface_reloc(cmd_buffer, state.state, state.address);
|
||||
|
||||
if (!anv_address_is_null(state.aux_address)) {
|
||||
VkResult result =
|
||||
anv_reloc_list_add(&cmd_buffer->surface_relocs,
|
||||
&cmd_buffer->vk.pool->alloc,
|
||||
state.state.offset + isl_dev->ss.aux_addr_offset,
|
||||
state.aux_address.bo,
|
||||
state.aux_address.offset,
|
||||
NULL);
|
||||
anv_reloc_list_add_bo(&cmd_buffer->surface_relocs,
|
||||
&cmd_buffer->vk.pool->alloc,
|
||||
state.aux_address.bo);
|
||||
if (result != VK_SUCCESS)
|
||||
anv_batch_set_error(&cmd_buffer->batch, result);
|
||||
}
|
||||
|
||||
if (!anv_address_is_null(state.clear_address)) {
|
||||
VkResult result =
|
||||
anv_reloc_list_add(&cmd_buffer->surface_relocs,
|
||||
&cmd_buffer->vk.pool->alloc,
|
||||
state.state.offset +
|
||||
isl_dev->ss.clear_color_state_offset,
|
||||
state.clear_address.bo,
|
||||
state.clear_address.offset,
|
||||
NULL);
|
||||
anv_reloc_list_add_bo(&cmd_buffer->surface_relocs,
|
||||
&cmd_buffer->vk.pool->alloc,
|
||||
state.clear_address.bo);
|
||||
if (result != VK_SUCCESS)
|
||||
anv_batch_set_error(&cmd_buffer->batch, result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user