From 7b1568b7a32a754251773a62d8143b873418a943 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 19 Feb 2021 12:15:05 +1000 Subject: [PATCH] tu: reset object base on recycled command buffers The loader_set_dispatch overwrites the magic with the dispatch pointer, however when cmd buffers get recycled, and the loader is in debug mode, it asserts that the magic isn't set anymore. When recycling command buffers, reset the object base. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Bas Nieuwenhuizen Part-of: --- src/freedreno/vulkan/tu_cmd_buffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c index 2cce807..8da5d7c 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.c +++ b/src/freedreno/vulkan/tu_cmd_buffer.c @@ -1430,6 +1430,7 @@ tu_AllocateCommandBuffers(VkDevice _device, result = tu_reset_cmd_buffer(cmd_buffer); cmd_buffer->level = pAllocateInfo->level; + vk_object_base_reset(&cmd_buffer->base); pCommandBuffers[i] = tu_cmd_buffer_to_handle(cmd_buffer); } else { -- 2.7.4