Module: Mesa
Branch: main
Commit: 6d4fc0e5bfae5d2f7b1bdfeba79872c7bcb1c891
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d4fc0e5bfae5d2f7b1bdfeba79872c7bcb1c891

Author: Paulo Zanoni <[email protected]>
Date:   Mon Jan  9 16:01:29 2023 -0800

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 <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Signed-off-by: Paulo Zanoni <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20703>

---

 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];

Reply via email to