Mesa (staging/19.2): anv: remove list items on batch fini

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 14 17:03:24 UTC 2019


Module: Mesa
Branch: staging/19.2
Commit: f56603c7c7468603276989e70fdfb1a9a48c968c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f56603c7c7468603276989e70fdfb1a9a48c968c

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Fri Sep 20 01:24:53 2019 +0300

anv: remove list items on batch fini

This doesn't seem to fix anything because those destroy() calls happen
right before the command buffer object & its list of batch_bo is also
destroyed. Still looks a bit cleaner.

v2: Found a second occurence

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net> (v2)
Fixes: 26ba0ad54d ("vk: Re-name command buffer implementation files")
Cc: <mesa-stable at lists.freedesktop.org>
(cherry picked from commit 935f8f0e56a409b10fac86e18f68be776cdff29f)

---

 src/intel/vulkan/anv_batch_chain.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index 1a8a3197427..5d1c3da16a6 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -478,8 +478,10 @@ anv_batch_bo_list_clone(const struct list_head *list,
    }
 
    if (result != VK_SUCCESS) {
-      list_for_each_entry_safe(struct anv_batch_bo, bbo, new_list, link)
+      list_for_each_entry_safe(struct anv_batch_bo, bbo, new_list, link) {
+         list_del(&bbo->link);
          anv_batch_bo_destroy(bbo, cmd_buffer);
+      }
    }
 
    return result;
@@ -804,6 +806,7 @@ anv_cmd_buffer_fini_batch_bo_chain(struct anv_cmd_buffer *cmd_buffer)
    /* Destroy all of the batch buffers */
    list_for_each_entry_safe(struct anv_batch_bo, bbo,
                             &cmd_buffer->batch_bos, link) {
+      list_del(&bbo->link);
       anv_batch_bo_destroy(bbo, cmd_buffer);
    }
 }




More information about the mesa-commit mailing list