Mesa (main): anv/allocator: Use list->u64 in free_list_push

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 14 06:02:07 UTC 2021


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

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Jul 13 16:23:22 2021 -0500

anv/allocator: Use list->u64 in free_list_push

Since we always modify this structure with atomics on the u64, it seems
better to use the u64 here too.  I have no idea if this fixes a bug.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11857>

---

 src/intel/vulkan/anv_allocator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index c42f6882b3f..afbfc73e70c 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -331,7 +331,7 @@ anv_free_list_push(union anv_free_list *list,
    for (uint32_t i = 1; i < count; i++, last++)
       table->map[last].next = last + 1;
 
-   old = *list;
+   old.u64 = list->u64;
    do {
       current = old;
       table->map[last].next = current.offset;



More information about the mesa-commit mailing list