radv: Initialize shader freelist on allocation
authorFriedrich Vock <friedrich.vock@gmx.de>
Fri, 18 Aug 2023 20:59:09 +0000 (22:59 +0200)
committerFriedrich Vock <friedrich.vock@gmx.de>
Sun, 1 Oct 2023 11:11:43 +0000 (13:11 +0200)
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25496>

src/amd/vulkan/radv_shader.c

index 7636a66..06be4ac 100644 (file)
@@ -1182,6 +1182,8 @@ radv_alloc_shader_memory(struct radv_device *device, uint32_t size, bool replaya
 
    alloc =
       insert_block(device, list_entry(arena->entries.next, union radv_shader_arena_block, list), 0, size, free_list);
+   alloc->freelist.prev = NULL;
+   alloc->freelist.next = ptr;
 
    ++device->shader_arena_shift;
    list_addtail(&arena->list, &device->shader_arenas);