From 6d4fc0e5bfae5d2f7b1bdfeba79872c7bcb1c891 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Mon, 9 Jan 2023 16:01:29 -0800 Subject: [PATCH] anv: rename anv_execbuf->array_length to bo_array_length Because this is counting the array length of the things related to the BOs, just like syncobj_array_length is counting the array length of the things related to syncobjs. v2: Rebase. Reviewed-by: Ivan Briano Reviewed-by: Lionel Landwerlin Signed-off-by: Paulo Zanoni Part-of: --- src/intel/vulkan/i915/anv_batch_chain.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/intel/vulkan/i915/anv_batch_chain.c b/src/intel/vulkan/i915/anv_batch_chain.c index f9cf800e106..ece13cfbc05 100644 --- a/src/intel/vulkan/i915/anv_batch_chain.c +++ b/src/intel/vulkan/i915/anv_batch_chain.c @@ -37,11 +37,9 @@ struct anv_execbuf { struct drm_i915_gem_exec_object2 * objects; uint32_t bo_count; + uint32_t bo_array_length; struct anv_bo ** bos; - /* Allocated length of the 'objects' and 'bos' arrays */ - uint32_t array_length; - uint32_t syncobj_count; uint32_t syncobj_array_length; struct drm_i915_gem_exec_fence * syncobjs; @@ -107,8 +105,8 @@ anv_execbuf_add_bo(struct anv_device *device, /* We've never seen this one before. Add it to the list and assign * an id that we can use later. */ - if (exec->bo_count >= exec->array_length) { - uint32_t new_len = exec->objects ? exec->array_length * 2 : 64; + if (exec->bo_count >= exec->bo_array_length) { + uint32_t new_len = exec->objects ? exec->bo_array_length * 2 : 64; struct drm_i915_gem_exec_object2 *new_objects = vk_alloc(exec->alloc, new_len * sizeof(*new_objects), 8, exec->alloc_scope); @@ -134,10 +132,10 @@ anv_execbuf_add_bo(struct anv_device *device, exec->objects = new_objects; exec->bos = new_bos; - exec->array_length = new_len; + exec->bo_array_length = new_len; } - assert(exec->bo_count < exec->array_length); + assert(exec->bo_count < exec->bo_array_length); bo->exec_obj_index = exec->bo_count++; obj = &exec->objects[bo->exec_obj_index];