anv: there's no need to set exec_obj offsets twice

The anv_execbuf_add_bo() function already sets the offsets for the
exec_objects. Since we're always using softpin and never using
relocations all these objects should have non-changing offsets, all
set during anv_bo creation and never changed. Not only we should not
change these offsets, we definitely don't change them between
anv_execbuf_add_bo() and this loop we're removing.

Previously, we'd have the offset set as -1 for BOs that had never been
submitted when we were not using softpin.

Notice that with games we can have several hundreds of BOs in this
array.

This loop was added by:
  c5f7e1f5b4 ("anv: Delete relocation support from batch submission")

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20885>
This commit is contained in:
Paulo Zanoni
2023-01-20 17:38:11 -08:00
committed by Marge Bot
parent 5de60fbc3e
commit 38a087c4ce

View File

@@ -378,9 +378,6 @@ setup_execbuf_for_cmd_buffers(struct anv_execbuf *execbuf,
return result;
}
for (uint32_t i = 0; i < execbuf->bo_count; i++)
execbuf->objects[i].offset = execbuf->bos[i]->offset;
struct anv_batch_bo *first_batch_bo =
list_first_entry(&cmd_buffers[0]->batch_bos, struct anv_batch_bo, link);